The first two articles in this series covered why pharmaceutical manufacturers need more than Excel and why ERPNext deserves attention. This article is hands-on: configuring ERPNext from day one for a generic drug manufacturer.
The content draws from a structured 10-week exploration of ERPNext for Thai generic pharma. All product names and figures are illustrative.
Starting Point: Create a Demo Company
Navigate to Setup → Company → New
| Field | Example Value | Note |
|---|---|---|
| Company Name | Generic Pharma Demo Co., Ltd. | Demo name |
| Abbreviation | GPD | Used as document prefix |
| Default Currency | THB | Thai Baht |
| Country | Thailand | Auto-loads tax template |
| Industry | Pharmaceutical |
On Save, ERPNext auto-generates a Chart of Accounts based on the selected country.
Warehouse Configuration: Mapping GMP Zones
In GMP, each storage area has specific status and conditions. Incoming raw materials must remain on "hold" until QC approves them. ERPNext handles this through separate, discrete Warehouses.
Navigate to Stock → Warehouse → New and create these six:
| Warehouse | GMP Role |
|---|---|
| Raw Material Store | Approved materials, available for use |
| Quarantine Store | Incoming materials, pending QC |
| Work in Progress | Materials in active production |
| Finished Goods Store | FG awaiting QC release |
| Released Store | QC passed, available for dispatch |
| Rejected Store | Failed batches or lots |
Why separate Quarantine? GMP requires physical or status segregation between unapproved and approved materials. Since ERPNext uses warehouse transfers rather than status fields, moving stock from Quarantine to Raw Material Store effectively represents QC approval. Track whether this logic satisfies your SOP and auditor expectations.
Item Master: The Foundation of Inventory
In ERPNext, every purchased, manufactured, or sold entity is an Item — APIs, excipients, packaging materials, and finished products alike.
Create Item Groups First
Navigate to Stock → Item Group → New and create:
- API
- Excipient
- Packaging Material
- Finished Product
Example: API Item
Navigate to Stock → Item → New
Atorvastatin Calcium:
| Field | Value |
|---|---|
| Item Code | API-ATO-001 |
| Item Name | Atorvastatin Calcium |
| Item Group | API |
| UOM | kg |
| Has Batch No | ✓ (critical) |
| Has Expiry Date | ✓ |
| Is Purchase Item | ✓ |
| Default Warehouse | Raw Material Store |
Important: Enable "Has Batch No" from the start. Once transactions exist against an Item, this setting cannot be changed.
Example: Finished Product Item
Atorvastatin Tablet 20mg:
| Field | Value |
|---|---|
| Item Code | FG-ATO-020 |
| Item Name | Atorvastatin Tablet 20mg |
| Item Group | Finished Product |
| UOM | tablet |
| Has Batch No | ✓ |
| Has Expiry Date | ✓ |
| Is Manufactured Item | ✓ |
| Is Sales Item | ✓ |
| Default Warehouse | Finished Goods Store |
Recommended Naming Convention
A structured Item Code system makes reporting and filtering significantly easier:
“ API-[3-letter-INN]-[sequence] EXC-[abbreviation]-[sequence] PKG-[type]-[product]-[sequence] FG-[INN]-[strength in mg] “
Examples:
API-ATO-001= Atorvastatin APIEXC-MCC102-001= Microcrystalline Cellulose PH102PKG-BLISTER-ATO20= Blister film for ATO 20mgFG-ATO-020= Atorvastatin 20mg tablet
What ERPNext Is Missing for Pharma
After initial setup, you’ll notice gaps in the Item master for pharmaceutical use:
- Pharmacopoeial grade (USP, BP, Ph.Eur.)
- Retest date (separate from expiry date)
- Approved supplier list per material
- Certificate of Analysis linkage per batch received
These require Custom Fields in Frappe — achievable without coding using ERPNext’s built-in Customize Form tool.
Observation-Logging Practice
The first setup is not just configuration — it’s a structured opportunity to understand how the system thinks. Recommended practice: log every moment you notice:
- "The system requires this workflow step — does it match our SOP?"
- "This field doesn’t exist — custom field needed?"
- "Would this report satisfy an auditor?"
These observations become the raw material for a Gap Analysis — the most valuable output of the exploration phase.
Summary
Week 1 setup covers the three foundational layers:
- Company — the parent record for all ERPNext data
- Warehouse — GMP zone logic mapped to ERPNext warehouse transfers
- Item Master — APIs, excipients, packaging, and finished products with batch tracking enabled
Next up: testing Inventory transactions — receiving an API into a quarantine batch, simulating QC approval via warehouse transfer, and evaluating how well the traceability report answers the auditor’s first question: "Where did this batch come from?"
