Skip to content

Retail Sale Alternatives (Substitute Medicines)

buddhika edited this page Jul 16, 2026 · 1 revision

Retail Sale Alternatives (Substitute Medicines)

Overview

When a specific brand requested for a retail sale is out of stock, the pharmacy sale pages let the cashier look up in-stock alternatives — other brands of the same generic medicine — directly from the bill without leaving the sale screen, and swap one in with a single click.

This is the OPD counterpart to Ward Pharmacy BHT Substitute Functionality, which covers the same idea for inpatient (ward) issuing.

Where It's Available

The Alternatives button and dialog appear on every bill-item row on these pages (all Pharmacy > Sale menu items except "Sale (Legacy)"):

Menu Item Page Controller
Sale pharmacy_bill_retail_sale_native.xhtml retailSaleNativeSqlController
Sale by Item pharmacy_fast_retail_sale.xhtml pharmacyFastRetailSaleController
Sale for Cashier - By Item pharmacy_fast_retail_sale_for_cashier.xhtml pharmacyFastRetailSaleForCashierController

The older "Sale (Legacy)" page (pharmacy_bill_retail_sale.xhtml, pharmacySaleController) also has the same button and dialog.

How to Use

  1. Add items to the bill as usual
  2. If a requested brand is out of stock (or a better-priced/longer-expiry alternative is preferred), click the 🔄 (Show Alternatives) button next to that bill-item row
  3. The Alternatives dialog opens, listing in-stock, non-expired alternatives for the same generic medicine (other brands of the same VMP), earliest-expiry-first (FEFO), with Item, Code, Rate, Stock, and Expiry columns
  4. Click Replace next to the desired alternative
  5. The dialog closes and the bill row, bill totals, and payment panel refresh to reflect the new item, batch, and rates

What Counts as an "Alternative"

  • For a specific brand (AMP/AMPP), alternatives are every other AMP that shares the same generic (VMP) — i.e. other brands of the same drug
  • For a generic-level item (VMP/VMPP/VTM/ATM), alternatives are every brand under that generic
  • Only stock that is in the current department, not expired, not retired, and has enough quantity to cover the existing line quantity is offered
  • Only same-unit/pack substitutions are offered (the underlying lookup is AMP-to-AMP; it does not cross pack levels)

Configuration

  • Show alternative medicines available during retail sale (Boolean, default true) - gates the Alternatives button and dialog on the Retail Sale, Fast Sale, and Sale for Cashier - By Item pages. When set to false, no button appears and no alternatives lookup runs.

Related Documentation

Back to Pharmacy

Clone this wiki locally