Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 FIFO Warehouse issue

Author  Topic 

croubekas
Starting Member

8 Posts

Posted - 2009-09-14 : 12:25:02
Dear all,

I have a small programming issue and I need your help.

I have a small warehouse and a typical issue of inflows/outflows for that warehouse on a daily basis.
The user inputs daily inflows as Unit_Code, Quantity, Price and records sales as outflows with Unit_Code, Quantity, Price.

The problem is I need the inflow-items to decrease as outflows occur on a per-entry basis.

Example:
User records inflows:
Code Quantity Price Date
Item_1 10 1.10 1/1/09
Item_1 20 1.08 2/1/09

After selling for example 15 units the remaining in the warehouse should show:
Code Quantity Price Date
Item_1 0 1.10 1/1/09
Item_1 15 1.08 2/1/09

In simple words I would like to use FIFO in selling items from the warehouse.


Is this feasable ?

Thank you tons!!
Chris.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-14 : 13:04:23
duplicate

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=132757
Go to Top of Page
   

- Advertisement -