• 1.8k
  • 63
  • 459

unit and alternateive unit

Jul 7 2020 4:28 AM
 Hi, i am working on an inventory application.
i am stuck at the unit conversion , like if a product is in Kilogram, i need to sell in grams or tons, dozen to pcs and  custom pack is also there like a carton may contain 20 pcs and need to sell it in pcs or it may contain 40 pcs. i hope you understand my question,
Product table is like
 ProductID  Name  Rate  Unit  Baseunit  conversion
 1  Item A  100  carton  Pcs  20
 2  Item B  120  carton  Doz  10
 3  Item C  100  Kilogram  Gram  2
ex: Item A is in carton of 20pcs
item C is a bag of 2 kilogram
and there is another table for measuring Unit
 Unitid  UnitName  ParentID  Conversion
 1  Pcs  -  1
 2  Doz  1  12
 3  gram  -  1
 4  Kilogram  3  1000
like wise
i tried but didn't get a complete solution for this, please help

Brought to you by:

Answers (1)