2 Replies Latest reply on Apr 28, 2017 4:22 AM by beverly

    Inventory First In First Out


      How would I design a solution such that the first item bought should be the first item to be sold?


      Ex: If I purchase Product A on 2017-04-01 for 5.00 each and I made another purchase on 2017-04-15 for 7.00 each, I want to sell first Product A which costs 5.00 each before selling another that costs 7.00 each.

        • 1. Re: Inventory First In First Out

          You'll need a table of transactions with a transaction date, cost, qty, product ID, and a sold field.


          Each time that your sales invoice gains a line item, deduct the qty from Oldest record for that product where the sold field is less than the Qty. Increment the sold field of that record.


          This is just rough outline as there are many different implementation possibilities.

          • 2. Re: Inventory First In First Out

            Part of that is physically pulling the FI item to sell/send/give (FO). That is another "storage/retrieval" solution that is (mostly) outside a database storage of the pointer to that item.


            But are you asking what about the cost difference of these items (averaging the price) or are you asking about an "expiration date" scenario as for perishable items?