ERPNext app to comply with Mexican Rules and Regulations
ERPNext Mexico Compliance has been designed to adapt ERPNext business logic to comply with the Rules and Regulations of Mexican authorities.
It is built on top of ERPNext and Frappe Framework
The installation steps assumes you have Frappe Framework and ERPNext already installed.
Signup with Frappe Cloud and refer to the Installing an app documentation
# Download app
bench get-app https://github.com/TI-Sin-Problemas/erpnext_mexico_compliance.git --branch version-15
# Install app
bench --site site_name install-app erpnext_mexico_compliance
To enable the CFDI Stamping feature, you will need:
- A package of stamps. To buy a package of stamps please contact us by sending an email to info@tisinproblemas.com
- An API Key. You will get an API Key whith your package of stamps.
- A valid Digital Signing Certificate (CSD) issued by the Mexican Tax Administration Service (SAT)
Once you have all the requirements, on your ERPNext instance follow the steps below:
-
Go to Desktop -> Mexico Compliance -> Digital Signing Certificate
-
Add a Digital Signing Certificate:
- Click on Add Digital Signing Certificate
- Select your Company
- Attach your certificate file (.cer)
- Attach your certificate key file (.key)
- Enter the Certificate key password
- Click on Save
-
Go to Desktop -> Mexico Compliance -> CFDI Stamping Settings:
- Enter your API Key
- Uncheck the Test mode checkbox in your production environment
- Click on Save
You will see the total amount of available credits/stamps in the CFDI Stamping Settings if the API Key and environment is correct
The CFDI Stamping feature allows you to create and stamp CFDI documents for Sales Invoices and Payment Entries as required by Mexican authorities.
Please be aware that in order to successfully stamp a Sales Invoices, some requirements must be met.
- There must be at least 1 Digital Signing Certificate for the Company issuing the Sales Invoice
- You must have available credits/stamps
- The Address of the Company must have a Zip Code
- The Customer must have a valid CFDI Tax Id (RFC)
- The Customer must have a Tax Regime
- The Customer's address must have a Zip Code
- The Invoice Items must have a SAT Product or Service Key
- The UOM of the Invoice Items must have a SAT UOM Key
- The Mode of Payment of the invoice must have a SAT Payment Method
- The invoice must have a SAT Payment Option
To stamp a Sales Invoice, a Stamp CFDI button will be available on the Sales Invoice form once it has being submitted.
Please be aware that in order to successfully stamp a Payment Entry, some requirements must be met.
- There must be at least 1 Digital Signing Certificate for the Company issuing the Payment Entry
- You must have available credits/stamps
- The Address of the Company must have a Zip Code
- All the Reference Items must have being stamped
Some of the Mexican authorities catalogs are added as Doctypes
Doctype | Catalog (in spanish) |
---|---|
Cancellation reason | Motivo de cancelación SAT |
SAT CFDI Use | Uso de CFDI SAT |
SAT Payment Method | Forma de pago SAT |
SAT Payment Option | Método de pago SAT |
SAT Product Or Service Key | Clave de producto/servicio SAT |
SAT Tax Regime | Régimen fiscal SAT |
SAT UOM Key | Clave de unidad de medida SAT |
New fields are created for the following Doctypes
Field | Description |
---|---|
Tax Type | Type of Tax for Tax Accounts (IVA, ISR, IEPS) |
Field | Description |
---|---|
CLABE | CLABE (Clave Bancaria Estandarizada) for Bank Accounts |
Field | Description |
---|---|
SAT Tax Regime | SAT Tax Regime for Companies |
Field | Description |
---|---|
SAT Tax Regime | SAT Tax Regime for Customers |
Field | Description |
---|---|
SAT Product or Service Key | SAT Product or Service Key for Items |
Field | Description |
---|---|
SAT Payment Method | Used to Link Invoices & Payment Entries with SAT Payment Method |
Field | Description |
---|---|
Cancellation reason | If a stamped Payment Entry needs to be cancelled, a Cancellation Reason must be provided |
Substitute payment entry | If the Cancellation Reason requires it, this field allows to specify a Substitute payment entry |
Stamped XML | Holds the XML data generated by the CFDI Stamping process. |
Cancellation acknowledgement | Cancellation Acknowledgement XML data generated by the CFDI Cancellation Stamping process. |
Field | Description |
---|---|
Mode of Payment | Mode of Payment for Sales Invoices |
SAT Payment Option | SAT Payment Option for Sales Invoices |
SAT CFDI Use | SAT CFDI Use for Sales Invoices |
SAT Payment Method | SAT Payment Method for Sales Invoices |
Stamped XML | Holds the XML data generated by the CFDI Stamping process. |
Cancellation reason | If a stamped Sales Invoice needs to be cancelled, a Cancellation Reason must be provided |
Substitute invoice | If the Cancellation Reason requires it, this field allows to specify a Substitute invoice |
Cancellation acknowledgement | Cancellation Acknowledgement XML data generated by the CFDI Cancellation Stamping process. |
Field | Description |
---|---|
SAT Product or Service Key | SAT Product or Service Key for Sales Invoice Items |
Field | Description |
---|---|
SAT UOM Key | Used to link Sales Invoice Items with a SAT UOM Key |
MIT