In the most countries of Latin America, to work with the accounting laws of the government, systems need to have an authorization to invoices and credit notes. I’m not sure if the laws in North America or Europe need to have it too.
The authorization need to have ranges(from_auth, to_auth), number of resolution, software provider, start date, end date and serie. The ranges can not be overlapped. If a serie is new for the resolution, the from_auth is 1. If the auth has been used, the from auth is the last to_auth from the authorization.
Also the authorization need to have the state of draft, active or finished.
If a system doesn’t count with a valid authorization for invoices or credit notes, the system can not post invoices or numerate it.
Also the invoice authorization should be used be the authorized company.
Integrate the authorization with fiscal years or maybe with account configuration and have methods to validate the invoice authorization in the invoices with type ‘out’.
I’m not sure if the module could be useful for all the tryton user or developers, but could be a great improvement for Latin American trytoners.
In order to have an authorized ERP system and print invoices and credit notes with goverment authorization, the give you a document with the corresponding authorization number, and periodically check the generated documents and their validity.
The authorization document given by the goverment has the follow information:
The number, is must be unique.
Date of Auth
Start Date
End Date.
Kind: can be for invoice or for credit note
Serie: A, B, X and so on.
The below image is an example of the generated invoice, en the footer has the info of the authorization.
I do not understand what are the “From auth”, “To auth”? I thought it was the possible invoice number (even if it sounds fool to limit the number of invoice for a period). But I see the invoice does not have a number between those value.
I’m sorry to ask tones of questions but to be able to take any decision we must have a clear and complete description of the requirements.
Also I would like to hear from other countries with similar needs.
Because is part of the law in the countries, they ask for the authorization number in every invoice.
Because the invoice authorization need to be renew in determinate period.
They are defined by the agents of the goverments when they give the authorization.
If a company has many shops or stores, they give to each one a serie, A, B, C, defined arbitrary by them arbitrarily.
They assign the number of the invoice or credit note based on these document. The goverment has a record of each authorization and validate it again its database periodically, and after compare the invoices with his own records. I don’t know why they ask for these documents, but is the law and they review the system against his requirements.
The From Auth and To Auth define the numbers of invoices that can be generated. I updated the invoice because the last was wrong.
You have reason about that. Let me know if you have more questions.
The countries with similar needs are Guatemala, México, Uruguay, Colombia, Ecuador, Chile, República Dominicana, and others. BTW, some of the countries has an especial process to validate each invoice. But the invoice authorization is similar.
Authorization can not have duplicates in the system by company. It is a policy of the goverment.
Yes, it is random. You could have more than one authorization by year.
The company does not have choice with the authorization serie. The company may decide how many invoices they will need, depending on their needs. If they need more, the do a request for a new authorization.
No. it is based in the authorization control, with a sequence.
The system need to have an alert when consuming the 70%, 80% and 90% of the invoices, or when the authorization is going to end, 30 days before. If the business does not have an authorization valid, the can not post invoices.
Below are some links to find references to it. One of Colombia and one from Guatemala.
This is an useless paper work requirement that countries like Colombia has to do. It does not add any value it all, I use the header of company to manage resolution parameters each time it’s needed.
By the way , Colombia , Perú and puerto rico are implementing electronic invoice using UBL. 2.1, the authorizarion (resolution) data will come using a webservice request.
These could work on some countires, only change the header. In others no.
Yes, the most part of the countries listed above will migrate, but will still continue with both system almost in the future 3 years. If the traditional authorization is useless, maybe is better to work with UBL like you mention, of course, it will have much more application in the most part of countries listed.
Yo pudo explicar la situación de Perú,
Las autorizaciones con rangos de números y fechas y números de resoluciones para emitir facturas, se hacen cada vez menos, es en los casos de facturas manuales sobre formatos pre impresos.
Actualmente se está masificado la factura electrónica, usando el estándar UBL 2.1. Es así que venimos usando Tryton en el Perú. El chequeo de números duplicados está en el web services (servidor) de la entidad tributaria llamada SUNAT. El sistema no te acepta 2 facturas con el mismo número y serie. Por tanto al menos para Perú no es necesario ningún módulo con esas características.
So it looks like we should focus on having a edocument_ubl with at least the invoice document. And for each country like Peru: account_pe_sunat to communicate the UBL invoice.