m-india: India Regional Adapter
India-specific compliance (GST, E-Invoice, E-Way Bill, Payroll) for Framework M.
1. Overview
Section titled “1. Overview”This module is the India Adapter, implementing the m-regional port. It handles all regulatory requirements for businesses operating in India.
Depends on:
m-regional,m-invoice,m-hr-core.
2. Port Implementation
Section titled “2. Port Implementation”m-india implements the core regional protocols:
- RegionalTaxProvider: Computes CGST, SGST, IGST based on Place of Supply.
- RegionalComplianceRegistry: Integrates with NIC/GSTN portals for IRN and EGV.
- RegionalIDValidator:
validate_tax_id: Validates GSTIN (using checksum).validate_compliance_id: Validates IRN, E-Way Bill No.validate_entity_id: Validates PAN, TAN, Aadhaar.
3. Finance & Tax (GST)
Section titled “3. Finance & Tax (GST)”Extends m-invoice and finance DocTypes via Mixins.
GSTInvoiceMixin
Section titled “GSTInvoiceMixin”Added to SalesInvoice, PurchaseInvoice.
gstin: Party’s GST Number.place_of_supply: GST State Code (e.g., “27”).gst_category: Regular, SEZ, Deemed Export.
GSTItemMixin
Section titled “GSTItemMixin”Added to InvoiceItem.
hsn_code: HSN (Goods) or SAC (Services).gst_rate: Tax percentage (5%, 12%, 18%, 28%).
4. WMS & Supply Chain (E-Way Bill)
Section titled “4. WMS & Supply Chain (E-Way Bill)”Integrates India compliance into warehouse movements.
E-Way Bill Integration
Section titled “E-Way Bill Integration”Triggered on DeliveryNote submission in wms.
- Logic: If transaction value > ₹50,000 (standard threshold) and involves transport, prompt/auto-generate E-Way Bill.
- DocType:
EWayBillrecords are linked to the Distribution Center’sDeliveryNote.
5. People & HR (Payroll)
Section titled “5. People & HR (Payroll)”Handles Indian statutory deductions.
- Professional Tax (PT): State-based slabs.
- Provident Fund (PF): Employer/Employee contributions (12%).
- ESI: Health insurance contributions.
- Income Tax (TDS): Section 192 compliance.
6. API Integrations
Section titled “6. API Integrations”| Feature | Provider | API Base URL |
|---|---|---|
| E-Invoice (IRN) | GSTN | einvoice1.gst.gov.in |
| E-Way Bill | NIC | ewebill1.nic.in |
| GSTR Filing | GSTN | gst.gov.in |
7. Tasks (Extension Showcase)
Section titled “7. Tasks (Extension Showcase)”- Metadata Registration: Register India-specific fields (
gstin,hsn_code) with theMetadataDecoratorRegistryforAddressandItem. - E-Way Bill Integration (CQRS): Implement
EWayBillSubscriberto listen for Distribution CenterDeliveryNoteupdates and trigger NIC portal sync. - India-specific Salary Components: Port standard PT/PF/ESI slabs into the
m-indiaprovider. - Statutory Reports: GSTR-1 & GSTR-3B generation via background workers.