Inventory report of Drugs purchased in Cartons
I'm working on a pharmacy systems which will give inventory report on how drugs were bought (e. g in cartons) and how it was sold in smaller units (e. g in packets, cards or rolls). For example; * 5 cartons of Ampeclox is added to the system. * Each carton contains 20 packets. * Each packet contains 5 cards. * Each card contains 5 rolls When adding this drug to the system, the storekeeper will insert quantity of Packets per Carton, quantity of Cards per Packet and quantity of Rolls per Card and the system will save each unit with quantity. Now the seller can sell this drug in Cartons, Packets, Cards or Rolls. I'm looking for a way that if 4 CARDS are sold, the system will report that the quantity remaining is; * 4 Cartons * 19 Packets * 1 Card Notice that the sale in Card affects Packets and Cartons quantity which means that any sale in smaller unit MUST affect the quantities of upper units. Please guide me on how to accomplish this or if you have a better method, help me please.