Y
Yam84
Hello:
I am creating a checkIN/Out system. using this system, users will
check in and out items, as well as make purchases or receive credits
for future purchases. I am fine up the the point of calculating the
amount on hand. I have a query that calculates the total sum of a
product at a certain time, however when an item is purchased or
checked out, the query gives an incorrect result. It correctly
calculates the result when an item is initially checked out or
purchased, however if this product is checked out or purchased again,
it does not recognize that the stock of that item has been reduced, so
it will just subtract from the original stock amount. For instance:
checkOutInID Item Quantity Out Product SumOfstock Expr1
73 Hammer 1 Hammer 7 6
74 "1 1/2"" Putty Knife" 1 "1 1/2"" Putty Knife" 2 1
75 Hammer 2 Hammer 7 5
In record 75, Expr1 should read 4 and SumOfstock should read 6,
because in record 73, after the initial hammer was checked out, there
were 6 left. My plan is that when an item is checked back in, the
stock will increase by the number of items added back to stock. I
have been unable to achieve this. Any insight will be appreciated.
I am creating a checkIN/Out system. using this system, users will
check in and out items, as well as make purchases or receive credits
for future purchases. I am fine up the the point of calculating the
amount on hand. I have a query that calculates the total sum of a
product at a certain time, however when an item is purchased or
checked out, the query gives an incorrect result. It correctly
calculates the result when an item is initially checked out or
purchased, however if this product is checked out or purchased again,
it does not recognize that the stock of that item has been reduced, so
it will just subtract from the original stock amount. For instance:
checkOutInID Item Quantity Out Product SumOfstock Expr1
73 Hammer 1 Hammer 7 6
74 "1 1/2"" Putty Knife" 1 "1 1/2"" Putty Knife" 2 1
75 Hammer 2 Hammer 7 5
In record 75, Expr1 should read 4 and SumOfstock should read 6,
because in record 73, after the initial hammer was checked out, there
were 6 left. My plan is that when an item is checked back in, the
stock will increase by the number of items added back to stock. I
have been unable to achieve this. Any insight will be appreciated.