简体   繁体   English

库存管理/如何处理成批出售和在数据库设计中作为散装物品出售的物品

[英]Inventory management / how to handle items that are sold both in packs and as loose items in database design

I request help from experts. 我需要专家的帮助。 In designing inventory management system, I have to store items which are purchased in packs (with 50 / 100/ 200 items) but are sold both in packs or in loose items say 5 or 10. How do I store such items in database? 在设计库存管理系统时,我必须存储以包装形式购买的物品(50件,100件/ 200件物品),但以包装或散装物品(例如5或10)出售。如何将这些物品存储在数据库中? In other words, when items are sold in loose quantities, how we account in stock? 换句话说,当物品散装出售时,我们如何计算库存量? Usually this price is not same as the price of packet. 通常,此价格与小包价格不同。 This creates problem for assigning selling price as well as updating stock. 这在分配销售价格以及更新库存方面产生了问题。 Thanks in Advance 提前致谢

In all inventory systems, there is a basic Entity called: Measurement Unit 在所有清单系统中,都有一个基本实体,称为: 度量单位

Each item that can be sold, should have relationship with Measurement unit Entity. 每个可以出售的物品都应与“计量单位实体”有关系。 For example you can sold 1 pack of eggs (or one by one). 例如,您可以卖出一包鸡蛋(或一盒一盒)。

So, in your system, you should store all possible measurement units per item. 因此,在系统中,应存储每个项目所有可能的度量单位。

Additionally , You should store all conversion between measurement units per item. 此外 ,您应存储每个项目的度量单位之间的所有换算。 For example 1 pack of eggs = 8 eggs. 例如1包鸡蛋= 8个鸡蛋。

here a data model: 这里是一个数据模型: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM