CSF MU adds Mauritius Revenue Authority (MRA) e‑invoicing support to ERPNext. It introduces the required settings, custom fields, validations, tax code mapping, invoice transmission, and logging.
bench --site <your.site> install-app csf_mu
bench --site <your.site> migrate
bench --site <your.site> clear-cacheGo to CSF MU Settings and fill:
Auth URLandTransmit URLUsername,PasswordEBS MRA ID,Area CodePublic Key CertificateMax Invoices Per Request(read‑only, defaults to 500)- Optional:
Enable PRF/TRN Invoices
Notes:
- Token + encryption key are cached automatically.
Max Invoices Per Requestlimit is enforced for batch requests.
Required:
TANBRNBusiness Address
Optional:
Trade NameBusiness PhonePerson Type(VATR/NVTR)
Required only for B2B/B2G:
Buyer TypeTANBRN(B2B only)
Other fields:
Transaction Type(B2B/B2G/B2C/EXP/B2E)Business AddressNIC / NCID
Create MRA Tax Code Map records that link:
Item Tax TemplateTax CodeNature(GOODS or SERVICES)
Step 1 — Create Sales Taxes & Charges Template
- Go to Accounts → Sales Taxes and Charges Template
- Create or select a VAT template (e.g. VAT 15%)
- This template defines the tax account (use your company VAT account) and rate
Step 2 — Create Item Tax Template
- Go to Accounts → Item Tax Template
- Name it clearly (e.g.
MRA TC01 GOODS - B) - Add a tax row pointing to your company VAT account and rate
- Save the template
Auto‑create option:
- On Company, click Create MRA Item Tax Templates.
- This generates standard MRA templates and maps them to tax codes.
Update the tax accounts/rates to match your company setup if needed.
Step 3 — Map it to MRA Tax Code
- Create an MRA Tax Code Map
- Link the Item Tax Template
- Choose the correct Tax Code and Nature
Step 4 — Assign to Items
- On each Item, set Item Tax Template
- This is how the system decides which MRA Tax Code to send
Tip:
- You can also set a Default Item Tax Template on the Sales Invoice, but item‑level templates are required if you sell mixed goods/services.
Tax Code meanings (MRA Data Structure):
TC01= Taxable supplies at 15%TC02= Taxable supplies at zero rateTC03= Exempt suppliesTC04= Non‑fiscal items not affecting turnoverTC05= Standard rated supplies to exempt bodies/personsTC06= Supplies outside VAT scope
On submit, CSF MU:
- Validates item tax templates and MRA mapping
- Validates buyer details for B2B/B2G
- Validates CRN/DRN requirements
- Builds payload and transmits to MRA
- Writes MRA Invoice Log and updates
mra_status
Use Return / Credit Note from a submitted invoice.
return_againstis requiredReason Statedis requiredmra_invoice_type_descis set to CRN
Use Is Rate Adjustment Entry (Debit Note).
return_againstis requiredReason Statedis requiredmra_invoice_type_descis set to DRN
Enable Enable PRF/TRN Invoices in settings. The Invoice Type (MRA) field appears and allows PRF/TRN.
Use Sales Invoice List → Send to MRA (Batch Request) to send many invoices in one request.
Limits:
- Max invoices per request: 500
- Max total items per request: 5000
Progress bar shows processing status.
Stores:
- Request JSON
- Response JSON
- Status
- IRN
- QR Code
- Error details (child table: MRA Invoice Log Detail)
previousNoteHashis computed automatically using SHA‑256 and chained per invoice type.- CRN/DRN must reference a SUCCESS fiscalised invoice.
- Buyer fields are enforced for B2B/B2G.
Common causes of rejection:
- Missing Company TAN/BRN/Address
- Missing Customer buyer fields for B2B/B2G
- Missing MRA Tax Code Map
- Invalid
return_againstfor CRN/DRN
- STD, CRN, DRN, PRF, TRN supported
- Batch transmit supports the 10‑invoice test case
- Failed scenario (wrong TAN) behaves as expected
For project setup or customizations, contact the implementation team.