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 required and the whole process can be automated.
Creating invoice header
The invoice header is updated by using APBR50MI, transaction AddHead.
This table shows the fields in API APBR50MI (Supplier invoice batch interface):
Field |
Comment |
---|---|
Division |
Required. |
Company name (CNPJ) |
CNPJ or supplier are required, if supplier is updated the CNPJ is retrieved automatically. |
Supplier |
Supplier or CNPJ are required, if CNPJ is updated the supplier is retrieved automatically. |
Supplier invoice number |
Required. |
Series/subseries |
Required. |
Especie |
Required. |
Address number |
Optional. If left blank, the data is retrieved from CNPJ or supplier. |
Requested delivery date |
Optional. If left blank, the data is retrieved from the goods receipt. |
Invoice date |
Required. |
Due date |
Optional. If left blank, the date is calculated from the payment term, the invoice date and the system calendar. |
Total goods value |
Required, if not partial validation. |
Total invoice amount |
Required. |
Payment terms |
Optional. If left blank, the value is retrieved from the supplier. |
(Calculation of) IPI base |
Optional. Automatically calculated on the invoice lines. |
IPI amount |
Optional. Automatically calculated on invoice lines. |
ICMS tax subst base |
Optional. Handled manually. |
ICMS tax subst in percent |
Optional. Handled manually. |
ICMS tax substitution |
Optional. Handled manually. |
ICMS base |
Optional. Automatically calculated on invoice lines. |
ICMS amount |
Optional. Automatically calculated on invoice lines. |
Service amount |
Optional. Valid for service invoices only. |
INSS amount |
Optional. Valid for service invoices only. |
IRRF amount |
Optional. Valid for service invoices only. |
Freight amount |
Optional. |
Insurance amount |
Optional. |
PIS amount |
Optional for import invoices only. Automatically calculated on invoice lines.. |
COFINS importation amount |
Optional for import invoices only. Automatically calculated on 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. Specify 1 to perform partial validation. |
Company name |
Optional. |
CBS amount | Optional. Automatically calculated on invoice lines. |
IBS 1 amount | Optional. Automatically calculated on invoice lines. |
IBS 2 amount | Optional. Automatically calculated on invoice lines. |
IS amount | Optional. Automatically calculated on invoice lines. |
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.
Use partial validation to update fewer fields in APBR50MI or to update records with errors. If used, you must complete the remaining fields in 'Supplier Invoice. Open' (APBR50) to validate the invoice.
On (APBR50/E), you can change the address number, receipt date, invoice date, due date, and payment terms. If you change the invoice date or payment terms, the due date is 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. This date is updated automatically when account entries are created.
Creating incoming invoice lines
The invoice lines are updated by using APBR51MI, transaction 'AddLine'. An invoice header must exist before you can add invoice lines.
This table shows fields in API APBR51MI (Supplier invoice batch interface):
Field |
Comment |
---|---|
Division |
Required. |
Supplier |
Required. |
Supplier invoice number |
Required. |
Series/subseries |
Required. |
Supplier invoice line |
Required if PO/PO line is left blank. |
Purchase order number |
Required if supplier invoice line is left blank. |
Purchase order line |
Required if supplier invoice line is left blank. |
Purchase order line sub number |
Optional. |
Item number |
Required 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 |
Required. |
IPI percentage |
Optional. Overrides the rate entered on the PO line if specified. |
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 |
If specified, overrides the rate specified in (CRBR07), (CRBR01), or 'From-To Federation Unit' (CRBR60) when 'CNPJ at Facility level' is selected in 'Company. Connect Division' (MNS100). |
INSS percentage |
Optional. Valid for service invoices only. |
IRRF amount |
Optional. Valid for service invoices only. |
Freight amount |
Optional. |
Insurance amount |
Optional. |
Other expenses |
Optional. |
Total discount |
Optional. |
Partial validation |
Optional. Specify 1 to perform partial validation. |
CBS/IBS classification code | Required if the invoice date is on or after the tax reform activation date on (MNS100/L). |
IS classification code | Optional. Only valid if the invoice date is on or after the tax reform activation date on (MNS100/L). |
CBS rate | Optional. Only valid if the invoice date is on or after the tax reform activation date on (MNS100/L). |
IBS 1 rate | Optional. Only valid if the invoice date is on or after the tax reform activation date on (MNS100/L). |
IBS 2 rate | Optional. Only valid if the invoice date is on or after the tax reform activation date on (MNS100/L). |
IS rate | Optional. Only valid if the invoice date is on or after the tax reform activation date on (MNS100/L). |
You can use partial validation to update fewer fields in APBR51MI and to update records that contain errors.
If partial validation is used, you must update the remaining fields in 'Supplier Invoice. Open incoming lines' (APBR51) 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, the system opens (APBR51).
All invoices should be validated to check if all required 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, you must specify the division, supplier, supplier invoice number, and series/subseries.
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 to correct the errors. Also, check the invoice lines in (APBR51) using option 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 'Auto update' parameter in (CRS406).
again from (APBR50), then the status on the invoice should be 20='Validated' or higher depending on theCreating invoice lines
When the invoice is in status 20, you can create the invoice lines. 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 status changes to 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, a zero-amount invoice line is automatically created in (APBR52). Delete this invoice line from (APBR52) before proceeding.
You can change the invoice reference in 'Purchase Order. Display Line Trans' (PPS330) if the reference is incorrect. After you change the reference in (PPS330), delete the invoice lines from (APBR52) before recreating them. 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, you must manually update the item number in (APBR52).
If the internal CFOP on the incoming lines is incorrect, an invoice line with blank internal CFOP is created in (APBR52). Then, you must manually update the internal CFOP 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, you can delete and recreate the invoice lines.
Checking invoice
After you create the invoice lines, you must check the invoice. Compare the amounts between the invoice header and the invoice lines. If there are differences, the invoice status changes to 40='Invoice not approved'. The differences are displayed in 'Supplier Invoice. Compare' (APBR03), which you can launch using related option 20='Compare header and lines' from (APBR50).
You can change the invoice header amounts in (APBR50) and the invoice lines in (APBR52). After correcting the amounts, you must perform the check again. If all amounts match, the system updates the invoice status 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 status changes to 80='Account entries created'.