UHIN / x12-parser-library

MIT License
15 stars 15 forks source link

Letter U in ISA11 is breaking P107 code #7

Open hidalgopagoto opened 4 years ago

hidalgopagoto commented 4 years ago

Hello there. I'm reading some Amazon EDI files and I checked there there's a repetition delimiter being set as letter U (which comes from ISA11 segment). The point is that there are products with ID containing letter U than it breaks into many arrays. For example:

{ "ID": "PO1", "PO101": "1", "PO102": "36", "PO103": "EA", "PO104": "47.9", "PO105": "PE", "PO106": "BP", "PO107": "B000GOY6Z0" }, { "ID": "PO1", "PO101": "2", "PO102": "6", "PO103": "EA", "PO104": "27.84", "PO105": "PE", "PO106": "BP", "PO107": [ "B005", "O5D12" ] }

As you can check, for the second product it should be B005UO5D12 but it became an array. Thank you

leefant commented 2 years ago

Hello there. I'm reading some Amazon EDI files and I checked there there's a repetition delimiter being set as letter U (which comes from ISA11 segment). The point is that there are products with ID containing letter U than it breaks into many arrays. For example:

{ "ID": "PO1", "PO101": "1", "PO102": "36", "PO103": "EA", "PO104": "47.9", "PO105": "PE", "PO106": "BP", "PO107": "B000GOY6Z0" }, { "ID": "PO1", "PO101": "2", "PO102": "6", "PO103": "EA", "PO104": "27.84", "PO105": "PE", "PO106": "BP", "PO107": [ "B005", "O5D12" ] }

As you can check, for the second product it should be B005UO5D12 but it became an array. Thank you

I faced this issue too. It looks like incorrect behavior because ISA11 is NOT delimiter. This field is defined as "Interchange Control Standards Identifier". The repetition delimiter needs to be taken from another place