Back to Blog|Industry Solutions

Pharma & Medical Store Purchase Bill Entry Automation in Tally Prime

July 2, 202612 min readAkib Husain

Pharmaceutical retail is complex. Unlike general retail where items are tracked solely by SKU and price, pharmacies must monitor **batch numbers, manufacturing dates, and expiry dates** for every medicine.

Manually entering these details for hundreds of purchase items daily is slow and prone to errors. Automating purchase invoice imports directly into TallyPrime resolves this bottleneck. This guide details how to configure batch details, map distributor bills, and manage retail inventories.

Quick Answer: How to Automate Pharma Purchase Invoice Entry in Tally Prime (2026)?

TrulyInvoice automates pharma distributor purchase bill entry in Tally Prime by using Google Gemini AI OCR to extract medicine line items, HSN codes, unit rates, quantities, and GST allocations into F9 purchase vouchers via Port 9000 sync in 15 seconds.

  • Extracts multi-item pharma distributor invoices (Sun Pharma, Cipla, Zydus, Mankind).
  • Auto-matches medicine item names with Tally Prime stock masters.
  • Validates GSTIN formats and auto-determines CGST/SGST vs IGST tax splits.
  • Flat plans starting at ₹399/month subscription for unlimited pharma purchase invoice sync.

1. Enabling Batch-wise and Expiry tracking in TallyPrime

Before importing batch-aware purchase entries, configure your Tally company settings:

  1. From the Gateway of Tally, press F11 (Features).
  2. Set the option Enable Batches under Inventory to Yes.
  3. Set Maintain Expiry Dates for Batches to Yes.
  4. Save the settings by pressing Ctrl + A.

Once enabled, open your Stock Item Masters (Go to Alter > Stock Item > Select Item) and set Maintain in Batches to Yes, along with Track date of manufacture and Use expiry dates.

2. Database Schema for Pharmacy Purchase Imports

To automate data imports, ensure your distributor files contain these data columns:

Excel ColumnTally XML Node / TagPurposeData Constraints
Medicine NameSTOCKITEMNAMEIdentifies the stock profileMust match Tally stock database name
Batch NumberBATCHNAMEIdentifies the specific manufacturing batchAlphanumeric
Mfg DateMFGDATEDate the medicine was madeDD-MM-YYYY format
Expiry DateEXPIRYDATELast date the batch can be soldDD-MM-YYYY format
Billed QtyBILLEDQTYPhysical units purchasedNumeric value

3. Mapping Free Schemes (Actual vs Billed Quantity)

Pharma distributors frequently use scheme offers like "Buy 10 get 2 Free" (or 10+2 schemes). Recording these transactions manually is tedious:

To automate this in Tally, enable the Use separate actual and billed quantity columns setting under F11 Features. During import, map the total quantity received (12 units) to the Actual Qty field, and the payable quantity (10 units) to the Billed Qty field. TallyPrime will record the total inventory received while calculating the item cost based on the billed units.

4. Reconciling Drug Licenses and GST Rates

Compliance is a critical concern in pharmacy accounting. Ensure that your import templates check that vendors have active Drug License (DL) numbers and that the correct GST rates (5%, 12%, or 18% for medicines) are mapped during the data import step.

5. Handling Expired Stock Returns

Returning expired medicines to distributors requires recording Debit Notes in TallyPrime. Set up your import data flows to match the original purchase batch numbers when creating these return vouchers, ensuring your batch inventory balances remain accurate.

Automate Pharmacy Billing and Batch Tracking

TrulyInvoice extracts batch numbers, expiry dates, and scheme details from distributor bills automatically, helping your pharmacy keep stock levels accurate.

Start 14-Day Free Trial

A
Akib HusainExpert Reviewer

Founder & Chief Architect of TrulyInvoice

Last Verified: July 2, 2026
TallyPrime FY 2026-27 (v4.0+)
Ready to save time?

Stop Manual Voucher Entry.

TrulyInvoice automates your complete invoice workflow and syncs directly to Tally Prime.

No credit card · 14-day free trial

01

Upload Invoice

Drag & drop PDFs, scans, or photos.

02

AI Extraction

Line items, tax, and ledgers mapped.

03

1-Click Review

Verify extracted details on dashboard.

04

Direct Sync

Vouchers created instantly in Tally Prime.

Chat with us