码迷,mamicode.com
首页 > 其他好文 > 详细

About inventory check

时间:2020-12-23 12:25:16      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:led   ase   log   ide   base   ike   like   business   ever   

This is about product inventory calculation.

In order entry software development, we will be dealing with products inventory. For example:

1. When selling a product, we might need to know how many products in stock/hand? In general, we would sell the product to a customer, and the quantity of the product should be greater than the customer asking for.

2. When returning a product to a supplier, we might know that the quantity of the product in the stock/hand. Then, we would be able to return the certain quantity of the product to the supplier, which the quantity returned should be less than the product in the stock.

As a result, the quantity of the product would be a positive number on these two sample cases.

Above logic looks fine when we have a clear business rule, which the quantity of the product on the "Computer Screen" can meet customer/supplier demands, and the number is accurate. However, issue raises when the quantity becomes negative.

Let us consider below sample case:

When selling the product to a customer, let‘s say 10 beers. The "Computer Screen" shows that the quantity of the beers in hand is 5. Now, can we sell the beers to the customer? In order to sell the beers to the customer, the next question would be: I will run to check how many beers really are in stock. We just can‘t based on the quantity numbers on screen to determine the business transactions to be completed only sometimes. Consequently, when we find the beers in the stock do have 12 bottles in stock, the selling 10 beers to the customer would be successful. Then, on our screen, the quantity of the beer in stock becomes negative if the software permits, which might raise some reasonable questions like:

How can we have a negative quantity in beers, based on the numbers showed on screen?

Is that something wrong in the computer?

How do we resolve those confusions?

Solution#1: When selling/returning products to the customer/supplier, the quantity of products would be checked. If the check failed in software, we can‘t complete the transaction at that point until the quantity issue is fixed on screen at least.

Solution#2: The quantity of the products could be negative in the software, and at the same time, a notice would be raised to ask for checking the inventory. Let the business transaction, which the sales to customer or returning purchase to the supplier, be completed first if we do have enough quantity to meet the customer/supplier demands. And then fixing the numbers in the software through checking the inventory in a later time.

I think both solutions are fine in many business software development. But, I prefer the second one because it is based on sales to drive the business, and software is a tool to support the business running, instead of blocking the business transactions.

 

About inventory check

标签:led   ase   log   ide   base   ike   like   business   ever   

原文地址:https://www.cnblogs.com/zwang562020/p/14156660.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!