Example:
Suppose I have Input stock number is 500 and Quantity(sale quantity) is 5 then remaining stock is 495 , In the next case when i sell some other item in Input stock must be 495 instead of 500 and if quantity is 6 then 489..
how to calculate using sqlserver?? here is the stored procedure:
The above query not working..any suggestion???
How to subtract inventory and sale ??
i want instead of 500 must be 495 and after 495 if quantity is 6 remaining stock 489..depends upon the data(input stock and quantity data dynamically)