Tally Sales Invoice Processing
Extracts header, parties, GSTIN, HSN/SAC line items, and CGST/SGST/IGST splits from Tally-issued tax invoices and validates them before AR booking.
The Problem
Mid-market sellers running Tally export 200–600 sales invoices a month as PDFs, and an AR clerk re-keys each one into the receivables ledger: invoice number, date, buyer GSTIN, place of supply, every HSN/SAC line, taxable value, and the CGST/SGST or IGST split. At a 50-invoice day, a clerk averages three to four minutes per document, which is roughly three full working hours lost to typing fields that already exist on the PDF.
The error rate compounds the time cost. Rule 46 of the CGST Rules prescribes sixteen mandatory particulars on a tax invoice, and Section 31 makes the seller liable for issuance accuracy; a mistyped buyer GSTIN, a wrong place-of-supply code, or an IGST charge where CGST+SGST was due will surface as a GSTR-1 vs GSTR-3B mismatch and again as a GSTR-2B reconciliation dispute on the buyer's side. Each such break requires a credit note under Section 34 and a re-issue, which costs the AR team more time than the original invoice.
The workflow scales poorly past roughly 150 invoices per day. Above that volume, controllers either hire a second clerk or let booking fall behind close, both of which break the seven-day GSTR-1 filing rhythm and delay revenue recognition under Ind AS 115.
Why It Matters: Context
A Tally tax invoice is structurally consistent — title block, seller GSTIN, buyer GSTIN with bill-to and ship-to, HSN/SAC table, CGST and SGST columns when intra-state and IGST when inter-state, and a grand total — which makes deterministic extraction tractable. The validation surface is large, however: the GSTIN checksum (MOD-36 over 14 characters), the place-of-supply rules in Section 10/12 of the IGST Act, the HSN digit requirement under Notification 78/2020-Central Tax (4 digits below ₹5 crore turnover, 6 digits above), and the rate schedules under Notification 1/2017-Central Tax (Rate) all have to hold simultaneously.
Mid-market finance teams of 50–500 active customers rarely have a tax engine bolted onto Tally; the validation lives in the AR clerk's head and on a printed rate chart. When a clerk leaves or a voucher series is reset at year-end, the institutional knowledge resets with them.
The downstream consequence is concrete: an intra-state invoice booked as IGST, or a CGST+SGST invoice issued to an out-of-state buyer, fails the buyer's GSTR-2B match, the buyer raises a debit note, and the seller's input tax credit chain on the corresponding purchases is questioned during a Section 65 audit.
What This Workflow Automates
- Classifies the uploaded PDF as a Tally
TAX_INVOICEusing the title block, GSTIN pattern, and HSN table layout, rejecting non-invoice documents before extraction. - Extracts the header (invoice number, invoice date, place of supply), seller and buyer blocks (name, address, GSTIN), each HSN/SAC line (description, HSN, quantity, rate, taxable value), and the CGST/SGST/IGST and grand-total rows.
- Runs the GSTN MOD-36 checksum on both GSTINs and rejects either with the failing character position cited; holds the invoice until a corrected GSTIN is supplied.
- Compares the first two digits of seller and buyer GSTIN against the place-of-supply code and confirms CGST+SGST for intra-state and IGST for inter-state, flagging mismatches as a classification error before posting.
- Recomputes each line's taxable value × applied rate to two decimals, applies Section 170 CGST rounding to the nearest rupee on totals, and flags any variance greater than ₹1 between the computed and printed grand total with the offending line identified.
- Validates HSN digit length against Notification 78/2020-Central Tax for the seller's turnover band and looks up the applied GST rate against the Schedule II/III band for that HSN, raising a rate-mismatch exception with both the applied and expected rates.
- Checks the invoice number against the financial-year series register and blocks duplicates with a reference to the prior occurrence, satisfying Rule 46(b) of the CGST Rules.
All of this happens in roughly 8 seconds per invoice with deterministic outputs every controller can audit.
Edge Cases We Simulate
The workflow ships with a battery of synthetic test scenarios that exercise every failure mode we have seen in real-world data. Each scenario produces a deterministic outcome that an auditor or controller can verify in seconds.
| Scenario | What's wrong | Expected outcome |
|---|---|---|
| Intra-State vs Inter-State Tax Mismatch | Invoice carries CGST+SGST but the buyer's GSTIN state code differs from the seller's, or carries IGST when both parties are in the same state. | Workflow compares the first two digits of both GSTINs against the place of supply and flags the invoice as an intra/inter-state classification error before posting. |
| GSTIN Checksum Failure | Buyer or seller GSTIN is 15 characters but fails the GSTN checksum algorithm, indicating a typed or OCR'd error. | GSTIN is rejected with the failing character position cited; invoice is held until a corrected GSTIN is supplied. |
| Line-Item to Grand Total Drift | Sum of taxable values plus CGST plus SGST plus IGST does not tie to the printed grand total, often due to rounding or a missing line. | Workflow recomputes line totals to two decimals, applies Section 170 CGST rounding, and flags a variance greater than ₹1 with the offending line. |
| Missing or Invalid HSN/SAC | Line item shows no HSN/SAC, or fewer digits than required by Notification 78/2020-Central Tax based on the seller's aggregate turnover. | Line is flagged with the minimum HSN digit requirement (4 or 6) for the turnover band; invoice cannot be approved until corrected. |
| Tax Rate Inconsistent With HSN | GST rate applied on a line (e.g., 12%) does not match the rate notified for the HSN code under Schedule II/III of Notification 1/2017-Central Tax (Rate). | Workflow looks up the expected rate band for the HSN and raises a rate-mismatch exception with both the applied and expected rates. |
| Duplicate Invoice Number in Series | Tally exports occasionally repeat an invoice number across financial years or when voucher series are reset, violating Rule 46(b) CGST Rules. | Invoice number is checked against the series register for the financial year; duplicates are blocked with a reference to the prior occurrence. |
Sample Documents
Download or inspect the seeded sample files used to demonstrate this workflow:
| File | Document type | Notes |
|---|---|---|
tally_sales_invoice.pdf |
Sales Invoice | Tally-generated B2B tax invoice with seller and buyer GSTIN, HSN/SAC line items, CGST+SGST split, and grand total. |
Sample Results
On a representative Tally sales invoice the workflow extracts the full header, both GSTIN blocks, every HSN/SAC line with its taxable value and rate, and the CGST/SGST or IGST split, then runs seven validations covering GSTIN checksum, intra-vs-inter-state classification, line-to-total arithmetic within ₹1 tolerance, HSN digit length, rate-band lookup, place-of-supply consistency, and invoice-number uniqueness in the financial-year series. Manual booking of the same invoice averages 3.5 minutes; the workflow returns a posted JSON payload in under 10 seconds, a roughly 20× reduction.
The validation that most consistently catches real errors is the intra-state vs inter-state tax mismatch — a Tally voucher class set once for an in-state buyer continues to apply CGST+SGST after that buyer relocates and updates their GSTIN, and the workflow catches the state-code drift on the very first invoice issued post-change rather than at GSTR-1 filing two weeks later.
Why Automation Wins Here
For a seller issuing 400 invoices a month, the workflow converts roughly 23 hours of manual keying and validation into approximately 55 minutes of automated processing plus controller review of exceptions only — a 96% time reduction — and replaces a four-error-per-hundred typing rate with deterministic checks that either pass or produce a cited exception.
The output is an audit-ready artifact: extracted JSON, the seven validation results with regulation references (Rule 46, Section 170, Notification 78/2020, Notification 1/2017), and the source PDF, all linked to the AR voucher number. It drops directly into the controller's GSTR-1 reconciliation workpaper and the statutory audit file under SA 230 documentation requirements.
Frequently Asked Questions
Yes. The extractor captures every field enumerated in Rule 46 — supplier name, address and GSTIN, consecutive invoice number, date of issue, recipient details, HSN/SAC, description, quantity, taxable value, rate and amount of CGST/SGST/IGST, and place of supply. Any missing mandatory field blocks AR booking until corrected.
Validated invoices are written back as Sales vouchers via the Tally ODBC/XML gateway, mapped to the configured sales ledger and CGST/SGST/IGST duty ledgers. The voucher carries the original invoice number, party ledger, and HSN-wise breakup so that GSTR-1 export from Tally remains intact.
Yes. If the seller's aggregate turnover exceeds the ₹5 crore threshold, the workflow checks for the IRN and signed QR code. Invoices missing an IRN are flagged as non-compliant with Rule 48(4) and held for the seller to generate the IRN on the IRP before AR booking.
Yes. Each entity GSTIN is registered as a distinct issuing branch with its own invoice series, place of business, and state code. The workflow routes the invoice to the correct GSTIN based on the seller block on the PDF and validates that the place of supply aligns with that GSTIN's state.
Every invoice carries a hash of the source PDF, the extracted JSON, the validation rule outcomes, the user who approved it, and the Tally voucher ID returned on posting. The trail is immutable and exportable in the format expected by ICAI SA 230 working-paper retention.
The workflow maintains an invoice-level register keyed on GSTIN + financial year + invoice number. At month-end it diffs the register against the GSTR-1 JSON exported from Tally, flagging invoices that were booked but not reported (or vice versa) so that amendments can be filed within the Section 37(3) window.
This workflow is deployed and live in our demo environment. Upload your own documents to see it in action.
Open the live workflow