The supplier prints their GSTIN on the invoice. The buyer GSTIN is sometimes missing. The photocopy only has the seller's header. The clerk knows the buyer GSTIN because it is their own company. But the scan does not carry it. The extractor cannot read what is not there. The row fails required fields. It goes to review.
This is the correct failure. Auto-export requires both GSTINs. The regime check needs two prefixes to compare. The duplicate key needs the seller GSTIN. Without the buyer GSTIN, the row is incomplete. It should not export. It should wait for a person.
invoice_number, invoice_date, taxable_value, total_value, seller GSTIN, buyer GSTIN, at least one line. Missing any of these: NEEDS_REVIEW. No auto-export. This is in validators/orchestrator.py.
No buyer GSTIN = NEEDS_REVIEW. Clerk fills from master. Not a guess.
What the clerk does
The clerk sees the row in review. Buyer GSTIN is blank. The clerk opens the company master or a spreadsheet. Types the buyer GSTIN. Re-runs validation. The regime check can now compare prefixes. The row may export. That is a person filling a required field. Not a guess. Not a paste from the supplier's GSTIN into the buyer field.
Filling the seller GSTIN into the buyer field is how you get a false intra-state. Seller 27, buyer 27 (wrongly filled). Regime says CGST+SGST. The real buyer is 07. The regime should be IGST. Cross-field GSTIN checks exist because that swap happens. See GSTIN validation.
Why buyer GSTIN matters
Your ITC is tied to your GSTIN. If you post a voucher without a buyer GSTIN, Tally does not know whose ITC this is. At filing, 2B is tied to your GSTIN. If the voucher does not carry it, the line may not appear in 2B. That is a self-inflicted gap. The CA will trace it. See 1 vs 2B vs 3B.
Regime needs both prefixes. Seller 27, buyer 07: IGST. Seller 27, buyer 27: CGST+SGST. Without buyer GSTIN, the check cannot run. The row goes to review. That is the correct failure.
Duplicates and empty GSTIN
Empty seller GSTIN rows are not forced unique. The duplicate key is invoice number plus seller GSTIN when both exist. Empty GSTIN rows can coexist. That is a different rule from required fields. Buyer GSTIN is required for auto-export. Seller GSTIN is required for auto-export and uniqueness. See duplicates.
Seed the GSTIN
If a large percentage of invoices lack buyer GSTIN, the mapping table is incomplete. Seed the buyer GSTIN from the master. After that, the clerk fills blanks from the master. That is the work. Your first batch shows how much of it there is.
- EntryLedger/validation
Required fields. Seller and buyer GSTIN required for auto-export.
- EntryLedger
validators/orchestrator.pyREQUIRED_SCALARS and GSTIN required checks.
Is buyer GSTIN required?+
Yes. Required field. No auto-export without it.
Scan does not have it?+
NEEDS_REVIEW. Clerk fills from master. Not a guess.
Empty seller GSTIN?+
Also required. Different from duplicate key rule.