anjan-talukdar / laravel-gst-invoice
A production-ready, lightweight, and extensible GST Invoicing Engine for Laravel supporting Goods (HSN) and Services (SAC).
Package info
github.com/anjan-talukdar/laravel-gst-invoice
pkg:composer/anjan-talukdar/laravel-gst-invoice
Requires
- php: ^8.1
- illuminate/database: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
README
A production-ready, lightweight, type-safe, and highly extensible GST Invoicing & Calculation Engine for Laravel applications. Designed specifically for e-commerce, SaaS, digital products, subscriptions, retail, and service businesses in India.
Note
Scope Notice: This package is a dedicated Invoice Generation & Calculation Engine. It does not handle GST return filing (GSTR-1/3B), Government e-Invoicing IRN APIs, or accounting ledgers, keeping the codebase lightweight, fast, and modular.
📚 Detailed Documentation
The full documentation is organized in the docs/ directory.
👉 Go to Documentation Index
Quick Links
Key Features
- 7 Native Document Types: Full support for
Tax Invoices,Quotations,Credit Notes,Debit Notes,Receipt Vouchers,Bills of Supply, andSimple Receipts. - Atomic Concurrency-Safe Sequences: Safe sequence generation per financial year using
lockForUpdate(). - Decoupled Payment Architecture: Fires rich Domain Events for custom application ledgers while remaining unopinionated about your payment gateways.
- Polymorphic Database Architecture: Cleanly link any of your existing models (e.g.
Order,Payment) directly toGstInvoice, and dynamically mapGstInvoiceItemto your ownOrderItemusing theitemablemorph relation. No hardcoded foreign keys. - Compliance Ready: Outputs structured GSTR-1 datasets and E-Invoice Schema v1.1 payloads.
- Standalone Calculation Engine: Run real-time tax math for checkout pages without writing to the database.
- Place of Supply (POS) Engine: Automatically routes Intra-State vs Inter-State GST.
Quick Installation
composer require anjan-talukdar/laravel-gst-invoice php artisan vendor:publish --tag="gst-invoice-config" php artisan vendor:publish --tag="gst-invoice-migrations" php artisan migrate php artisan gst-invoice:sync sequences
Read the full Installation Guide
Minimal Quick Start Example
use AnjanTalukdar\GstInvoice\Facades\GstInvoice; use AnjanTalukdar\GstInvoice\Data\InvoiceItemInput; use AnjanTalukdar\GstInvoice\Data\RecipientInput; $recipient = RecipientInput::make('Acme Technologies Ltd')->stateCode('27'); $items = [ InvoiceItemInput::make('Software Development', 1500.00)->quantity(40)->gstRate(18.0) ]; // Creates a Tax Invoice (INV/26-27/00001) $taxInvoice = GstInvoice::taxInvoice()->create($recipient, $items); echo $taxInvoice->invoice_number; // "INV/26-27/00001" echo $taxInvoice->total; // "70800.00"
For detailed guides, please refer to the Documentation.
Testing
Run the package test suite:
vendor/bin/phpunit packages/anjan-talukdar/laravel-gst-invoice
License
The MIT License (MIT). Please see License File for more information.