DacoTaco / BarcodeParserBuilder

BarcodeParserBuilder is a .Net ( standard 2.0 & 2.1 ) nuget package to help parse & build barcode strings
https://www.nuget.org/packages/BarcodeParserBuilder
GNU Lesser General Public License v2.1
11 stars 4 forks source link

Quantity support #16

Closed jorgercosta closed 7 months ago

jorgercosta commented 8 months ago

Hi

I am trying to decode this hibc data +E203PB414109/$$8243280112R00089525J

It's not picking the quantity 24 folowing $$8

It's returning 3280112R00089525 as the BatchNumber

Thank's

DacoTaco commented 8 months ago

did you happen to have tried throwing it against the hibc parsing test cases? it could reveal the problem. no problems if you haven't, i could give it a go sometime this weekend :)

DacoTaco commented 8 months ago

Hi @jorgercosta ,

ive plugged your barcode in the unit tests in one of the last commits and i got quantity 24.

can you verify on your machine that the barcode works correctly? can you try and run the unit tests on your machine?

jorgercosta commented 8 months ago

Hi Thank you for the quick feed-back What i am getting wrong it's not the quantity that's perfect it's the Lot/ExpiryDate

I'am getting BatchLot: 3280112R00089525

Should be

ExpiryDate: 12/01/2028 BatchLot: R00089525

Following the specs - $$: If the first two characters are “$$” followed by a digit, then the digit specifies quantity and Date Field format. For use with lot numbers, not serial numbers

Thank's

DacoTaco commented 8 months ago

Hey @jorgercosta , got a link to the documentation youre reading? the docs i am reading ( https://www.hibcc.org/wp-content/uploads/SLS-2.6-Final.pdf ) and can not find anything relating to $$8 and it being a date format identifier. hence the code kinda assumes its only the batch lot identifier.

i assume this is an hibc edge casec i haven't implemented correctly yet

jorgercosta commented 8 months ago

Hi https://www.hibcc.org/wp-content/uploads/ANS_HIBC_SLS_2.5_2015.pdf page 32. I think it was different in the previous version (2.5) I will try reading specs for 2.6 and if there is a pathway for this

jorgercosta commented 8 months ago

After reviewing the two specs in fact in 2.5 (page 32) you can use $$8 || $$9 || $$8+ || $$9+ and in 2.6 you should use Q to indicate quantity

DacoTaco commented 7 months ago

@jorgercosta,

youre right, they changed some stuff between specs v2.5 & 2.6. i had a few things there for the 2.5 specs, but wasn't correct yet. with the barcode you provided, and some previous ones that were in the unit tests i was able to correctly parse and build the barcode. i new pre-release version of the nuget package was pushed to nuget (0.1.4-preview1). can you verify if the barcodes are parsed/build correctly now?

jorgercosta commented 7 months ago

Will try as soon as possible Thank you for the time spent with this issue and the package overall

jorgercosta commented 7 months ago

Hi, I tried it with some more samples I had and cross-checked those using Scandit app. Looks fine Once again thank you very much for your work

DacoTaco commented 7 months ago

happy to hear its fixed! ill leave it as a preview build for now, but 0.1.4 will be released eventually :)