leading zeros in STOCK NUMBER

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

Post Reply
zoecanbark
leading zeros in STOCK NUMBER

Post by zoecanbark » Thu Apr 07, 2005 5:52 pm

I have a bar code that starts with zero. The stock table will not accept stock numbers with a leading zero. It is able to recognize the scan during a sale by having the correct bar code number in the VENDOR STOCK NUMBER field.

My problem occurs when I try to compare the inventory from a portable scanner to the current stock table. The portable scanner will output the leading zero, causing a mis-match between the stock table STOCK NUMBER field and the portable scanner output.

If bar codes starting with zeros exist, shouldn't the leading zeros be allowed in the stock table's STOCK NUMBER field?

User avatar
Dale Harris
Forum Owner
Posts:1171
Joined:Sun Dec 28, 2003 10:19 pm
Location:Chicago
Contact:

Leading zeros

Post by Dale Harris » Thu Apr 07, 2005 6:47 pm

zoecanbark,

The stock numbers in the POS program are stored as numbers. That way they can be compressed so that you can hold 13,000 of them in memory. This allows the POS program to find any item in the stock table in almost zero time. They cannot be copmpressed if they are stored any other way.

Since they are stored as numbers you will remember from your math classes in school that 000657141357 and 657141357 have the same numeric value and are therefore the same number.

When the POS program compares an stock number you enter into the program to the stock numbers that are in the stock table it does so numerically so it will make no difference to the POS program if there are leading zeros or not.

Plus the POS program will have no idea how many leading zeros you would want. If the stock number you want to use is 123456 do you want 6 leading zeros for a UPC stock number or 7 leading zeros for a EAN-13 stock number or 8 leading zeros for a EAN-14 stock number?

So for many reasons there will be no leading zeros in stock numbers.

Sorry,
Dale

zoecanbark

leading zeros in STOCK NUMBER

Post by zoecanbark » Fri Apr 08, 2005 9:38 am

Dale,

Thanks for the explanation. My workaround is to apply my own bar codes, without leading zeros, to those products having bar codes that start with zero. This is not a big thing as I have only discovered one so far!

Thank you,

Greg Kennedy

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests