Manage Automatic Invoice Matching for Brazil
These steps are performed to complete the invoice matching process and to transfer the supplier invoice to accounts payable and general ledger. All steps are not mandatory and the whole process can be automated.
Creating invoice header
The invoice header is updated by using APBR50MI, transaction AddHead.
Fields in API APBR50MI (Supplier invoice batch interface)
Field |
Comment |
---|---|
Division |
Mandatory. |
Company name (CNPJ) |
CNPJ or supplier are mandatory, if supplier is updated the CNPJ is retrieved automatically. |
Supplier |
Supplier or CNPJ are mandatory, if CNPJ is updated the supplier is retrieved automatically. |
Supplier invoice number |
Mandatory. |
Series/subseries |
Mandatory. |
Especie |
Mandatory. |
Address number |
Optional. If left blank, it is retrieved from CNPJ or supplier. |
Requested delivery date |
Optional. If left blank, it is retrieved from the goods receipt. |
Invoice date |
Mandatory. |
Due date |
Optional. If left blank, it is calculated from the payment term, the invoice date and the system calendar. |
Total goods value |
Mandatory, if not partial validation. |
Total invoice amount |
Mandatory. |
Payment terms |
Optional. If left blank, it is retrieved from the supplier. |
(Calculation of) IPI base |
Optional. It will be calculated automatically on the invoice lines. |
IPI amount |
Optional. It will be calculated automatically on the invoice lines. |
ICMS tax subst base |
Optional. It is handled manually. |
ICMS tax subst in percent |
Optional. It is handled manually. |
ICMS tax substitution |
Optional. It is handled manually. |
ICMS base |
Optional. It will be calculated automatically on the invoice lines. |
ICMS amount |
Optional. It will be calculated automatically on the invoice lines. |
Service amount |
Optional. It is valid for service invoices only. |
INSS amount |
Optional. It is valid for service invoices only. |
IRRF amount |
Optional. It is valid for service invoices only. |
Freight amount |
Optional. |
Insurance amount |
Optional. |
PIS amount |
Optional for import invoices only. It will be calculated automatically on the invoice lines. |
COFINS importation amount |
Optional for import invoices only. It will be calculated automatically on the invoice lines. |
Other expenses |
Optional. |
Total discount |
Optional (added as positive amount). |
Importation registration number |
Optional. |
Document type |
Optional. |
NF-e ID |
Optional. |
IBGE FU code |
Optional. |
Period |
Optional. |
Modification requirement |
Optional. |
Exchanged serial number |
Optional. |
Ref document number |
Optional. |
Partial validation |
Optional. Indicate with 1 if partial validation should be performed. |
Company name |
Optional. |
The total invoice amount is compared to the total of the fields for different types of taxes, charges and discounts, and the total amount should match in order to proceed.
Partial validation can be used to update fewer fields in APBR50MI and to update records that contain errors. If partial validation is used, then it is mandatory to go to 'Supplier Invoice. Open' (APBR50) and update the remaining fields to validate the invoice later on.
In (APBR50/E) the address number, the receipt date, the invoice date, the due date, and the payment terms can be changed. If the invoice date is changed, the due date will be recalculated. If the payment terms are changed, the due date will again be recalculated. These fields can only be changed when the status of the invoice is 20='Validated' or lower.
There is no need to fill in the accounting date because this date will be updated when the account entries are created.
Creating incoming invoice lines
The invoice lines are updated by using APBR51MI, transaction 'AddLine'. An invoice header must exist to be able to add the invoice lines.
Fields in API APBR51MI (Supplier invoice batch interface)
Field |
Comment |
---|---|
Division |
Mandatory. |
Supplier |
Mandatory. |
Supplier invoice number |
Mandatory. |
Series/subseries |
Mandatory. |
Supplier invoice line |
Mandatory if PO/PO line is left blank. |
Purchase order number |
Mandatory if supplier invoice line is left blank. |
Purchase order line |
Mandatory if supplier invoice line is left blank. |
Purchase order line sub number |
Optional. |
Item number |
Mandatory if alias number is blank or if alias number is not correct. |
Alias number |
Optional. |
Internal CFOP code |
Optional. If left blank, retrieve from the supplier. |
Industry equivalence |
Optional. |
Purchase price |
Mandatory. |
IPI percentage |
Optional. If added, it will overrule entered rate on the PO line. |
IPI credit base |
Optional, but handled manually. |
IPI credit amount |
Optional, but handled manually. |
ICMS tax subst base |
Optional, but handled manually. |
ICMS tax substitution |
Optional, but handled manually. |
ICMS tax subst in % |
Optional, but handled manually. |
ICMS percentage |
Optional. If added, it will overrule entered rate in (CRBR07) or (CRBR01) or 'From To Federation Unit' (CRBR60) if 'CNPJ at Facility level' in 'Company. Connect Division' (MNS100) is selected. |
INSS percentage |
Optional. It is valid for service invoices only. |
IRRF amount |
Optional. It is valid for service invoices only. |
Freight amount |
Optional. |
Insurance amount |
Optional. |
Other expenses |
Optional. |
Total discount |
Optional. |
Partial validation |
Optional. Indicate with 1 if partial validation should be performed. |
Partial validation can be used to update fewer fields in APBR51MI and to update records that contain errors.
If partial validation is used, then it is mandatory to go to 'Supplier Invoice. Open incoming lines' (APBR51) and update the remaining fields to validate the invoice.
Validating invoice
When the invoice header and the invoice lines are updated through APBR50MI and APBR51MI, a record is created which is displayed in (APBR50). The record is in status 10='New'. The header is displayed in (APBR50) and the lines are displayed using related option 11='Incoming invoice lines' from (APBR50). If you use that related option, you go to (APBR51).
All invoices should be validated to check if all mandatory fields are updated. The validation is started using related option 8='Validate' in (APBR50) or through APBR53MI (Supplier invoice batch interface). If APBR53MI, transaction 'ValidateInvoice' is used, the division, the supplier, the supplier invoice number, and the series/subseries must be entered.
If the parameter 'Auto update' on the FAM-function AP50 in 'FAM-function. Open Details' (CRS406) is set to 1 and there are no errors on the invoice header and the invoice lines, the status is set to 80='Account entries created'. If the validation fails, the invoice gets status 15='Validated with error'. There might be errors on the header and on the lines in this case. If the validation is successful, the status is 20='Validated' or higher, depending on the setting on the FAM-function AP50.
If the parameter 'Auto update' on the FAM-function (CRS406) is set to 1, all steps are performed automatically if no errors are found. If errors are found and the invoice has status 15='Validated with error', go to the header record in (APBR50) using option 'change' to correct the errors. Also, check the invoice lines in (APBR51) using option 'change' and correct the errors.
In (APBR51/B1), you can on invoice line errors. Select invoice line error from/to 2='errors' to see erroneous lines only. When the errors are corrected, run 'Validate' again from (APBR50), then the status on the invoice should be 20='Validated' or higher depending on the 'Auto update' parameter in (CRS406).
Creating invoice lines
When the invoice is in status 20, the invoice lines can be created. The invoice lines are created based on the goods receiving lines for this invoice number. There might be several goods receiving lines per invoice line.
The invoice lines are created using related option 13='Create invoice lines' from (APBR50). When the invoice lines are created, the invoice gets status 30='Invoice line created'. The invoice lines are displayed in 'Supplier Invoice. Open Invoice Lines' (APBR52) which is launched using related option 12='Invoice lines' from (APBR50). If the invoice line number on the goods receiving lines does not match the invoice line added on the incoming lines (but the invoice number matches), an invoice line with a zero amount is created in (APBR52). This invoice line should be deleted from (APBR52) before proceeding.
The invoice reference in 'Purchase Order. Display Line Trans' (PPS330) can be changed if the reference is incorrect. After changing the reference in (PPS330), the invoice lines can be deleted from (APBR52) and then they can be recreated. In case the item number updated on the incoming lines does not correspond to the item number on the purchase order, an invoice line with a zero amount is also created. Then the item number must be manually updated in (APBR52).
If the internal CFOP on the incoming lines is incorrect, an invoice line with blank internal CFOP is created in (APBR52). Then the internal CFOP must be manually updated on the invoice lines in order to proceed.
If the IPI rate and the ICMS rate are updated in (APBR51MI), these rates overrule the rates defined in 'Item. Open Complement' (CRBR04), 'Settings – CFOP code' (CRBR07), 'Federation Unit. Open' (CRBR01), or (CRBR60) if 'CNPJ at Facility level' in (MNS100) is selected.
As long as the invoice is in status 40 or less, the invoice lines can be deleted and recreated.
Checking invoice
After the invoice lines are created, the invoice must be checked. The amounts between the invoice header and the invoice lines must be compared. If there are differences, the invoice gets status 40='Invoice not approved'. The differences are displayed in 'Supplier Invoice. Compare' (APBR03) which is launched through related option 20='Compare header and lines' from (APBR50).
The invoice header amounts can be changed in (APBR50) and the invoice lines can be changed in (APBR52). When the amounts are corrected, the check must be performed again. After the check is performed and all amounts are matched, the status is set to 50='Invoice Approved'.
Creating account entries
The account entries are created using related option 15='Create account entries' from (APBR50). After the account entries are created, the invoice gets status 80='Account entries created'.