Closed PaxITIS closed 1 year ago
I'm referring to page 12 of this official document https://www.hibcc.org/wp-content/uploads/SLS-2.6-Final.pdf
oh, how i love hibc... /sarcasm
the problem here is that HIBC's specs allow for the dates to be in multiple spots, in multiple formats, etc etc it's utter chaos. the code currently tries it best to decide where to put everything depending on date format, if it has a batch number etc etc.
it ends up using $$3 because it has a batch number or serial, and thats what $$3 describes.
however, i see the $$x segments do not support YYYYMMDD
, so that means this code is wrong
https://github.com/DacoTaco/BarcodeParserBuilder/blob/main/BarcodeParserBuilder/Barcodes/HIBC/HibcBarcodeParserBuilder.cs#L134-L135
i will have to refactor the builder a bit, and i will see when i can do that :)
ok so, ive fixed the bug locally, but surprise surprise, the hibc specs and its chaos is biting me in the butt...
both a +$
/+$+
& +$$7
/+$$7+
prefix are the same and mean the same.
your barcode is now building to +E308T800206X0/$$7230513/14D20260413C
because of that...
im not sure what to do about this
@PaxITIS : is it ok if it uses $$7 for the batch id instead of just $ ?
i went with building it as a $$7 segment. problem is now fixed
Where a manufacturer wishes to use an expiry date with the format YYYYMMDD, which is not one of the available options in the secondary data formats, the manufacturer can instead use the supplemental data option for expiry date. When using the supplemental data option the expiry date is encoded with DI “14D” using the following format. Field Length - an3+n8 14D Expiry Date (YYYYMMDD) – Date of expiry Following is an example with both a Date of Manufacture and the expiry date are added to a HIBC Primary and Secondary symbol containing a lot number only.
[EXPECTED RESULT]
+E308T800206X0/$230513/14D20260413C
[WHAT REALLY HAPPENED]
Code Snippet:
Result --> +E308T800206X0/$$3260413230513.
Code Snippet:
Result --> +E308T800206X0/$$3260413230513.
I also tried to parse the expected barcode "+E308T800206X0/$230513/14D20260413C" and use the result of the method to build a new barcode in order to check if I did something wrong before but seems that the method Parse() is able to decodify it but the Build method is not able to rebuild it to the original form.