Mexico Electronic Invoicing

Overview
Mexico based ITAS entities need to send invoices electronically to the Mexican Tax Authority (SAT) and send and receive electronic invoices to and from counterparties.
The details are sent in xml format specified by the government.
Instead of being sent directly to a government website they are sent to a third party processor (PAC e.g. Diverza)

Process
Outgoing Electronic Invoices

SINV (J03), INVFEED(J01)

When an invoice is created an aud02 will be created applying the next sequence number for the invoice type (invoice, credit note, debit note or customs invoice number)
A CFDI xml file is created and sent to the PAC via a REST web service.
The IGI style MEXINVOICE33 is used to generate the CFDI
The PAC will return a new version of the CFDI containing a digital signature and identification number UU-ID and a PDF .
The pdf file is saved to the invoices folder and both are emailed to the counterparty.

INVDIRECT (J51), COMNOTE (J52)

When receivable costs and commissions are processed,  a CFDI is also created. Again the PDF file will be downloaded from the PAC and sent to the counterparty.

Incoming Electronic Invoices

INVPURCH (J50), PINV (J03), INVDIRECT, (J51) , COMNOTE (J52) and DOCENT (D02)
When payable costs and commissions or Purchase invoices are processed the operating company will receive a CFDI file from the counterparty.
This is processed and an aud02 with type = “RECEIVE” is generated.
The user will be shown the details from the CFDI can select the costs, commissions or purchases for the counterparty whose RFC matches the RFC on the CFDI.
Before an CFDI is processed it is sent a the PAC web service for validation.
If the CFDI fails validation a message is displayed to the user.
The url for the validation web service is set in AGSINV > Next numbers. Validation can be bypassed by removing this url.
Resending CFDIs
If the client static is incorrect or the PAC web service is unavailable when the invoice is created the CFDI may need to be regenerated and resent. This is done via AGSINV > Resend CFDI
Cancellation vs Reversals
When an invoiced is reversed in Mexico it can be cancelled or reversed. There is a difference between the two from a tax point of view.
Cancellations are treated as though the original invoice was never raised. Therefore there is no tax to pay.
When a reversal is done the tax on the original invoice should be paid and then reclaimed at the end of the financial year.
To separate the two styles Cancellations have a document type of EC.
CASH 
When Cash is received and matched against an invoice Complemento de Pago CFDI file is be sent to the PAC (Diverza) for validation and certified with an identification number (UUID). The Complemento de Pago is an xml document that details the payment details and linked invoices , it acts as an electronic receipt . Once this has been received, the XML and a related PDF are sent by Diverza to the counterparty. 
MAT 
When Cash is matched against an invoice Complemento de Pago CFDI file is be sent to the PAC (Diverza) for validation and certified with an identification number (UUID), once this has been received, the XML and a related PDF are sent by Diverza to the counterparty

MEXBOOKS
Each Month a number of reports need to be submitted to the Mexican Tax authority, they are generated in the MEXBOOKS option
The following reports can be produced :
1.     Chart of Accounts Report
2.     Trial Balance
Prompt for Month
Opening Balance, Closing Balance, Sum of Credits, Sum of Debits
3.     Journals    
Prompt for Month
4.     Auxilary Accouts
5.     Auxilary Transactions

MEXDIOT 
In mexico, legal Entities and people that deal with Vendors must submit monthly 'Declaracion Informativa de Operaciones con Terceros' (DIOT).
MXDIOT is the administration tool that enables privileged users to view/amend the VAT data that has been collected during the Month to ensure its' integrity
Various user selections enable a grid of Cash transactions to be viewed with their Matched Invoices (both incoming and outgoing)
MEXDIOTREP
DIOT reports based on accounting transactions . 

MEXCPIMP

Import incomming Cash CFDIs and match against CP documents . 
MEXTEXT
Texts for Summary Notes and Observations , used in invoicing programs . 

Mexico eInvoicing Setup

S01
eInvoicing style should be set to Mexico
MTM Setup
7 new menu options are required


EINVCONF Screen
Settings are as follows:
1.     Validation Web Service key : key generated by the PAC to give access to the validation webservice
2.     Validation URL : URL of the PAC Validation web service or blank for no validation
3.     Webservice URL : URL of the PAC Service
4.     eInvoice eMail initials : a CMP user who’s email address will be the sender on all outgoing CFDI emails
5.     PDF Certificate : Not required 
6.     Certificate : Digital Certificate used to identify the operating company with the SAT ( Mexican tax authority )
8.     Foreign RFC: All CFDIs generated for counterparties not based in Mexico should set the Emisor RFC to this code. This is validated when creating CFDIs
9.     Version : Current version is 3.3
10.   Company ID : From PAC
11.   Template : PDF template name - to identify the template to be used by the PAC

EFACCODES

A single eInvoice document type of RFC should be set up:
Cities, Municipalities ,  Suburbs ,  Branches should be set up
Fiscal Regimes should be set up:





Client Static
In CLI each counterparty that will be sending or receiving eInvoices should be set up as an eSender / eReceiver - Document type, number , address and Fiscal Regime should also be set.
The CFDI email address for the counterparty is set up in contacts . The contact should have a job role of “CFDI”
IGI Styles
MEXINVOICE33
J03, J51, J52 - export
CFDI for invoices, CNs and DNs
MEXVEHICULOUSADO
J03, J51, J52 - export
CFDI vehicle addenda
MEXCOMERCIOEXTERIOR
J03, J51, J52 - export
CFDI ComercioExterior addenda
MEXPAGO10 B05 - B06
Cash CFDI
MEXCATALOGO
IGIUI - export
MEXBOOKS catalogo
MEXTB
IGIUI - export
MEXBOOKS trial balance
MEXJOURNALS
IGIUI - export
MEXBOOKS journals
MEXAUXCTAS
IGIUI - export
MEXBOOKS aux accounts
MEXAUXTRANS
IGIUI - export
MEXBOOKS aux transactions

 

Docman Server

 

Docman Server is used to copy incoming CFDI files into a folder so they can be processed by DOCENT / INVPURCH / INVDIRECT . The files are sent to a designated mailbox , this mailbox should be configured in the itas\exec\net35\ng\DocmanServer.exe.config file 

e.g. 

<Mailboxes>
<EWSusers>

<!-- Each mailbox is identified by a key , settings with the same key apply to the same mailbox -->
<add key="1" value="[email protected]" />
<add key="2" value="[email protected]" />
</EWSusers>
<EWSpwds>
<add key="1" value="pw1" />
<add key="2" value="pwd2" />
</EWSpwds>
<AttachmentFolders>
<add key="1" value="\\hdm-ty-dev01\itas\comp\ur\emails\" />
<add key="2" value="\\hdm-ty-dev01\itas\comp\sc\emails\" />
</AttachmentFolders>
<AttachmentCompanies>
<add key="1" value="ur" />
<add key="2" value="sc" />
</AttachmentCompanies>
<!-- Optional section for file extension exclusions to be associated using the same key as above -->
<!-- Example below shows how to exlude attachments with extensions of HTM, GIF and JPG for mailbox 2 -->
<!-- BODY can be used to identify the message content itself i.e. do not create a file for the message content -->
<Exclusions>
<add key="2" value="BODY,htm,gif,jpg"/>
</Exclusions>
</Mailboxes>

 

The following configurations should be added to the appSettings element :

<appSettings>
<add key="AttachmentPluginDLL" value ="\\hdm-ty-dev01\itas\exec\net35\ng\ITASeInvoice.dll"/>
<add key="AttachmentPluginClass" value ="ITASeInvoice.DocmanServerPlugin"/>
...

This will allow the einvoice dll to rename the cfdi file to include the itas account number .

 

Purchase invoice programs will prompt for the CFDI file which will be found in the folder specified in the AttachmentFolders setting . The details from the CFDI will be used to find the counterparty account and to validate the amounts being invoiced . 

 

 

 

 

 

 


Was this helpful?
Thanks for your feedback