PharmaDistributorsDesk

User Guide — Version 1.0.0

1. The Idea in One Minute

PharmaDistributorsDesk manages the day-to-day of a pharmaceutical distribution business: what is in stock and which batch it belongs to, what has been ordered, what has been delivered, what has been invoiced, and who still owes money. It runs as a small server on one Windows machine and everyone else works from a browser — a desktop in the office, or a phone or tablet on the road.

What makes it a pharma distribution system rather than a general one is that every batch carries its own expiry date, and the system uses that date at every step:

  • A delivery draws from the batch nearest to expiry first (FEFO), automatically.
  • A customer whose drug licence has lapsed cannot receive a delivery at all.
  • A recalled batch can be traced to every customer who ever received it.
  • An invoice, once raised, never changes even if the product’s price is edited afterward.
Access is role-based. What you can see and do depends on the role your account was given — admin, office, salesman or warehouse. See Roles & Access.

2. Roles & Access

RoleCan do
AdminFull access. User and role management, all master data, deleting records (suppliers, products, customers, payments, users), stock adjustments, settings, and every report.
OfficeMaster data, orders, deliveries, invoices, payments, purchases and returns, and every report. Cannot manage users or salesmen, and cannot delete records reserved for admins.
SalesmanPlaces orders and records payments — always scoped to their own account; the server assigns their salesman id regardless of what is submitted. Lists of orders, deliveries, invoices and payments are automatically filtered to their own activity.
WarehouseRecords purchases and deliveries, makes stock adjustments, and views stock levels and movement history. No access to financial reports or customer balances.

The sidebar only ever shows the sections your role can use, so what you see is a subset of the full navigation described under All Pages.

A salesman’s login is created together with their salesman profile on the Salesmen page (admin only) — there is no separate step on the Users page for that.

3. Logging In

  1. Enter your username and password on the login screen.
  2. If an administrator created your account or reset your password — or you are a new salesman signing in for the first time — the login screen switches to a Set a new password step before you can continue. This cannot be skipped.
  3. Otherwise you land on the Dashboard, laid out for your role.

Your session is a signed token stored in the browser, refreshed automatically while you are active. Logging out (the icon at the top-right of the top bar) clears it — do this on a shared computer. If your session expires while you are away, you will be sent back to the login screen the next time you do something.

Every write action (creating, editing or deleting a record) is attributed to your account in the system’s audit log. Do not share logins.

4. Core Workflows

Most of what you will do falls into one of these six flows.

A. Ordered sale (the usual path)

  1. Order — a salesman or office user places an order for a customer.
  2. Delivery — warehouse (or office) delivers against the order; partial deliveries are fine, and the order’s status tracks how much has gone out. The delivery form shows an allocation preview naming which batches will be drawn before you commit — see Batches, Expiry & FEFO Allocation.
  3. Invoice — office or admin raises an invoice from the order (or from a specific delivery), snapshotting price, MRP and tax at that moment.
  4. Payment — the salesman or office records payment(s) against the invoice.

B. Direct delivery (no order on file)

For a walk-in or a standing order that never went through the Orders page: record a delivery directly (leave it unlinked to an order), then invoice and pay it the same way.

C. Stock purchase

Record a purchase from a supplier and stock increases immediately — for a batch-tracked product, a batch number and expiry date are required at receipt. Do this before creating deliveries that depend on that stock.

D. Payment collection

The Dashboard surfaces overdue invoices; a salesman collecting payment in the field records it against the right invoice from the Payments page.

E. Sales return

Record a return against the original invoice — stock comes back in and the customer’s balance drops by the returned amount. This does not reverse the invoice itself; both records stand. A return of expiring or damaged stock instead goes through Expiry Returns into quarantine.

F. Purchase return

Record a return to the supplier — stock is deducted. Make sure there is enough stock on hand first; the system does not stop a purchase return from taking stock negative.

5. Batches, Expiry & FEFO Allocation

A product marked batch-tracked (the default) requires a batch number and an expiry date every time stock is received — the receipt is rejected, naming the missing field, if either is left out. Surgicals, consumables and other general goods can be marked not batch-tracked, and are received without either.

On-hand for a batch is always the sum of its own movements, exactly as on-hand for a product is the sum of all its batches’ movements. There is no separate balance to fall out of sync — every receipt, delivery, return, claim and disposal is a movement against the batch it touches, which is what makes a batch traceable at all.

How a delivery chooses which batch to use

When a delivery line names a batch-tracked product, the system offers the batch nearest to expiry first, splitting the quantity across more than one batch if a single batch cannot cover it. Three kinds of stock are never offered:

  • Stock already quarantined (see the expiry lifecycle).
  • Stock held by an open recall notice.
  • A batch whose remaining shelf life is shorter than the customer’s own contracted minimum shelf life, when one is set on their record.
The delivery form shows the allocation preview — exactly which batches will be drawn and how much from each — before you commit the delivery, with a clear note when there is a shortfall and why. This is the difference between “the system will pick something” and “you are shipping batch B22-441, 60 units, expiring March.”

6. The Expiry Lifecycle & Cockpit

Stock nearing, at, or past expiry moves through a small number of stages, each one a pair of stock movements so the whole loop stays auditable:

StageWhat happens
Expiry returnStock is pulled off the shelf and moved into quarantine — its own batch row, so the rest of a partly-expiring batch stays sellable.
Supplier claimA claim is raised against the supplier for quarantined stock, tracked as Raised, Partially Settled or Settled.
DisposalStock that is settled, rejected, or simply not worth claiming is recorded as a witnessed destruction.

The expiry cockpit

One screen answers the whole loop in four bands, each showing a total value (at cost, not MRP — this is money already spent) and the rows behind it:

  • At risk — what is expiring, bucketed 30/60/90/180 days, and what it is worth.
  • Coming back — what customers have returned that is not yet claimed against a supplier.
  • Owed to us — what is claimed and not yet settled, by supplier.
  • To destroy — what is settled or rejected and still physically held.

Every row links to the existing detail page for that record; the four list pages (Expiry Returns, Supplier Claims, Disposals, and Stock) still exist for detail work — the cockpit is the overview they cannot give on their own.

7. Licences, Recalls & the Controlled Register

Drug licences

Customers and suppliers each carry a drug licence number and expiry date. Field labels follow the jurisdiction chosen when the database was created — “Drug Licence No” (market-neutral), “DRAP Licence No” (Pakistan), or “Drug Licence 20B/21B” (India).

  • A delivery to a customer whose licence has expired is refused, naming the customer and the expiry date — not a warning.
  • Placing an order against a lapsed licence is allowed but warned, since the licence may be renewed before delivery day.
  • A purchase from a supplier with a lapsed licence is refused the same way a delivery is.
  • A customer or supplier with no licence recorded is never blocked — not every account trades in scheduled drugs.

Recall notices

Raising a recall notice against a batch moves all of its remaining stock into a hold — a recall is total, not partial, which is what distinguishes it from quarantine. Held stock stops being offered to any delivery immediately. Closing a notice does not return the stock to sellable — recalled stock leaves through the same claim and disposal path as expired stock.

Batch Trace (on the Reports page, searched by batch number) is the report to run the moment a manufacturer’s recall notice arrives. It lists the receipt, every delivery of that batch — customer, phone, address, date, quantity, invoice — and what remains on hand. A distributor has a legal obligation to contact every pharmacy that received a recalled batch; this is the report that makes that possible.

The controlled-substance register

Products under a drug schedule that requires a register (seeded automatically for your jurisdiction — see below) appear on the Register report over a date range, with batch number, expiry, quantity, and the receiving customer’s own drug licence number — the detail that answers whether they were entitled to receive it. On a market-neutral installation, where no schedule requires a register, this report is correctly empty.

Cold chain

A product can be marked with a storage condition (ambient, cool, refrigerated or frozen) and flagged as cold-chain. Delivering a cold-chain line prompts for a free-text note recorded against that delivery. The Cold Chain Exceptions report lists deliveries of a cold-chain product where no note was recorded — the gap a QA reviewer needs to see.

8. Invoicing — MRP, Free Goods & Tax

An invoice is a point-in-time legal record. Every line — description, batch, quantity, free quantity, MRP, price, discount and tax — is written once, at the moment the invoice is raised, copied from the delivery and the product as they stand that day. Editing the product afterward, including its price, MRP or tax rate, never rewrites an invoice already issued.

MRP

MRP is taken from the specific batch being sold, not the product in general — the same drug bought twice at different printed prices is ordinary, which is exactly why batches carry their own MRP. The Margin vs MRP report shows, by product and by customer, the discount off MRP as a percentage alongside cost margin.

Free goods

A “10+1” line ships eleven units and bills ten:

  • Stock depletes by the full eleven — a free unit is still a unit that left the warehouse.
  • The invoice charges for the paid ten only — a free unit never reaches the total.
  • Free units draw from the same FEFO-ordered batches as paid ones.

Trade schemes are offered as suggestions when building an order, so a salesman always sees and confirms what is being given away rather than having it applied silently.

Tax

Each product carries a tax rate defaulted from the jurisdiction, applied per line. The Tax Summary report totals net, tax and gross by rate over a date range — the same breakdown shown on the invoice itself.

9. Guide by Role

Salesman

Check the Dashboard for pending orders and overdue collections, place orders for customers, record payments you have collected, and check delivery status on your orders. You cannot cancel your own order once placed — ask office or admin.

Warehouse

Record purchases as stock arrives (with batch number and expiry for batch-tracked products), fulfill deliveries against pending orders or record a direct delivery, and use Stock and Stock Movements to check levels and history. Manual corrections go through Stock → Stock adjustment.

Office

Day-to-day invoicing and payment recording, following up on outstanding balances (Reports → Outstanding, or a customer’s ledger), maintaining master data (suppliers, products, customers), recording sales and purchase returns, and working the expiry cockpit — returns, claims and disposals.

Admin

Everything Office can do, plus user and salesman account management, deleting records blocked for other roles, stock adjustments, recall notices, and system settings including the database’s jurisdiction at creation time. Deletions that would break referential history (a supplier with products, a user with audit history) are rejected — deactivate instead.

10. All Pages

Dashboard

Your landing page, arranged for your role. Admin and office see a Needs attention band above everything else — stock value expiring soon, drug licences lapsing within 30 days, open recall notices, quarantined stock not yet claimed, and cold-chain deliveries missing their note. Each item links straight to where you would act on it; an empty band is normal and means nothing is currently wrong. Below it, a today-at-a-glance strip, KPI tiles, and panels for pending orders, overdue invoices, pending deliveries, low stock, recent purchases, sales returns and recent invoices. Salesmen see their own pending orders and overdue collections; warehouse sees pending deliveries and low-stock items. Quick-action buttons jump straight to the matching page with its create form already open.

Orders

List / filterBy status, customer, salesman, date range.
New orderStart typing to search for a customer, then add line items. A lapsed customer licence shows as a warning, not a block.
CancelOnly while pending and before any delivery exists.

Deliveries

New deliveryFrom an order (partial or full) or direct (no order). Shows the FEFO allocation preview per line.
StatusUpdate pending / delivered / cancelled.

Invoices & Payments

Raise invoiceFrom an order or a delivery — exactly one of the two. Snapshots MRP, price and tax.
Record paymentMultiple payments per invoice are fine; status updates automatically as it is paid down.
Delete paymentAdmin/office only — recalculates the invoice’s paid status.

Sales Returns, Purchase Returns & Expiry Returns

Sales returnFiled against an invoice; restores stock, reduces customer balance.
Purchase returnFiled against a supplier (optionally a specific purchase); deducts stock.
Expiry returnMoves batch stock into quarantine ahead of a supplier claim.

Supplier Claims & Disposals

Supplier claimsRaise, and track Raised / Partially Settled / Settled, against quarantined stock.
DisposalsWitnessed destruction records for stock that is settled, rejected, or not worth claiming.

Stock, Movements & Adjustments

StockCurrent level per product, with a low-stock filter.
Stock movementsFull audit trail of every quantity change, filterable by product, batch, type and date.
AdjustmentManual correction (admin/warehouse) — from the Stock page.

Compliance pages

RecallsRaise a notice against a batch, list open and closed notices, close one.
RegisterThe controlled-substance register, filtered by date range.

Master data

CustomersIncludes running balance, credit limit, minimum shelf life and drug licence; see Reports → Customer Ledger for full transaction history.
SuppliersIncludes drug licence; cannot be deleted while they still have products — deactivate instead.
ProductsCost/sale price, reorder level, batch-tracked flag, drug schedule, storage condition and cold-chain flag; cannot be deleted once it has stock movements.
SalesmenAdmin only — creates a linked login automatically.
UsersAdmin only — role assignment, activate/deactivate, password reset.

11. Reports

Fourteen tabs on one Reports page, with Print / Export for a clean, browser-printable version of whichever tab is open.

Commercial

Sales Summary, Salesman Performance, Outstanding balances, Stock Valuation, Top Products, Customer Ledger, Tax Summary, Margin vs MRP.

Expiry & compliance

Batch Trace (search by batch number), Expiry Ageing, Near-Expiry Exposure, Licence Expiry, Cold Chain Exceptions. The controlled-substance Register sits on its own page rather than the reports tabs; see Licences, Recalls & the Controlled Register.

12. Backup to Google Drive

An admin can schedule automatic backups of the active database to your own Google Drive account, with a retention limit on how many backups to keep. Restoring a downloaded backup registers it alongside your existing databases — it does not replace or activate anything on its own; switch to it deliberately from the Database screen once it looks right.

13. Status Reference

Orderpendingpartial (some delivered) → completed (fully delivered), or cancelled.
Deliverypendingdelivered, or cancelled.
Invoice paymentunpaidpartialpaid, based on payments recorded against it.
Supplier claimRaisedPartiallySettledSettled.
BatchAvailable, or held as Quarantine / RecallHold — never offered to a delivery in either state.

14. Tips & Things Worth Knowing

  • The jurisdiction is fixed at database creation and cannot be changed afterward — choose Pakistan, India or market-neutral deliberately when you create the database, since it decides which drug schedules and field labels apply.
  • Dates use your browser’s native date picker — stored and filtered as calendar dates, no time component.
  • Partial deliveries are normal: deliver part of an order now and the rest later; the order’s status reflects how much has gone out.
  • Multiple payments against one invoice are fine — record as many as needed until it is fully paid.
  • Credit limits on a customer record are informational — shown on the customer and in their ledger, but not automatically enforced against new orders.
  • Deleting vs. deactivating: most master-data deletes are blocked once a record has related history (a supplier with products, a customer with orders, a user with audit history) — deactivate instead of trying to force a delete.
  • First-time setup, roughly in this order: Settings (company info, jurisdiction) → Suppliers → Products (with drug schedule and batch-tracked flag) → Customers (with drug licence) → Salesmen → opening stock (via a stock adjustment, or a purchase, per product) → Users, if you need additional office/warehouse logins.
  • Currency symbol (Settings, admin only) is applied everywhere a monetary amount is shown across the whole system — set it once during first-time setup rather than per page.