Subject Re: [firebird-support] Best approach to storing suppliers' barcodes and map them to products in a database
Author Fidel Viegas
On Thu, Nov 27, 2008 at 7:14 AM, Alexandre Benson Smith
<iblist@...> wrote:

> If you have a distinct record on your table for each supplier, than you
> only need a new column for the supplier barcode.
>
> ProductID InternalCode Description SupplierBarCode
> 1 001.001 Ketchup (Supplier A) 7891008231007
> 2 001.005 Mayonnaise (Supplier A) 7891008231008
> 3 001.010 Ketchup (Supplier B) 7891234456890
> 4 001.015 Mayonnaise (Supplier C) 7890987654320
> 5 001.020 Ketchup (Supplier C) 7890987654321
>

Hi Alexandre,

Thank you for the quick reply. My solution is more or less similar to
this one. I have the products categorized by supplier and type, so if
I had to do a mapping it would be something like:

productID barcode
1 78342345590
1 78563223445
2 89088783000
etc....


I can have the same productId mapped to more than one barcode, because
sometimes the same product from the same supplier has a different
barcode, and not all are EAN13. There are some barcodes with 7 digits,
and son. it varies a lot. My concern is, for instance, when I have a
pack of let's say 12 items. All items have the same barcode. So, the
client can either buy the full pack of 12 or he can buy them
individually. This is what is cracking my head.

If it was as simple as you have described, it wouldn't be a problem.
The client has a shop with a grocery section, a stationery section and
a jewlry section that share a common database. The database is
designed to allow multi-store/warehouse management, and the code for
each item takes a letter representing a section. I have managed to do
that for another client. This particular client wants to use the
barcodes that come with the products, so I found myself in this
situation where I don't know how to manage sales o items that share
the same barcode, and that can be sold individually or together as a
pack.

Have you ever done something similar?

Thanks in advance,

Fidel.