php-edifact / edifact-generator

Formatter for EDI messages
GNU Lesser General Public License v3.0
36 stars 29 forks source link

Incomplete iftmin implementation #16

Open axelvnk opened 4 years ago

axelvnk commented 4 years ago

Hi there,

Thanks for the library.

I must say I'm really struggling to find a way to build a BICS file for Iftmin D01A... I can easily build the base segments with the iftmin class, however, there's no corresponding container classes that I can use to add and really build up my file.

I want to build an iftmin file that includes several containers with several terminal stops but I can't seem to find a way to do it with your library.

It seems the only way to do it is to just build further on top of it...

Am I missing something here?

If I'm actually doing useful work I'd like to open up a PR.. But then again, I'm literally building a file based on an example :D not sure if that's the best way

sabas commented 4 years ago

Hello, I drafted it basing on the message I was studying for trasport orders sent to truckers, but I as well was messing with some samples and I never put it into production :-D IFTMIN is used also for bill of lading instructions. The most complete specification I found are INTTRA and CARGOSMART but they apply to the B/L use case.

So I'd gladly accept and review a PR if you have a use case! For my messages I used a main class and a Container class inside the message named folder, but see how it works better for you, perhaps a generic Iftmin class in the main namespace and a specific class which extends that?

There are also some traits for some segments.

If you want to discuss more I have also my email in the profile :)