Scenario: a company sells the product WG-1111 to its customers at 0.1$
each. The company purchases WG-1111 from a supplier, but the supplier
sells it in boxes containing 1000 pieces of WG-1111, at the price of
5$ for a box. When the purchased products are received from the
supplier, the boxes are opened and the individual WG-1111 are put in
warehouse, increasing the inventory units of WG-1111.
Proposed data mapping:
SupplierProduct. productId: WG-1111
SupplierProduct. supplierProductId: WG1111BOX10
SupplierProduct. supplierProductName: Box containing 10 pieces of
WG-1111
SupplierProduct. unitsIncluded: 1000
SupplierProduct. lastPrice: 5$ (this means that the unit cost is 0.005$)
Purchase Order for 2 boxes (2000 pieces):
OrderItem.productId: WG-1111
OrderItem.quantity: 2000
OrderItem.unitPrice: 5$
NOTE: during order entry the system should only allow quantities that
are multiple of SupplierProduct. unitsIncluded
NOTE: the above setup will require to change all the purchase
documents (order, invoice etc...) to compute order item amount as:
OrderItem.quantity / SupplierProduct. unitsIncluded *
OrderItem.unitPrice
For example, the purchase order PDF sent to the supplier will show:
Product: WG1111BOX10
Quantity (OrderItem.quantity / SupplierProduct. unitsIncluded): 2
Unit Price: 5$
Total Amount (OrderItem.quantity / SupplierProduct. unitsIncluded *
OrderItem.unitPrice): 10$
Is it an acceptable solution?
Apart from this, everything should work just fine (when items are
received into inventory etc...); the inventory item unit cost will be
computed as: total amount / inventory units = (OrderItem.quantity /
SupplierProduct. unitsIncluded * OrderItem.unitPrice) /
OrderItem.quantity = 10 / 2000 = 0.005$
What do you think?
Jacopo