Batches, expiry dates and the FEFO rule

PharmaPro records every stock entry as a batch with its quantity, expiry date and purchase price. At the counter, the batch that expires first goes out first: First Expired, First Out.

Updated: 2026-09-293 min readالعربيّة · Français

Steps at a glance

  1. Open the Médicaments page.
  2. Search for the medicine and select it.
  3. Click Voir Lots.
  4. Check the batches sorted by expiry date (DDP) and compare their sum with the Stock total.

What a batch is in PharmaPro

A batch is attached to a product and contains:

Column in the batches windowMeaning
QuantitéQuantity left in the batch
DDPExpiry date
Prix AchatPurchase price of this delivery
RéceptionDate received
Fournisseur / FactureOriginal supplier and invoice
RemarquesOrigin of the batch (invoice, manual entry, migration)

The quantity shown in Médicaments (medicines) is the total used for sales and search.

Software screenshot — Batches and FEFO
Software screenshot

How batches are created

  1. Supplier invoice: in Factures Fournisseur (supplier invoices) → ➕ Nouvelle Facture (new invoice), each line (medicine, quantity, price, Péremption (expiry)) creates a batch linked to the invoice, adds the quantity to the product and updates its purchase price. This is the recommended method for every delivery.
  2. Manual addition of a product with a quantity above zero: batch marked Saisie manuelle (manual entry), dated with the Date d'enregistrement (entry date).
  3. Automatic migration: at launch, any product in stock with no batch at all receives a Lot de migration (stock initial) (migration batch, initial stock) covering its stock.
The Excel/CSV/PDF import updates the product quantity without creating a separate batch per delivery. If batch traceability matters to you, enter deliveries through Nouvelle Facture.

The FEFO rule at the counter

For every recorded sale (Point de Vente, Vente Rapide, credit, pending sale):

  1. The product's batches are sorted by expiry date (DDP), from the nearest to the furthest.
  2. The quantity is taken from the first batch, then from the next one when it runs out.
  3. Any remainder not covered by a batch (older or imported stock) is deducted directly from the total.
  4. If the total stock is insufficient, the whole sale is refused and nothing is deducted.
FEFO does not skip expired batches: an expired batch still on record goes out first. Physically remove expired boxes and correct the quantity.

Viewing a product's batches

  1. Open Médicaments and select the product.
  2. Click 📦 Voir Lots (view batches).
  3. The Lots — … window shows the Stock total (cache), the number of batches, then the batches sorted by ascending expiry date, with the reminder: Le POS dégage du lot dont la DDP est la plus proche en premier (FEFO). (the POS takes from the batch with the nearest expiry date first).
Compare the sum of the batches with the Stock total (cache): the difference is stock with no batch (import or manual correction).

Expiry alerts

  • Dashboard: ⚠ ALERTE PÉREMPTION (dans N jours) (expiry alert, within N days) lists up to 8 products expiring between today and N days from now.
  • Médicaments page: the Expire bientôt (expiring soon) filter shows all products in the same window.
  • N is set in Paramètres → Alerte peremption (jours) (30 by default).
Both alerts read the Date de Péremption on the product record, not the date of each batch, and a new invoice does not change that date. A product that has already expired also drops out of the alert. So sort the Date de Péremption column in Médicaments to see expired products, and open 📦 Voir Lots for sensitive products.

Returns and cancellations

When a refund is made (Retours page) or a pending sale is cancelled (Ventes en Instance), the quantity is returned to the product's most recent batch — the software does not know which batch the box came from — and added to the total.

Good practices

  • Enter every delivery through Nouvelle Facture with the expiry date read on the boxes.
  • When a batch arrives with an earlier date than the one on the product record, update the product's Date de Péremption to keep the alert accurate.
  • Check the Expire bientôt filter every week and arrange the shelves in the order in which the software takes the batches out.
  • No screen lets you edit or delete a batch directly: accuracy depends on data entry.

Frequently asked questions

What does FEFO mean in pharmacy software?

First Expired, First Out: at the counter, PharmaPro first deducts from the batch that expires soonest, then from the next one.

How do I see the expiry dates of each batch?

In Médicaments, select the product, then click Voir Lots: batches are sorted from the nearest to the furthest date.

Does PharmaPro block the sale of an expired product?

No. FEFO takes the batch with the nearest date even if it has expired; remove expired boxes and correct the quantity.

Why doesn't an expired product appear in the alert?

The alert covers products expiring between today and the alert period. Products that have already expired are found by sorting the Date de Péremption column.

Try PharmaPro in your pharmacy

15 days free with every feature, then 45 000 DZD once.

Download and try freeBuy the licence

Need help?

Support answers on WhatsApp or by e-mail.

support@tkawen.com