Multiple Barcodes in one textfield or combo box

Moore71

DEVELOPER
Local time
Today, 00:44
Joined
Jul 14, 2012
Messages
158
Hi,
I have an inventory access program that a sales outlet uses.
Since the barcodes of the same group of items are always changing, I want to figure out how I can scan all related items into one textfield, where at selling point, any item code can serve for that group without recording each one differently.

Thanks in advance for your friendly gesture!
Regards,
John (Moore71)
 
If this is true . . .
the barcodes of the same group of items are always changing,
. . . what is the use of the barcode? I don't get it.

I think one distinct thing should be identified by one distinct barcode, and at one distinct scan, that one unique thing is recorded as having changed at that date/time, either added to an order, moved to the truck, or some other change of state.
I want to figure out how I can scan all related items into one textfield
Why would this be useful? You should scan each item independently and run error checking against that thing. Is it valid? Was it ordered? Does it trigger stock re-order? Handle each scan. Validate each one. IMO

Hope this helps,
 
I think you do not understand my question or i did not frame it well.
What I want is supposing you have all the coca cola products (fanta, coke, sprite, etc) at the same price and the shop owner says please input everything of coca cola as same item with their respective code scanned. Instead of have coke =3 pcs, fanta =4, sprite =7, you just scan the varieties into one field as one name (coca cola) with qty available as 14 not 3,4,7 respectively.
Does that makes it clearer now

Thanks for your reply anyway
 
If I recall -- Barcodes have this built into them within their number -- or most do which is to say if you take the entire barcode you get a specific product but if you take a part of it you can get a family of products. But this really depends on the barcode schema you are working with.
 
That would still, IMO, be a validation of a single scan. Scan a 500ml Sprite and convert that scan to a 500ml Soda. Scan a 500ml Coke and convert that scan to a 500ml Soda also. So now you have 2 500ml Soda, not 1 Coke and 1 Sprite on your bill. But the Coke and Sprite will have different SKUs that you scan, and those need to exist in your system in advance, or your scanner will not recognize them as valid products that you stock.

I would expect to see a table like . . .
tblProduct
ProductID (Primary Key)
ConvertToID (If non-zero, the ProductID that this product should covert to, so this is a Foreign Key back into this table, maybe what you call a self-referencing table)
ProductName
SKU
Price
. . . with data like this . . .
Code:
ProductID  ConvertToID ProductName   SKU            Price
     5567         6790 500ml Sprite  81234567890    0.00
     5679         6790 500ml Coke    82345678990    0.00
     6790            0 500ml Soda                   3.75
So now, I scan a Coke, find that record using the SKU, find that a Coke converts to a Soda, find the Soda, find the price and add it to the bill.

Every distinct thing in a database system needs it's own row in a table. It is not a reasonable solution to have multiple values in a single field, and in what you propose, one product might represent (or shadow or be related to) many other products, and those relationships need to be modeled accurately in your data. Try it other ways if you want, but you'll see the sense in this eventually.

Hope it helps,
 

Users who are viewing this thread

Back
Top Bottom