Fix HIBC parsing without batch field in $$8/9 notation#20
Fix HIBC parsing without batch field in $$8/9 notation#20DacoTaco merged 2 commits intoDacoTaco:mainfrom
Conversation
In $$8 and $$9 notation parsing failed when no date and no batch field followed the quantity
|
yup, just checked the specs, you are completely correct! got a barcode you could put into the unit tests @Uranium235 ? |
|
HIBC: +EHWD3551419/$$900100F Not sure where you'd prefer to have that in the unit test and didn't want to make a separate pull request... |
|
fair enough! if the barcode you have can only be tested by parsing you'll have to add it to the parsing function, and for building its the building function. if you need further help dont hesitate to poke me. if you can't find it, feel free to give me to actual barcode , if you can, where that info came from and ill do it myself ^^; |
|
Hi DacoTaco, The code is still used that way in the company I work for. Here is the actual barcode. I would really appreciate if you could implement the unit test (and builder?) as a back and forth with our software partner and myself to implement and test the code is, well, not very efficient... ;) |
|
no problem! ill take it over from here! |
|
there we go, your fix is merged. thanks @Uranium235 ! |
|
Thanks! The code "+EHWD3551419/$/Q100X" would be valid though. At least to my verification tool. |
|
oh thats a good one! |
|
hi @Uranium235, |

The HIBC Parser in $$8 and $$9 notation fails when no date and no batch field follow the quantity.
In the <2.6 specs this is allowed. In that case no formatNumber, no date and no batch number follows the quantity before the end of the segment and an exception is thrown at segmentData.First().ToString() as segmentData.First() returns NULL.