Jump to content

2 values for 1 field?


Joel Saltzman
 Share

This topic is 5789 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a Point of Sale system that I am trying to modify that I made. There are 3 tables

Order

LineItems

Inventory

The LineItems is a portal on the POS form. Each product has a custom barcode printed for it. The barcode simply is the product's SKU number. When the SKU is scanned into the SKU field of the portal, it retrieves the ItemName and Price from the INVENTORY table.

Is there some way to make it so that the clerk can scan either the custom barcode on the package OR the UPC barcode on the package? All UPCs can be used as primary keys in the system. I want to be able to scan either one into ONE field and not worry. UPCs and SKUs do not EVER have a possibilty of being the same...

I was thinking of something with a sku_upc field and self referencing relationship but dont know how i could do that....

ANY IDEAS?:P?

Link to comment
Share on other sites

Try creating a new table called 'barcodes' and have it be a one to many from Inventory to Barcodes. Then in your line items table, you can reference the Barcodes table instead of directly to the Invetory table.

Link to comment
Share on other sites

This topic is 5789 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.