ZYNCALGO
Home Trading Accounts

InvoiceFlow

v3
PDF to Tally-Ready Excel & XML
Complete User Guide
MasTec India LLP · April 2026

1. Getting Started

InvoiceFlow is a single-file HTML application that extracts data from invoice PDFs using Claude AI and generates Tally-importable Excel and XML files. No server, no installation, no dependencies.

Files Required

FilePurpose
index.htmlThe application (~3000 lines, single file)
LAUNCH_EDGE.batLaunches Edge with API access flags
README.txtQuick start instructions

How to Launch

1
Place all files in one folder (e.g., C:\InvoiceFlow)
2
Double-click LAUNCH_EDGE.bat

Edge opens with a dedicated profile. Your normal browsing is unaffected.

3
Enter your name on the login screen
InvoiceFlow PDF to Tally-Ready Excel Enter your name… Continue →
Figure 1: Login screen — enter your name to identify extractions in history
💡
Your name is saved in the browser. Next time you launch, you go straight to the app.

2. Setting Up Your API Key

InvoiceFlow uses the Claude API to read and understand invoice PDFs. You need an Anthropic API key.

1
Get your key from console.anthropic.com

Create an account, go to API Keys, and generate a new key (starts with sk-ant-api03-...).

2
Paste it in the API Key field on the Extract tab
3
Check "Remember my API key" to save it
4
Click "Test API Key" — green checkmark confirms it works
InvoiceFlow ⚡ Extract 🕒 History 📊 Dashboard 📒 Ledger Master ANTHROPIC API KEY sk-ant-api03-•••••• ✅ API key saved Key valid ✓ 📄 Drop invoice PDFs here Drag & drop, browse, or Ctrl+V to paste Browse Files
Figure 2: Extract tab — sidebar navigation, API key section, and drag-drop zone
⚠️
Your API key is stored only in your browser's localStorage. It is never sent anywhere except directly to the Anthropic API. Backup files intentionally exclude it for security.

3. Extracting Invoices

Adding PDF Files

Three ways to add invoice PDFs:

Drag & Drop: Drag files from File Explorer onto the drop zone.

Browse: Click the drop zone to open a file picker.

Ctrl+V Paste: Copy a PDF in File Explorer, then press Ctrl+V anywhere on the page.

Running Extraction

1
Add one or more PDFs to the queue
2
Click "Extract to Excel"

Files are processed in parallel. Each shows real-time status: Queued → Extracting → Done.

3
Review extracted data in the results table
📄 Exahive-Apr-01.pdf 245 KB DONE 📄 Beehive-Security-Mar.pdf 180 KB DONE ✓ 2 / 2 done Extracted Invoices FILE INVOICE # VENDOR TOTAL GST TYPE Exahive [1/2] EPL/26-27/Apr-01 Exahive Pvt Ltd ₹3,93,594.62 INTRA Exahive [2/2] EPL/26-27/Apr-02 Exahive Pvt Ltd ₹56,795.76 INTRA Beehive-Sec.pdf BH/2025-26/1042 Beehive Workforce ₹1,24,580.00 INTER
Figure 3: File queue with progress, results table showing multi-invoice PDF detection ([1/2], [2/2])
📌
A single PDF can contain multiple invoices. InvoiceFlow detects different invoice numbers automatically and creates separate rows.

Validation & Warnings

After extraction, the app checks for: missing GSTIN, missing invoice number, and duplicate invoices already in history.

💡
After exporting to Tally, click "Clear & Start Fresh" to reset the queue for the next batch. History and Ledger Master are unaffected.

4. Tally Export — Excel & XML

After extraction, click the Tally Export button to open the export configuration modal.

🧾 Tally Purchase Voucher Export BOOKS / BRANCH Vizag 📖 AUTO-DETECTED FROM RECIPIENT GSTIN VOUCHER PREFIX 2026-27/Viz/ START # 1 LINE ITEM TALLY PARTY EXPENSE LEDGER COST CENTER(S) TDS % GST #EPL/26-27/Apr-01 Rent for Apr 2026 Exahive ₹3,33,555 EXAHIVE PVT RENT EXPENSE FACILITY Amt + Split CC 10 INTRA 📥 Gen Excel 📥 Gen XML
Figure 4: Tally export modal — books auto-detected as Vizag, per-line-item ledger mapping with CC split option

Excel Output

Separate KA and VIZ sheets with voucher numbering. Each line item becomes a row with Party Name, Expense Ledger, Amount, Cost Center, GST entries, and TDS.

XML Output

Click "Generate Tally XML" for direct import via Gateway of Tally → Import Data. Uses standard ENVELOPE > TALLYMESSAGE > VOUCHER structure.

GST Auto-Detection

ConditionGST TypeLedgers Used
Vendor & recipient in same state (same first 2 digits)IntrastateCGST + SGST
Different statesInterstateIGST only

5. Ledger Master — Rules Engine

The Ledger Master auto-maps invoices to expense ledgers based on keywords and vendor names.

Rule Matching Priority

PriorityMatch TypeScore
HighestVendor + Keywords both match3
MediumKeywords only (any vendor)2
LowestVendor only (no keywords)1

Keywords are comma-separated. All must appear in the description. Example: security, guard matches "Security Guards Charges for March".

Adding a Rule

Fill in Keywords, Vendor, Expense Ledger, Cost Center, TDS Section at the top, then click "+ Add".

📒 Ledger Master Keywords… Vendor… Expense ledger… Cost center… TDS % + Add KEYWORDS VENDOR TALLY NAME EXPENSE LEDGER COST CENTER TDS TDS % security, guard Beehive BEEHIVE WORK SECURITY EXP FACILITY 194C 2% ✏️🗑️ rent Exahive EXAHIVE PVT RENT EXPENSE FACILITY 194I 10% ✏️🗑️ 📋 Import from History 📥 Export Mappings 🧹 Remove Dupes 📖 Tally Ledgers & Cost Centres Upload per branch for searchable dropdowns 🏢 Bangalore Upload 342 ledgers, 28 CCs 🏢 Vizag Upload 295 ledgers, 15 CCs
Figure 5: Ledger Master — rules table, add form, action buttons, and per-branch ledger/CC uploads

Auto-Learn on Export

When you generate a Tally export, new mappings you entered are automatically saved as rules. The system learns from your work — teach it once, it remembers forever.

TDS Section → Ledger Mapping

SectionTally Ledger
194CCONTRACTOR TAX PAYABLE
194JFRANCHISE & OTHER TAXES PAYABLE
194ITDS ON RENT
192PAYROLL TAXES PAYABLE - OTHER
194QTDS ON PURCHASE OF GOODS 94Q
195TDS ON NON-RESIDENTS
💡
Selecting a TDS section auto-fills the TDS Ledger name. Works in both add form and edit mode.

6. Tally Ledger & Cost Centre Lists

Upload your Tally chart of accounts for searchable autocomplete everywhere in the app.

Per-Branch Uploads

UploadKeyAuto-detect Columns
BLR Ledgersif_tally_ledger_blrLedger Name / Name / Particulars
BLR Cost Centresif_tally_costcentre_blrCost Centre / Cost Center / Department
VIZ Ledgersif_tally_ledger_vizSame as above
VIZ Cost Centresif_tally_costcentre_vizSame as above

Multi-Word Fuzzy Search

Type multiple words in any order:

You TypeFinds
sec expSECURITY EXPENSE
cont taxCONTRACTOR TAX PAYABLE
itc cgITC CGST Input
rent tdsTDS ON RENT

Results ranked: names starting with your first word appear first. Matches highlighted in bold. Dropdown auto-flips upward if no space below.

7. Cost Center Splits

When a single expense needs allocation across multiple cost centers:

1
Click "+ Split CC" below the cost center field
2
Enter each cost center name and amount
3
Watch the balance indicator
✅ Balanced Example Security Expense — Total: ₹1,00,000 FACILITIES 60,000 ADMIN 40,000 + Split CC ✓ Balanced: 1,00,000 ⚠ Unbalanced Example Background Verification — Total: ₹28,000 OSP 10,000 UTS 10,000 ⚠ Unallocated: 8,000 of 28,000 ❌ Export blocked until splits balance!
Figure 6: CC split — balanced (left) vs unbalanced with warning and export blocked (right)

Auto-Fill Last Row

When you tab out of an amount field, the last CC row auto-fills with the remaining balance. Example: total ₹28,000, first CC = ₹10,000 → second CC auto-fills ₹18,000.

⚠️
Export is blocked if any CC split doesn't balance. The error message shows exactly which invoice and line item has the mismatch.

8. AI Auto-Suggest

In the Tally export modal:

"AI Suggest All" — suggests ledgers for all unmapped line items at once.

Per-line ✨ button — suggests for just that one line item.

Claude analyzes each line item's description, HSN/SAC codes, and vendor name against standard Indian accounting practices.

💡
AI suggestions fill only empty fields — they never overwrite values you've already entered.

9. Books & Branch Auto-Detection

Detection Logic

Recipient GSTINBooksPrefixGST Ledgers
29ABNFM4048G1ZXKarnataka2026-27/BLR-KA/ITC CGST / State GST / IGST Input
29ABNFM4048G2ZWKarnataka ISD2026-27/BLR-KA/ITC xxx Input - ISD
37ABNFM4048G1Z0Vizag2026-27/Viz/ITC CGST / State GST / IGST Input

Fallback Matching

Exact GSTIN → PAN-based fuzzy (ABNFM4048G + state code) → Manual selection

📌
Saved config never overrides auto-detection. Books are freshly detected every time you open the Tally modal.

10. History & Dashboard

History Tab

Every extraction is logged with: user name, PDF file name, invoice number, vendor, total amount, timestamp, and duplicate flag.

Search: Filter by any field. Export to Excel: Download full history. Clear: Double-click to confirm (Ledger Master unaffected).

Dashboard Tab

Aggregate stats: total invoices processed, unique vendors, active users, duplicates detected. Also shows top vendors by count and activity per user.

11. Backup & Restore

All data lives in the browser's localStorage. Use Backup/Restore to transfer between PCs.

💾 Backup Exports ✅ Ledger Master rules ✅ Tally config (prefix, voucher type, etc.) ✅ BLR + VIZ ledger lists ✅ BLR + VIZ cost centre lists ✅ Extraction history ✅ User name & theme ❌ API key (excluded for security) Click 💾 → Downloads JSON 📂 Restore on New PC 1️⃣ Old PC: Click 💾 → save JSON file 2️⃣ Copy HTML + BAT to new PC 3️⃣ Launch → Click 📂 → Select backup 4️⃣ Shows summary → Restores → Reloads ✓ All settings, rules, history restored! ⚠ Re-enter API key on the new machine
Figure 7: Backup includes all settings; Restore transfers everything to a new PC in seconds

12. Tips & Troubleshooting

IssueSolution
API key errorVerify at console.anthropic.com. Check internet connection.
Can't scrollUse the latest index.html. Older versions had overflow issues.
Wrong books detectedCheck Recipient GSTIN matches one of the three configured GSTINs.
Data lost after HTML updateData is in browser localStorage, not the file. Same launcher = same data.
Buttons not workingEdge security blocks confirm(). All confirmations use double-click pattern.
CC split export failedAmounts must sum to the line item total. Check the balance indicator.

Keyboard Shortcuts

ShortcutAction
Ctrl+VPaste PDF from clipboard
↑ ↓Navigate autocomplete suggestions
EnterSelect highlighted suggestion
EscapeClose autocomplete dropdown

localStorage Keys Reference

KeyContents
if_ledger_rulesLedger Master rules
if_tally_configTally export settings
if_tally_ledger_blr / vizChart of accounts per branch
if_tally_costcentre_blr / vizCost centres per branch
if_historyExtraction history
if_api_keySaved API key
💡
Take regular backups! Use the 💾 button weekly or before any browser profile cleanup.
ZYNCALGO · Discipline Over Luck
📞 +91 9986829907
📍 Siri Mane, No 14, 1st Main Road, Doddabidarakallu, Bangalore 560073
© 2026 ZyncAlgo · zyncalgo.in