This article describes various validations for invoice processing within ERP systems, such as the validation of the posting date, uniqueness, invoice date, and invoice balance. It also covers specific checks like VAT balance, calculated VAT on header and coding lines, and validations related to purchase orders. Additionally, validations for import data are described, such as recognised IBAN and VAT numbers.
The article provides guidelines on when each validation fails or succeeds, depending on specific conditions and system settings.
The article below concerns Procure to Pay (P2P) for the following applications and/or module(s):
AP Automation & Procurement
Validation of Booking Date
Technical Name: validate_posting_date
Availability: Generic This validation checks if the booking date of the invoice falls within an open booking period.
When does this validation fail?
- No booking period found for the current company.
- The booking date of the invoice does not fall within an open booking period.
When does this validation not fail?
- The booking date is empty.
Validation of Uniqueness
Technical Name: validate_uniqueness
Availability: Generic This validation checks if the same invoice has already been registered.
When does this validation fail?
- Another non-rejected invoice exists with:
- the same supplier
- the same invoice number (case insensitive)
- the same financial year
- Supplier is empty
- Invoice number is empty
- Invoice date is empty (if financial year check applies)
This validation checks:
- All non-rejected invoices from the same supplier;
- With the same invoice number (case sensitive);
- Within the same year as the year of the invoice date (for example, ‘2025’). Applicable to all ERP systems, except Exact Online.
The validation is independent of the company.
Validation of Uniqueness Based on Supplier and Invoice Number
Technical Name: validate_uniqueness_based_on_vendor_and_invoice_number
Availability: Generic Same check as 'Validation of Uniqueness', but without checking the financial year.
Validation of Invoice Date
Technical Name: validate_invoice_date
Availability: Generic This validation checks if the invoice date is realistic.
When does this validation fail?
- Invoice date is in the future
- Invoice date is before 2000-01-01
- Invoice date is older than one month from today
Validation of Invoice Balance
Technical Name: validate_invoice_equilibrium
Availability: Generic This validation checks if the total amount on the invoice header matches the total of the lines.
When does this validation fail?
- No lines available
- No invoice amount available
- Net invoice amount and sum of the lines do not match
What do the amounts mean?
- The net total amount = invoice amount excl. VAT
- The sum of the line amounts = line amounts excl. VAT
- The lines include all (selected) lines on the invoice, (additional) coding, PO- and cost lines.
Validation of VAT Balance
Technical Name: validate_vat_equilibrium
Availability: Only for Dyn365 / AX2012 / M3 This validation checks if the VAT on the lines matches the VAT on the invoice header.
When does this validation fail?
- No lines available
- No invoice amount available
- Difference between total VAT on lines and on the header (non-deductible VAT excluded)
*The VAT amount of the lines includes all (selected) lines on the invoice, (additional) coding, PO- and cost lines. This total VAT amount must equal the VAT amount of the header.
The non-deductible VAT amount (if any) is excluded from this calculation.
Validation of Calculated VAT on the Header
Technical Name: validate_calculated_vat
Availability: Generic This validation checks if the VAT amount on the invoice header is correctly calculated on the header.
When does this validation fail?
- Invoice amount or VAT amount is negative
- VAT code is 0% but VAT amount is not 0
- VAT code is not 0% but VAT amount is 0
- Calculated VAT amount does not match the entered VAT amount
- VAT amount ≥ amount excl. VAT, while 'tax explanation code' is not set to 'VT'
- VAT amount ≠ invoice amount, while 'tax explanation code' is set to 'VT'
When does this validation not fail?
- No VAT code or VAT amount filled in on the header
- VAT lines present (VAT splitting)
What do the amounts mean?
- Invoice amount = invoice amount incl. VAT - credit limit.
- Actual VAT amount = VAT amount set on the invoice (may be the VAT amount on the VAT lines)
- Amount excl. VAT = invoice amount - specific VAT amount*
- Specific VAT amount* = calculated VAT using (gross) invoice amount and VAT percentage, thereby a specific calculation with the gross amount instead of the net amount.
- If the invoice amount is 0, the actual VAT amount is used.
- Calculated VAT amount = amount excl. VAT * VAT percentage
Validation of Calculated VAT on Coding Lines
Technical Name: validate_calculated_vat_on_coding_lines
Availability: Generic This validation checks the correct calculation of VAT on coding lines.
When does this validation fail?
- Lines with negative amounts or VAT amounts
- VAT percentage is 0 but VAT amount is not 0
- VAT percentage is not 0 but VAT amount is 0
- Calculated VAT amount ≠ actual VAT amount
- VAT amount ≥ line amount (excl. VAT)
When does this validation not fail?
- No VAT code or VAT amount filled in on the line
Validation of Calculated VAT on PO Lines
Technical Name: validate_calculated_vat_on_logistic_lines
Availability: Dyn365 / AX2012 / M3 This validation checks the correct calculation of VAT on selected PO lines.
When does this validation fail?
- See rules for coding lines (same checks)
- Only for the selected lines.
- Cost lines are not included.
Validation of Calculated VAT on Charge Lines
Technical Name: validate_calculated_vat_on_charge_lines
Availability: Dyn365 / AX2012 / M3 This validation checks the correct calculation of VAT on selected charge lines.
When does this validation fail?
- See rules for coding lines (same checks)
- Only for the selected lines.
Validation of VAT Codes between Header and PO Lines
Technical Name: validate_vat_invoice_header_logistic_lines
Availability: Generic This validation checks if VAT codes and VAT groups on the header match those on the lines.
When does this validation fail?
- VAT code of a selected line is not present in the list of VAT codes on the header
- VAT group of the line differs from that on the header or associated VAT code
When does this validation not fail?
- No selected PO lines
Additional Information:
- The VAT codes of all selected PO lines are checked, including the VAT code of the cost lines.
Regarding cost lines, the cost lines for ERP Dyn365 F&O are ignored here. - The VAT codes of the header consist of either the VAT code of the header or the VAT codes of the VAT lines.
Validation of Quantity in PO Lines
Technical Name: validate_logistic_lines_empty_quantity_actual
Availability: Generic Checks whether the actual quantity for each selected PO line has been filled in and is not equal to 0.
When does this validation fail?
- Quantity is empty or 0 on a selected line
When does this validation not fail?
- No selected PO lines
Validation of Amount in PO Lines
Technical Name: validate_logistic_lines_empty_amount_actual
Availability: Generic Checks whether the amount for each selected PO line has been filled in and is not equal to 0.
When does this validation fail?
- Amount is empty or 0 on a selected line
When does this validation not fail?
- No selected PO lines
Validation of Alternative Quantity in PO Lines
Technical Name: validate_logistic_lines_empty_alternative_quantity_actual
Availability: M3 Checks whether an alternative quantity has been filled in if the alternative unit is specified.
When does this validation fail?
- Alternative quantity is empty or 0 while an alternative unit is filled in
When does this validation not fail?
- No selected PO lines
Validation of Quantity vs. Quantity to be Invoiced in PO Lines
Technical Name: validate_logistic_lines_quantity_to_be_invoiced
Availability: Generic Checks whether the actual quantity for each selected PO line is not greater than the quantity to be invoiced for that line.
When does this validation fail?
- Quantity exceeds the quantity to be invoiced
When does this validation not fail?
- No selected lines
*** *** This validation is related to / can work with the validation 'Amount act./to be invoiced in PO lines. They complement each other and use the invoice method field as a trigger. The validation ‘Quantity act./to be invoiced in PO lines’ is the standard validation, which should process all lines, as quantity is the default value on PO lines. The only alternative value at this moment is ‘amount’. These lines are processed solely by the validation ‘Amount act./to be invoiced in PO lines’.
Validation of Amount vs. Amount to be Invoiced in PO Lines
Technical Name: validate_logistic_lines_amount_to_be_invoiced
Availability: Generic This function checks whether the actual amount is not higher than the amount to be invoiced for each selected PO line.
When does this validation fail?
- Amount exceeds the amount to be invoiced
When does this validation not fail?
- No selected lines
This validation is only relevant for customers who:
- Have order and/or receipt lines with the invoice method set to amount
- Do not want the actual amount to be higher than the (original) amount to be invoiced
Validation of Company between Header and Lines
Technical Name: validate_company_header_lines
Availability: Generic Checks whether the company on each line matches that on the invoice header.
When does this validation fail?
- No company on the header or (selected) line
When does this validation not fail?
- From version NEXT_202505: no lines present no longer leads to failure
Validation of Blocked Amount
Technical Name: validate_blocked_amount
Availability: Generic Checks the lines for blocked amounts.
When does this validation fail?
- Supplier is not G-split related, but blocked amount is filled in
- Supplier is G-split related, but blocked amount exceeds invoice amount
- Blocked amount is filled in on a credit invoice
When does this validation not fail?
- Blocked amount is empty or 0
Validation of Purchase Categories
Technical Name: validate_purchase_category
Availability: Generic Checks whether all selected PO lines have the same purchase category.
When does this validation fail?
- Different purchase categories on selected lines
Validation of Purchase Order Currency
Technical Name: validate_order_currency
Availability: Generic Checks whether the currency of the purchase order is the same as the invoice currency.
When does this validation fail?
- Currency of a linked order differs from the invoice
When does this validation not fail?
- No orders present or found
- The order data does not contain a currency
- Currency on invoice header is empty
Validation of Purchase Order Having Lines
Technical Name: validate_purchase_order_has_lines
Availability: Generic Checks whether a linked purchase order contains lines.
When does this validation fail?
- Order number not found or contains no billable lines The validation fails if any of the order numbers on the invoice are not in the order data, such as in the purchase order table or the ERP system. This could be an invalid or non-billable order number.
*In the validation, the order data is not retrieved from the table or ERP system, but from the field ‘Order Data’ on the invoice itself.
Validation of Order Lines
Technical Name: validate_order_numbers_have_lines
Availability: Generic Checks whether linked orders still contain billable lines in the ERP.
When does this validation fail?
- At least one linked order number has no billable lines left
**The content of the order data retrieved from an ERP is determined by the ERP interface. This is generally checked by our ERP partners, who check/maintain the interface and have knowledge of the rules regarding orders in that specific ERP.
Validation of Selected PO and Charge Lines
Technical Name: validate_invoice_has_selected_lines
Availability: Generic Checks whether at least one selected line is present.
When does this validation fail?
- No selected PO lines, charge lines or header charges
Validate if Order Lines are Already Present on Another Invoice
Technical Name: validate_order_lines_used_on_another_invoice
Availability: Generic Displays a message if order lines are already linked to another invoice.
When does this validation fail?
- Selected PO line is already linked to another open or completed invoice
For this validation:
- The invoice must be open or filled in, not rejected.
- The PO lines must be selected.
Validation of Recognised Data During Import
Technical Name: validate_recognized_data
Availability: Generic This function validates recognised fields during the import of invoices.
*This validation retrieves the supplier record from the master data, based on the recognised supplier from the invoice.
When does this validation fail?
- IBAN or VAT number differs between supplier and import data
- One of the above data is empty while the other is filled
When does this validation not fail?
- No supplier recognised during import
⚠️
Validation of Recognised IBAN During Import
Technical Name: validate_recognized_data_iban
Availability: Generic Specifically checks the IBAN between supplier and import data.
This validation retrieves the seller record from the master data, based on the recognised seller from the invoice.
When does this validation fail?
- IBAN differs from the import or one of both (import or XML) is empty while the other is filled
When does this validation not fail?
- No supplier recognised during import
⚠️
Validation of Recognised VAT Number During Import
Technical Name: validate_recognized_data_vat_id
Availability: Generic Specifically checks the VAT number between supplier and import data.
When does this validation fail?
- VAT number differs or one of both (import or XML) is empty while the other is filled
When does this validation not fail?
- No supplier recognised during import
⚠️
Validation of Payment Reference
Technical Name: validate_payment_reference
Availability: Dyn365 F&O / AX2012 Checks whether the structured message contains the correct pattern and check digit.
When does this validation fail?
This validation includes two checks:
- Pattern Check
The syntax of the entered value must comply with the specified pattern above. - Modulo 97 Check
The entered value must consist of 12 digits (see pattern check). When dividing the first 10 digits of this value (for example, ‘1231234123’ in the example pattern) by 97, the remainder of this division (the modulo) must equal the last two digits of the value (in this case, ‘45’ in the example pattern). In the given example, the last 2 digits should be 28.
Validation of Cash Discounts
Technical Name: validate_cash_discounts
Availability: Generic Checks the correct setup of discount fields on the invoice header.
When does this validation fail?
- Discount amount is negative or greater than invoice amount incl. VAT
- The discount amount cannot be equal to 0 if the discount code has a discount percentage greater than 0.
- A discount code must be entered if a discount date is specified or if the discount amount is not equal to 0.
- A discount date must be entered if a discount code is specified or if the discount amount is not equal to 0.
Validation of Quantity + Unit (Coding Line)
Technical Name: validate_coding_lines_quantity_and_unit
Availability: SAP / JDE Checks whether quantity and unit on coding lines are both filled or both empty.
When does this validation fail?
- One of the two fields is empty or 0 while the other is filled
Validation Two-way with Goods Receipt
Technical Name: validate_logistic_lines_special_two_way
Availability: SAP Warns for two-way purchase orders with goods receipt.
A specific marking has been introduced for a PO line, referred to as ‘SPECIAL_TWO_WAY’. This is intended to indicate whether this line concerns a specific type of PO line, namely a goods receipt that can be booked before the goods are actually received. This thus functions as a two-way line.
Validation of Transaction Type Consistency
Technical Name: validate_subsequent_consistency
Availability: SAP Validates the transaction types based on whether they are consecutive or not.
When does this validation fail?
- A selected PO line is marked as a ‘subsequent invoice’, while the transaction type of the invoice is set to ‘Debit’ or ‘Credit’.
- A selected PO line is not marked as a ‘subsequent invoice’, but the transaction type of the invoice is set to ‘Post Debit’ or ‘Post Credit’.
When does this validation not fail?
- The invoice of the transaction type 'Debit' or 'Credit' is and none of the selected PO lines are marked as 'follow invoice'.
- The invoice of the transaction type 'Debit' or 'Credit' is and all selected PO lines are marked as 'next invoice'.
- The 'subsequent invoice' is a checkbox on the PO line.
Validation of Header Charges
Technical Name: validate_header_charges
Availability: Dyn365 F&O This validation checks whether there is at least one selected PO line for each header charge for the same purchase order, and also checks if the entered amount is not higher than the amount received from the ERP.
When does this validation fail?
- There is no PO line selected with the same order number as the selected header cost line.
- The actual amount of that selected header cost line is greater than the original amount received from the ERP.
Validation Prepayment and One Purchase Order
Technical Name: validate_prepayment_amount_multiple_orders
Availability: Dyn365 F&O Checks whether a prepayment invoice is linked to only one order.
When does this validation fail?
- No order number filled in on the header
- More than one order number filled in
When does this validation not fail?
- Prepayment amount is empty or 0
Validation of Prepayment Amount Height
Technical Name: validate_prepayment_amount_exceeds_remaining
Availability: Dyn365 F&O Checks whether the invoice is not higher than the prepayment amount.
When does this validation fail?
- Invoice amount incl. VAT is greater than the prepayment amount
When does this validation not fail?
- Prepayment amount is empty or 0
Validation of Order Number (Coding Line)
Technical Name: validate_coding_line_order_number
Availability: JDE Checks whether the order number in the coding line complies with the JDE pattern.
When does this validation fail?
- Order number on coding line does not comply with the format
When does this validation not fail?
- No coding line or order number is empty
Validation of Quantities Without Decimals
Technical Name: validate_line_quantity_no_decimals
Availability: JDE Checks that the quantity is an integer.
When does this validation fail?
- A quantity (on coding or PO line) contains decimals
Validation of Fiscal Unit
Technical Name: validate_fiscal_unit
Availability: Generic Checks whether header and line companies fall within the same fiscal unit.
When does this validation fail?
- Company on line falls outside the fiscal unit of the company on the header