Hi,
I have a table that keep date of expired items and quantity.
My question is how to be deduct from each item programmatically, such that if 10 items are in 3 batches, how do I deduct from batch 1 and if batch 1 has exhausted, then deduct from batch 2 and so on.
Here's my demo:
Ball Pen (batch1) =10pcs [expiring 12/10/15]
Ball Pen (batch2) =7pcs [expiring 01/5/16]
Ball Pen (batch3) =8pcs [expiring 02/1/16]
Now If I am selling 15 items to a client, how does it programmatically deduct the first 10pcs and 5pcs from the second batch and so forth...
I hope this is clear enough to receive answer or reply.
I have a table that keep date of expired items and quantity.
My question is how to be deduct from each item programmatically, such that if 10 items are in 3 batches, how do I deduct from batch 1 and if batch 1 has exhausted, then deduct from batch 2 and so on.
Here's my demo:
Ball Pen (batch1) =10pcs [expiring 12/10/15]
Ball Pen (batch2) =7pcs [expiring 01/5/16]
Ball Pen (batch3) =8pcs [expiring 02/1/16]
Now If I am selling 15 items to a client, how does it programmatically deduct the first 10pcs and 5pcs from the second batch and so forth...
I hope this is clear enough to receive answer or reply.