opensourcepos / opensourcepos

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.
http://www.opensourcepos.org
Other
3.48k stars 2.19k forks source link

Minor Code 128 issue #2487

Open huseinr2493 opened 5 years ago

huseinr2493 commented 5 years ago

I am using OSPOS 3.2.3 for a garage sale (because why not?)

All of my items have blank "Barcode" fields, so barcodes are generated using the "item_id" field instead. When the item ID is only one digit, a leading zero is added to the beginning of the code. This causes the item to not be recognized by the Sales register when the barcode is scanned.

The leading zero occurs because the data is recognized as being suitable for a "type C" Code 128 barcode in /application/views/barcodes/Code128.php. The problem is that this type of barcode MUST contain an even number of digits, hence the leading zero.

It's a little annoying but I was able to circumvent this by making the "resolveSubtype" function always return subset type B. (I know zero PHP so it was an ugly hack.) Perhaps the Sales register could be coded to recognize the leading zero?

daN4cat commented 4 years ago

This looks to me more a minor bug than an enhancement.

daN4cat commented 4 years ago

And thanks for reporting it.