Guide to Selling a Product from Several Expiry Batches Manually and Automatically (FEFO), and Receiving into Several Batches
Example: a "Milk" product tracked by expiry date has 20 units expiring soon and 10 expiring later, and the client orders 45. This guide covers manual assignment on lines, automatic FEFO, and receiving a purchase into two batches.
Before you start
- The Product Tracking app is active and the product is tracked by Expiry Date or Lot Number and Expiry Date. A product tracked by Lot Number only works the same way, and FEFO picks the oldest received lot for it.
- Sales and purchase invoice add permissions, and Edit Requisition when requisitions are on.
- Edit General Settings to turn on FEFO.
Manual assignment on the sales invoice
- Open Create Invoice and choose the client and warehouse.
- Add "Milk", pick the nearest expiry date and enter 20.
- Add "Milk" on a second line, pick the next date and enter 10.
- Save; each batch is deducted by its quantity.
Splitting on the outbound requisition (requisitions on)
- Save the invoice with quantity 30 and no tracking data, with Requisitions for Sales Invoices enabled. If FEFO is on, the outbound requisition is split across the batches automatically when it is saved, so no manual split is needed.
- Open the outbound requisition from Requisitions and click Edit.
- Click Split next to Remove on the product line; it becomes two lines of 15.
- Pick each line's date and set quantities to 20 and 10 (a total above 30 is not accepted), then save.
Automatic FEFO
- Open Inventory & Products Settings ← Products Settings ← Product Tracking section, turn on Automatically Assign Oldest Expiry Date (FEFO) and save.
- Create a new invoice and add "Milk" with quantity 45.
- When you leave the quantity field the line splits automatically: 20 from the nearest, 10 from the next, and 15 on a line with no date if negative inventory is allowed for all items; otherwise only the 20 and 10 lines stay and the message "Insufficient valid stock to fulfill this quantity" shows.
- Review and edit the lines if needed (for example reduce to 30 or delete the last line), then save.
Receiving a purchase into two batches
- Open Add Purchase Invoice and add the product on two lines, each with a lot or expiry date and quantity; or save and split the inbound requisition line with Split.
- On the inbound requisition the total may equal or be less than the original quantity. The inbound requisition is created when Requisitions for Purchase Invoices is enabled; without it, each invoice line needs its expiry date, or the message “The Expiry Date must be entered for the entered quantity for product” followed by the product name shows.
- Save; each quantity is added to its batch.
Frequently asked questions
Does FEFO work on purchases?
No.
Why did a line with no date appear?
Stock did not cover the requested quantity and negative inventory is allowed for all items.
Can Split be repeated?
Yes, on any line.
What is the total rule on outbound requisitions?
It may not exceed the invoice quantity; otherwise "Amount more than order" shows.
Does it apply to refunds?
Manual assignment yes; FEFO no.



