Skip to content
CRYSTAL ITIT SolutionsHome
Pharmacy

Pharmacy Stock Management in Morocco: Batches, Expiry Dates and Inventory

November 21, 20267 min read
Pharmacy Stock Management in Morocco: Batches, Expiry Dates and Inventory

Pharmacy stock management in Morocco is unlike any other retail business: every product carries a batch number and expiry date, regulatory schedules impose dispensing constraints, and a single expired item sold at the counter engages the responsible pharmacist's liability. Between wholesaler deliveries, promised patient items and zone inventories, a pharmacy's stock is in constant motion. Without the right tool, this flow is managed through Excel, sticky notes and personal memory — a fragile balance that falls apart with the first staff absence or new hire. Our Pharmacy module (Crystal Pharma, our pharmacy management software), developed by CRYSTAL IT in Rabat with over 20 years of experience serving Moroccan SMEs, structures this flow end to end: from receiving the delivery note to the expiry report, via the counter, inventory and supplier returns. This guide details each step and what a pharmacy software must cover to manage a Moroccan pharmacy's stock without re-entry or blind spots.

The challenges of stock management in a Moroccan pharmacy

A pharmacy is not an ordinary shop: its stock is simultaneously a commercial asset, a care tool and a regulatory object. A medication from schedule A, B or C can only be dispensed on prescription; an expired batch cannot be sold; certain stock movements — particularly narcotic entries and exits — must be recorded in a dedicated register. These constraints are not optional: they apply to every sale, every receipt, every inventory. A pharmacy stock management software must integrate them from the outset, not treat them as exceptions to be handled manually.

Beyond regulation, the economic stakes are equally real. A stock outage on a chronic treatment — amoxicillin, paracetamol, metformin — immediately means a patient sent to a competitor. Overstocked slow-moving references generate expired products to destroy, i.e. a net loss. Finding the right stock level per reference requires reliable data: actual sales by period, stock levels by batch, orders already placed and products promised to patients. This is precisely what a pharmacy software must calculate automatically to feed the order proposal. For a full overview on choosing a pharmacy software in Morocco, see our guide (Choosing pharmacy management software in Morocco).

  • Regulatory constraints: prescription dispensing for schedules A, B and C; narcotic register updated after every movement.
  • Economic risk: chronic treatment outage = immediate patient loss; expired stock = net loss on tied-up inventory.
  • Tracking complexity: the same product may exist in multiple batches with different expiry dates, stored across multiple zones.
  • Reference volume: a pharmacy may manage thousands of active references with very heterogeneous turnover rates.
  • Wholesaler dependency: delivery lead times and wholesaler shortages require anticipating orders with reliable data.

Receiving deliveries: mastering batches at the point of entry

Pharmacy stock management starts with receiving the delivery note. This is the moment when critical information — batch number, expiry date, quantity — enters the system, and any input error at this stage propagates to the counter and the registers. In our Pharmacy module (Crystal Pharma, our pharmacy management software), two reception modes are available: scanner entry, line by line with quantity, batch number and expiry date; and CSV import of a delivery note using the Crystal template, with a full preview before validation. In both cases, stock only changes on validation: a reception in progress does not affect stock levels visible at the counter.

A crucial point to verify in any pharmacy software: what happens if an already-expired batch appears on the delivery note? In Crystal Pharma, that batch is refused at reception — it is impossible to record a batch in stock if its expiry date has passed. This protection prevents any expired product from entering the sales cycle. Orders to wholesalers are managed in the same tool: the purchase order is sent by email or WhatsApp directly from the software, partial reception against the original order is possible, and the remaining ordered quantity stays visible until fulfilment. There is no direct connection between Crystal Pharma and wholesalers: orders are sent by message, deliveries are entered manually or via CSV.

  • Scanner entry line by line: quantity, batch number, expiry date — or CSV import with preview before validation.
  • Automatic rejection of expired batches at reception: impossible to record a batch whose date has passed.
  • Stock unchanged during entry: only validation updates levels, with no artificial outage during reception.
  • Partial reception against order: remaining ordered quantity tracked until full arrival or cancellation.
  • Wholesaler orders sent by email or WhatsApp from the software; no direct connection to wholesalers.

At the counter: dispensing the right batch, blocking expired ones

Batch-level stock management is worthless if it doesn't apply automatically at the counter. Two rules are non-negotiable: first, the batch expiring soonest must be dispensed first (FEFO — First Expired, First Out), so products closer to expiry are sold before those with a longer shelf life; second, an expired batch can never be sold, whatever the circumstance. In Crystal Pharma, both rules are built into the sales logic: the counter automatically selects the batch expiring first, and any attempt to sell an expired batch is blocked by the system.

These automations relieve the assistant from constant vigilance on every sale and reduce the risk of error at peak hours. They work alongside the other counter functions: searching by INN, dosage or barcode, allergies recorded on the patient file that appear in red at the point of sale, and the view of products with the same composition or molecule — with their stock, dosage and form — so the pharmacist can make an informed choice. This composition comparison remains a decision aid: no automatic substitution, no clinical equivalence inferred by the software.

  • Automatic FEFO at the counter: the batch expiring soonest is selected first, without any action by the assistant.
  • Expired batches blocked at the point of sale: no transaction can be validated on a batch whose date has passed.
  • Patient allergies displayed in red at the counter during the sale — immediate visual alert.
  • View of products with the same molecule or composition: stock, dosage, form and price compared to assist the pharmacist's decision.
  • Medications from schedules A, B or C: sale requires 'on prescription' type with entry of the prescribing doctor.

Inventory, expiry tracking and stock movements

Inventory is one of the most dreaded operations in a pharmacy: counting thousands of references, batch by batch, without disrupting counter activity. Crystal Pharma allows inventory to be carried out across the whole pharmacy or by storage zone, counting batch by batch. A discrepancy report compares theoretical and counted stock, and adjustments are entered in the tool. This avoids juggling between paper sheets, spreadsheets and the till software — all information stays in a single environment.

Expiry tracking is the other key management tool: Crystal Pharma provides a list of all batches ranked from nearest to furthest expiry, with their value, divided into bands (expired, under 30 days, under 60 days, under 90 days). This view allows rapid identification of products at risk of loss and a decision — wholesaler return if possible, destruction as a last resort — before the batch actually expires. Stock movements for wholesaler returns, destruction or breakage are recorded with a reason and generate a printable slip. After a wholesaler return, the expected credit amount, partial credits received and the balance due are tracked in the tool. Crystal Pharma does not generate accounting entries: the credit summary is for internal tracking and handover to the accountant.

  • Inventory across the whole pharmacy or by zone, batch by batch, with a discrepancy report between theoretical and counted stock.
  • Expiry list ranked by urgency: expired, under 30, 60, 90 days — with the value of each band.
  • Stock exits with reason (wholesaler return, destruction, breakage) and printable slip.
  • Wholesaler credit tracking: amount expected, credits received, balance due — without generating accounting entries.
  • Inter-colleague exchanges: loans and borrowings by batch, balance per colleague, movement traceability.

Order proposal: calculating the right stock level

The order proposal is the culmination of stock management: based on actual sales by period, sellable stock (total stock minus expired or near-expiry batches), orders already sent to wholesalers and products promised to patients, Crystal Pharma automatically calculates an order proposal. This proposal can be adjusted before being converted into a purchase order and sent to the wholesaler by email or WhatsApp.

This calculation avoids two common pitfalls: a stockout, when a fast-moving product is not replenished in time, and overstock, when an order is placed without accounting for quantities already in transit. Products promised to patients — those who requested an unavailable item and will return for it — feed directly into the proposal, so a request registered at the counter is never forgotten. The catalogue completes this setup: each reference can be configured with a minimum and maximum stock level, used as alert thresholds to guide the proposal. Dedicated filters provide an instant view of references on outage, below the minimum or with an expired batch.

  • Order proposal calculated on actual sales, sellable stock, in-progress orders and products promised to patients.
  • Minimum and maximum stock configuration per reference to guide alert thresholds and the order proposal.
  • Catalogue filters: outage, below minimum, with expired batch — instant view of purchasing priorities.
  • Promised products: an unserved patient request stays visible until its fulfilment and feeds the order proposal.
  • CSV export of the catalogue and reports for handover to the accountant or external analysis.

Pharmacy stock management in Morocco is a discipline in its own right: it combines regulatory constraints (schedules, registers, prescription records), batch and expiry logistics that leave no room for approximation, and economic management that determines the pharmacy's profitability. The right tool does more than keep an inventory: it structures every step, from receiving the delivery note to the order proposal, via the counter and stock movements. Our Pharmacy module (Crystal Pharma, our pharmacy management software) covers this entire flow in an online software with no local installation, developed by CRYSTAL IT in Rabat with over 20 years of experience serving Moroccan SMEs. The module is in a pilot phase with partner pharmacists. To see how it adapts to your pharmacy's organisation, request a demonstration at (Crystal Pharma, our pharmacy management software).

The CRYSTAL IT solution on this topic

Have a project or a question? Let's talk with a CRYSTAL IT expert.

Request a demo