https://codegrape.com/category/scripts
Scripts
https://codegrape.com/category/scripts/javascript
JavaScript

InvoiceForge - Invoice Generator JS Library

InvoiceForge turns a plain JavaScript object into a correct, clean, print-ready invoice, in the browser or on Node.js. No framework, no build step, no dependencies: add one file (about 60 KB minified) and go.

WHY IT IS DIFFERENT:

  • - Always adds up: money is calculated in integer minor units, so 3 x 0.10 is exactly 0.30 and tax-inclusive prices reconcile to the exact gross amount.
  • - Payment QR code built in: UPI, SEPA/EPC bank-app QR, your own payment-link URL, or an invoice summary. The QR encoder is included (no library).
  • - Amount in words in English (international or lakh/crore) and Urdu.
  • - Real RTL support: Urdu and Arabic invoices mirror the full layout.
  • - Built for real billing: multi-tax, compound tax, withholding tax, tax-inclusive pricing, per-item discounts, invoice discount, extra charges, cash rounding.
  • - Get paid faster: late-fee calculator, early-payment discount box, installment schedules that tick off as payments arrive.
  • - Recurring invoices and numbering: generate 12 monthly invoices in one call, with patterns like INV-2026-0001 that reset every year.
  • - Tamper-evident verification code printed on every invoice.
  • - Safe: all text is escaped, colours/fonts/logo URLs are validated, CSV export is protected against formula injection.

INCLUDED:

  • - Invoice Builder app (app/index.html): a form where you type seller, client, item descriptions, tax and more, with a live preview. Open it in any browser, nothing to install.
  • - Playground with 5 sample invoices, plus basic and full example pages
  • - Full readable source, minified UMD and ES-module builds, TypeScript definitions
  • - Test suite (66 unit tests, 18-time-zone test, randomized fuzz test)
  • - Documentation (README)

OUTPUTS:

HTML fragment, full HTML page, print / Save as PDF, plain text, Excel-ready CSV, JSON, WhatsApp share link, QR as SVG.

NOTE:

InvoiceForge calculates exactly what you configure. Tax and invoice-format rules differ by country, so confirm your legal requirements with an accountant. PDF export uses the browser's print / "Save as PDF" (or any HTML-to-PDF tool on a server); no PDF engine is bundled.

FEATURES:

  • 4 themes (Modern, Classic, Minimal, Bold) + custom accent colour, font and CSS
  • 5 languages (English, Urdu, Arabic, French, Spanish) + your own
  • Status badge and watermark (Draft, Due, Partially paid, Paid, Overdue, Void)
  • A4 or Letter, print-optimised, responsive on phones
  • Same output in every time zone, Windows-friendly (High Contrast, safe file names, Excel CSV with BOM)
  • Works with plain HTML, Node.js, React, Vue, Angular
  • TypeScript definitions included

REQUIREMENTS:

Any modern browser (Chrome, Edge, Firefox, Safari) or Node.js 18 or newer. No server, no database.

INSTRUCTIONS:

1. Unzip the file.
2. Open app/index.html in your browser to try the Invoice Builder.
3. In your own page:
4. See README.md for every option, and examples/full.html for a complete example.

Appreciate This
Thank You!
by in