存储库存商品计量单位的最佳方式

发布于 2024-09-27 09:39:41 字数 400 浏览 1 评论 0原文

假设这样的模式结构。

-----------------------------------------
Stock (ID, Description, blah blah)
-----------------------------------------
StockBarcode (ID, StockID, Barcode, Price, blah blah)
-----------------------------------------

存储库存商品计量单位的最佳方式是什么?鉴于 StockBarcode 价格可能是 1 件商品、10 件商品、10 克或 10 磅?

Stock 到 StockBarcode 是一对多的关系。 (虽然我确信你不需要我告诉你)

干杯:)

Assuming a schema structure as such.

-----------------------------------------
Stock (ID, Description, blah blah)
-----------------------------------------
StockBarcode (ID, StockID, Barcode, Price, blah blah)
-----------------------------------------

What is the optimal way of storing units of measure for your stock items? Given that the StockBarcode Price may be for 1 item, for 10 Items, for 10 grams or for 10 pounds?

Stock to StockBarcode is a one to many relationship. (Although Im sure you didnt need me telling you that)

Cheers :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

何时共饮酒 2024-10-04 09:39:41

您可能会考虑在所有包含数量字段的表上添加一个额外的 UOM 列,并在所有货币列上添加一个额外的货币列。

所有输入屏幕均应询问数量和计量单位。

项目表 - 添加库存/库存计量单位、采购/接收计量单位、
定价计量单位、运输/发送计量单位、生产计量单位、组件计量单位列

新 UOM 表 - ID、缩写、描述、RegionID、UOMTypeID

新的 UOMRegion 表 - ID、代码、描述(示例数据 - 1、UK、
英国;
2、US、美国;
3、INT、国际)

新 UOMType 表 - ID、代码、描述、默认 UOMID(示例
数据 - 1、V、体积、15;
2、A区,45;
3、W,重量,32;
等)

新 UOMConversionFactor 表 - ID、FromUOMID、ToUOMID、
ConversionFactor(示例数据 - 1, 1, 1, 1;
2, 1, 3, 0.026021066655565;
3, 3, 1, 38.430399999999000)

(注释 - 从 UOM 到相同 UOM 的转换为 1。可以放入表中或
不是。
每条记录通常都有一个隐含的 FromQty 列,该列始终为 1。
确保 ConversionFactor 允许使用巨大的数字,以便在涉及大量数量时最终的数字会更加准确)

想法 - 1)一些 UOM 不够具体,例如“桶”(有一个美国干货桶,一个美国蔓越莓桶,美国液体桶、英国啤酒桶、美国啤酒桶、石油桶等),2)如果您担心国际应用,UOM 会受到地区的影响(即美国杯与英国杯不同,而英国杯与美国杯不同)。国际杯),3)我可以收到一张 X 商品的卡通片,将其存放在托盘中,然后分别装运。 4) “套件”或“构建”项目可以是 UOM 中的原材料加上不同 UOM 中的各种组件,最终产生不同 UOM 中的最终产品。

You might think about putting an additional UOM column on ALL tables where Qty fields are and additional Currency column on all money columns.

ALL entry screens should ask Qty and UOM.

Item table - add Inventory/Stocking UOM, Purchasing/Receive UOM,
Pricing UOM, Shipping/Send UOM, Production UOM, Component UOM columns

new UOM table - ID, Abbrev., Description, RegionID, UOMTypeID

new UOMRegion table - ID, Code, Description (example data - 1, UK,
United Kingdom;
2, US, United States;
3, INT, International)

new UOMType table - ID, Code, Description, DefaultUOMID (example
data - 1, V, Volume, 15;
2, A, Area, 45;
3, W, Weight, 32;
etc.)

new UOMConversionFactor table - ID, FromUOMID, ToUOMID,
ConversionFactor (example data - 1, 1, 1, 1;
2, 1, 3, 0.026021066655565;
3, 3, 1, 38.430399999999000)

(notes - Conversion from UOM to same UOM is 1. May put in table or
not.
Each record I usually have an implied column FromQty which is always 1.
Make sure ConversionFactor allows for HUGE numbers so final numbers turn out more accurate when large Qty are involved)

Thoughts - 1) some UOM are not specific enough such as "barrel" (there is a US dry goods barrel, a US barrel for cranberries, U.S. fluid barrel, U.K. a beer barrel, US beer barrel, oil barrel, etc.), 2) UOM is impacted by region if you are worrying about an international application (ie. a US cup is different from UK cup that is different than the international cup), 3) I can get a receive a cartoon of item X, store it in pallets, and ship it in eaches. 4) "kit" or "build" items can be raw materials in UOM plus various components in different UOM that ultimately results in a final product in a different UOM.

救赎№ 2024-10-04 09:39:41

我将 QtyUOMID 列添加到 StockBarcode 表中,然后添加一个新表,例如

StockUOM (ID, Description)

I'd be adding Qty and UOMID columns to the StockBarcode table and then a new table like

StockUOM (ID, Description)
慈悲佛祖 2024-10-04 09:39:41

如果我正确理解您的库存表,它包含您库存待售的产品。

需要考虑的一种选择是,您可能应该考虑根据库存用语保留数据,而不是库存数据,称为 SKU(库存单位)信息

每个 SKU 本身可以由 1 件以上的商品组成,但由于它不能以这种方式出售,因此在大多数情况下您不必关心这些细节。价格等详细信息都是与 SKU 关联的属性。

例如:如果一个产品说啤酒可以单独销售/6 包/12 包,那么它就有 3 个与之关联的 SKU。

然后你就有了关系:

Products --> SKU's which is 1:many

SKU --> StockBarCode 为 1:1(假设同一 SKU 的所有单位都具有相同的条形码 - 如果不是,则也可以是 1:Many)

If i understand your stock table correctly, it consists of the products that you are stocking to sell.

One option to consider is that instead of stock data maybe you should consider keeping the data based on what in stock keeping parlance, is referred to as SKU (stock keeping unit) Information.

Each SKU itself can be made of more than 1 item but as it cannot be sold that way, you dont have to concern yourself with those details in most scenarios. Details like price etc are all properties that are then associated with the SKU.

Eg: If a product say beer can be sold individually / 6 pack / 12 pack then it has 3 SKU's associated with it.

Then you have relationships :

Products --> SKU's which is 1:many

SKU --> StockBarCode which is 1:1 (assuming you have the same bar code for all the units of the same SKU - if not then it can be 1: Many as well)

恏ㄋ傷疤忘ㄋ疼 2024-10-04 09:39:41

每个 UOM 都有唯一的 StockBarcode 吗?例如,是否有克条形码、磅条形码和单个物品的条形码?如果是这样,安德鲁的解决方案将会起作用。

如果没有,您将需要创建另一个包含 StockID、Qty 和 UOMID 的表。

StockUOM (ID, Description)

StockCount (ID, StockID, UOMID, Qty)

扫描条形码时,您需要输入要扫描的 UOM。然后,软件可以根据扫描的商品更新 StockCount 表。如果您的商品没有多个条形码,并且您库存了多个 UOM(常见),这可能是一个很好的后备方案。

Is there a unique StockBarcode for every UOM? For example, is there a barcode for grams, a barcode for pounds and a barcode for individual items? If so, Andrew's solution will work.

If not, you will need to create another table that contains the StockID, Qty and UOMID's.

StockUOM (ID, Description)

StockCount (ID, StockID, UOMID, Qty)

When you scan the barcode, you will need to enter in what UOM you are scanning for. Then the software can update the StockCount table based on item scanned. This could be a good fallback in case your items don't have more than one barcode, and you are stocking more than one UOM (common).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文