SNC-WF-025 · Free Tier · GST Rule 46 & Invoice Generation

Validate GST Invoices, Compute Statutory Taxes & Generate Print-Ready PDFs

SNC-WF-025 · B2B Invoice PDF Generation and Statutory Field Validator (Free Tier)

A free, self-hosted Python utility that validates B2B order records against Indian GST Rule 46 statutory requirements, calculates intrastate vs interstate tax splits, converts amounts into Indian Rupee words (Lakhs and Crores), and renders standalone print-ready HTML invoices ready for instant PDF export.

PRODUCT SUMMARY AT A GLANCESNC-WF-025
Primary OutcomeValidates 15-character GSTINs, verifies HSN/SAC codes, computes exact CGST+SGST or IGST tax splits, and generates print-ready HTML/PDF tax invoices.
How It RunsSelf-Hosted Python 3.8+ (Runs on your own computer or server)
Setup ExpectationsFree to self-host on your own hardware. Free workflows never run on Sanocea infrastructure. Optional assisted setup: ₹500 one-time.
Verification StatusCode & Logic Tested: Tested on valid intrastate/interstate orders, state mismatches, invalid GSTINs, and missing HSN codes with 100% test pass rate
The 3-Step Process in Simple English
1. Input

B2B order export CSV containing line items, buyer details, and HSN codes.

2. Transformation

Validates GSTIN and HSN syntax, determines tax jurisdiction (interstate vs intrastate), computes statutory taxes, and translates totals to words.

3. Output

Print-ready HTML invoices ready for instant PDF saving and a CSV audit validation ledger.

Free to self-host. Want Sanocea to set it up? ₹500 one-time.

Setup scope covers installation on customer-controlled infrastructure, configuration of authorised integrations, functional testing and handover.

Hosting, third-party charges and ongoing support are excluded unless separately agreed. Free workflows must never run on Sanocea-hosted infrastructure.

Direct Download or Assisted Setup: Download the free toolkit below, or contact engineering on WhatsApp for ₹500 assisted setup on your machine.

What Goes Wrong in an Ordinary Working Day

Suppliers and B2B sellers lose revenue and face payment delays due to missing HSN codes, typo-ridden GSTINs, and wrong tax splits (CGST+SGST vs IGST) on invoices.

The Impact on Your Business & Customers

Enterprise buyers reject invoices with missing HSN codes or incorrect tax jurisdictions, delaying vendor payment cycles by weeks. Automated field validation ensures statutory compliance before invoices leave your desk.

What This Tool Does & What Changes for You

Reads your invoice line items CSV, validates seller/buyer GSTINs against Indian state codes, determines place of supply, calculates correct tax allocations, and writes print-ready HTML invoices and an audit ledger.

What Changes in Practice:

Finance teams stop wasting hours re-issuing credit notes for flawed invoices. Invoices are mathematically consistent, legally compliant, and ready for customer dispatch.

Concrete Before & After Example (Actual Code Output)

Demonstrates statutory validation and tax calculation for an interstate order.

INPUT: Raw B2B Order CSV RecordInput File
Invoice: INV-2026-002 | Seller: KA (29) | Buyer: MH (27) GSTIN: 27AAACR1234M1Z5 | HSN: 8471 | Item: Barcode Scanner | Qty: 10 @ ₹8,500 (Disc ₹500)
OUTPUT: Validated Statutory Split & HTML Invoicenormalized_inventory.csv
Status: PASS | POS: 27 (MH) | Supply Type: INTERSTATE\nTaxable: ₹84,500.00 | IGST (18%): ₹15,210.00 | Total: ₹99,710.00\nIn Words: Ninety Nine Thousand Seven Hundred and Ten Rupees Only\nArtifact: invoices_out/html/INV-2026-002.html generated

Invoice fully verified against GST Rule 46 requirements and ready for print or customer dispatch.

What Changed vs. What Remained Unchanged

✓ What Changed (Normalized):
  • Calculated exact interstate IGST allocation instead of erroneous dual taxes
  • Converted numeric grand total into statutory Indian Rupee wording
  • Generated pixel-perfect print-ready HTML tax invoice with embedded company and bank details
ℹ What Remained Unchanged:
  • Input order records preserved without destructive edits
  • Zero cloud API calls or data transmissions

What You Need Before Getting Started

  • B2B order export or line items CSV.
  • Optional seller profile JSON (company name, GSTIN, bank details).
  • Python 3.8+ on any computer or server.

Technical Setup Guidance:

Setup Difficulty & Expected Time

Step-by-Step Run Instructions (Zero-Code Terminal Run)

  1. Download and extract snc-wf-025-b2b-invoice-generator.zip.
  2. Place your B2B order line items in invoices.csv.
  3. Run: python3 invoice_generator.py --input invoices.csv --output-dir invoices_out --seller-config seller.json.
  4. Open generated HTML invoices in invoices_out/html/ and print to PDF.

What You Receive in the Download Archive

Every deliverable is clean, self-contained, and ready for immediate deployment. You receive the complete files, configuration templates, setup guides, and automated tests.

File NameDeliverable Description
invoice_generator.pyStandalone Python 3.8+ GST Rule 46 invoice engine and HTML generator
README.mdSetup guide, GST validation rules, and template customization
SETUP.mdQuickstart CLI guide and batch execution reference
COSTS.mdZero-cost operating disclosure
LICENSING.mdSanocea Open Workflow License (MIT Compatible)
fixtures/sample_invoices.csvBenchmark B2B order items with valid and flawed transactions
fixtures/seller_profile.jsonSample seller registration and bank details
tests/test_invoice_generator.pyAutomated test suite verifying GSTIN formats, tax splits, and HTML generation

Architecture Diagram & Tested Capabilities

For technical teams or developers assisting your business, below is the visual execution architecture and automated verification breakdown:

Validate GST Invoices, Compute Statutory Taxes & Generate Print-Ready PDFs Architecture Pipeline Diagram
⚡Deterministic execution flow: runs on your own compute without telemetry tracking.

Verification Disclosure

Pure Python 3.8+ standard library script. GST Rule 46 regex, POS state code verification, intra/interstate tax splits, Lakhs/Crores in-words conversion, and print CSS template. 8/8 tests passing.

GSTIN Regex & State Verification

Validates 15-character alphanumeric GSTIN syntax and verifies match with 2-digit state codes.

Fully Tested

Autonomous Tax Jurisdiction Allocation

Calculates 50/50 CGST+SGST split for intrastate transactions and 100% IGST for interstate shipments.

Fully Tested

Mandatory HSN/SAC Code Gate

Enforces 4, 6, or 8-digit HSN codes per statutory B2B threshold requirements.

Fully Tested

Standalone Print-Ready HTML & PDF Engine

Generates high-contrast CSS print invoices with embedded bank details and signature blocks.

Fully Tested

Rupee Number-to-Words Generator

Translates invoice grand totals into statutory Indian Rupee Lakhs and Crores phrasing.

Fully Tested

Documented Limitations & Third-Party Costs

We believe in complete transparency. Review the documented technical boundaries and external service fee breakdown below prior to obtaining the package:

⚠️Documented Boundaries & Considerations

  • Statutory Field Validation: Verifies structure and tax logic against GST Rule 46 standards; does NOT connect to the government e-invoice NIC portal API.
  • Customer-Controlled Infrastructure: Runs locally on your machine or server; does not transmit client data to Sanocea.
  • Offline Document Generation: Operates offline with zero cloud rendering costs.
ComponentEstimated CostDetails & Free Tier Allowances
B2B Invoice Validation & PDF Toolkit₹0 (Free to self-host)Download full source code and self-host
Optional Assisted Setup₹500 one-timeAssisted installation, environment setup, and handover
Third-Party Services₹0 additionalRuns offline with zero external API fees

Platform Compatibility & Technical Specifications

Operating System
Linux, macOS, Windows
Runtime / Python
Python 3.8+
Supported Platforms
TallyPrime, Zoho Books, QuickBooks, Custom ERP
Required Inputs
  • B2B order CSV with buyer GSTIN, place of supply, HSN codes, quantities, and rates
Generated Outputs
  • Print-ready standalone HTML invoices with print CSS for instant A4 PDF export
  • invoice_validation_ledger.csv containing statutory audit status and error reasons
Free Self-Hosted SoftwareInstant Download · Optional ₹500 Setup

Download or Set Up SNC-WF-025

Receive the complete distributable archive containing invoice_generator.py, step-by-step setup guides, mock fixtures, and automated test suites.

Free to self-host. Want Sanocea to set it up? ₹500 one-time.

Setup scope covers installation on customer-controlled infrastructure, configuration of authorised integrations, functional testing and handover.

Hosting, third-party charges and ongoing support are excluded unless separately agreed. Free workflows must never run on Sanocea-hosted infrastructure.

Download Free Package (.zip)Chat on WhatsAppWe reply within 2 business days (Monday to Saturday, 9:00 AM to 9:00 PM IST)

Frequently Asked Questions

Does this tool require external cloud rendering engines or binary dependencies?

No. It generates standalone, clean HTML invoices using embedded CSS and print media rules. You can view them in any web browser and use the browser print dialog to save as PDF, with zero external binary or cloud costs.

How does it determine whether to charge CGST+SGST or IGST?

The engine compares the 2-digit state code of the seller against the buyer place of supply (POS). If they match, it divides the tax rate equally into CGST and SGST. If they differ, it applies 100% of the tax rate as IGST.

Does it validate GSTIN format and state prefixes?

Yes. It verifies that the GSTIN is 15 alphanumeric characters matching statutory regex and checks that the first two digits match the declared state code.

B2B Invoice PDF Generation: Indian GST Rule 46 Field Verification and Tax Allocation

How B2B suppliers validate 15-character GSTINs, compute interstate IGST vs intrastate CGST+SGST tax splits, and generate print-ready HTML/PDF tax invoices with zero cloud dependency.

Read Field Guide on Sanocea Insights →

Explore Related Self-Hosted Tools

C02Managed Service

See Where Every Order's Money Went & Recover Lost Marketplace Revenue

E-Commerce Settlement & Fee Matcher

An enterprise marketplace reconciliation engine that automatically audits bank payout sheets from Amazon, Flipkart, and Myntra against your original order records. It isolates commission overcharges, unexpected weight penalties, uncredited customer returns, and missing remittances—generating ready-to-file dispute spreadsheets that recover thousands of rupees in lost margin every month.

SNC-WF-024Self-Hosted Python 3.8+

Match Bank Deposits with Payment Gateway Payouts & Detect Fee Variances

Bank Deposit and Payout Settlement Matcher (Free Tier)

A free, self-hosted Python tool that reconciles bank statement credit transactions against payment gateway settlement exports (Razorpay, Cashfree, Stripe, Amazon, Shiprocket). It matches UTR references, parses bank narration strings, flags gateway MDR fee and GST discrepancies, and isolates orphan deposits and missing payouts.

SNC-WF-026Self-Hosted Python 3.8+

Age Outstanding Receivables, Accrue Late Interest & Prioritize Collections

Overdue Receivables Aging and Reminder Queue (Free Tier)

A free, self-hosted Python tool that ingests accounts receivable exports, sorts outstanding balances into standard aging buckets (Current, 1-30, 31-60, 61-90, 90+ days), computes accrued contractual interest (18% p.a.), and generates a prioritized collections work queue with pre-drafted reminder emails and supply hold notices.