> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Available rules

> Complete list of preconfigured invoice validation rules and service rules in FlexiCapture for Invoices, with default enablement for each Invoice Processing region.

## Invoice validation rules

Any pre-configured rule can be disabled by the user in the properties of the Document Definition. You can also create user-defined rules.

In the tables below, **Enabled by default in** lists the Invoice Processing project types (Au-NZ, CA, ES, EU, US, JP) where each rule ships enabled. Project types that are not listed have the rule available but disabled by default. **N/A** marks project types where the rule does not apply.

### Business Unit

| Rule                                                           | Description                                                                                                                                                               | Enabled by default in |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| **Information about business units must be added to database** | Checks whether a new business unit found on the image and saved to the BU data set has been added to the database. Must be enabled when business unit databases are used. | ES, EU                |
| **Business Unit's address is required**                        | Checks that the `BU\Street` field is not empty.                                                                                                                           | ES, EU                |
| **Business Unit's name is required**                           | Checks that the `BU\Name` field is not empty.                                                                                                                             | ES, EU                |
| **Business Unit's VATID is required**                          | Checks that the `BU\VATID` field is not empty. Applied to all supported countries except Switzerland.                                                                     | ES, EU                |
| **Check ABN**                                                  | Checks that the `BU\VATID` field is filled in for AU invoices.                                                                                                            | Au-NZ · N/A elsewhere |
| **Business Unit must be found in database**                    | Checks that the business unit found on the invoice image is found in the BU data set. Must be enabled when business unit databases are used.                              | All                   |
| **Business Unit's Country is required**                        | Checks that the `BU\Country` field is not empty.                                                                                                                          | None                  |
| **Check tax rates on national invoices**                       | Checks that the applied tax rates are correct for invoices from the same country. The possible tax rates and their validity periods are known for each country.           | ES, EU                |
| **Check Tax Rate JP**                                          | Checks that the applied tax rates are correct.                                                                                                                            | Au-NZ · N/A elsewhere |
| **Check tax rates field on international invoices**            | Checks that the applied tax rates are correct for international invoices. The possible tax rates and their validity periods are known for each country.                   | ES, EU                |

### Vendor

| Rule                                             | Description                                                                                                                                                     | Enabled by default in |
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| **Vendor address is required**                   | Checks that the `Vendor\Street` field is not empty.                                                                                                             | ES, EU                |
| **Vendor name is required**                      | Checks that the `Vendor\Name` field is not empty.                                                                                                               | ES, EU                |
| **Vendor VATID is required**                     | Checks that the `Vendor\VATID` field is not empty. Applied to all supported countries except Switzerland.                                                       | ES, EU                |
| **Vendor must be found in database**             | Checks that the vendor found on the invoice image is present in the vendor data set. Must be enabled when vendor databases are used.                            | All                   |
| **Vendor details must be added to database**     | Checks whether a new vendor found on the image and saved to the vendor data set has been added to the database. Must be enabled when vendor databases are used. | ES, EU, JP            |
| **Vendor's bank details are required**           | Checks whether IBAN, Bank code, and Bank Account correspond to values in the vendor data set.                                                                   | ES, EU                |
| **Check vendor's bank details against database** | Checks that the vendor's bank details detected on the invoice image are the same as the bank details in the **Vendor** data set.                                | ES, EU, JP            |

### Invoice Header Data

| Rule                                                  | Description                                                                                                                                                                                                                                 | Enabled by default in |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| **Invoice number is required**                        | Checks that the **Invoice Number** field is not empty.                                                                                                                                                                                      | All \*                |
| **Invoice date is required**                          | Checks that the **Invoice Date** field is not empty. In Invoice Processing (JP), if the field is filled in but the year is not specified, the field value is replaced with a date in the format YYYY/MM/DD, where YYYY is the current year. | All \*\*              |
| **Delivery date is required**                         | Checks that the **Delivery Date** field is not empty. Has no effect if **Delivery Date Indicator** is set.                                                                                                                                  | None                  |
| **Delivery date must be earlier than Invoice date**   | The check performed is `Delivery Date <= Invoice Date`.                                                                                                                                                                                     | None                  |
| **Delivery date must not be earlier than a year ago** | The check performed is `Today - 365 (366) days <= Delivery Date`.                                                                                                                                                                           | None                  |
| **Check currency value**                              | Checks that the currency is one of the currencies specified for the project.                                                                                                                                                                | All                   |

\* Applied to all supported countries except Switzerland; in Invoice Processing (Au-NZ), applied to Canada, Australia, and New Zealand; in Invoice Processing (US), applied to Canada.

\*\* In Invoice Processing (Au-NZ), applied to Canada, Australia, and New Zealand.

### Amounts

| Rule                                                    | Description                                                                                                                                                                                           | Enabled by default in                 |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| **Total is a required field**                           | Checks that the **Total** field is not empty.                                                                                                                                                         | All                                   |
| **Amount check**                                        | Checks whether `Net Amount + Tax Amount = Total`. If additional costs or discounts are detected, checks whether `Net Amount + Tax Amount + Additional Costs = Total`.                                 | US, JP · N/A in ES, EU                |
| **Tax Rate field must not be empty**                    | If either Net Amount or Tax Amount is not empty, the respective Tax Rate should not be empty.                                                                                                         | ES, EU                                |
| **If tax rate is detected, pre-tax amount is required** | Checks that for each detected tax rate, the corresponding Net Amount field is not empty. Applied only to Germany.                                                                                     | All except Au-NZ                      |
| **If tax rate is found, tax amount is required**        | Checks that for each detected tax rate, the respective Tax Amount is not empty.                                                                                                                       | All except Au-NZ                      |
| **Total Tax is required field**                         | Checks that the `Amounts\Total Tax Amount` field is not empty. Applied to all supported countries except Germany.                                                                                     | ES, EU                                |
| **Check Tax field**                                     | Checks that for each detected tax rate, the respective Tax Amount is correct for the respective NetAmount and TaxRate (that is, that the equality `TaxAmount = (TaxRate / 100) * NetAmount` is true). | All except Au-NZ                      |
| **Check Total Tax field**                               | The check performed is `Total Tax Amount = Tax Amount 1 + Tax Amount 2`. Applied to all supported countries except Germany.                                                                           | All except Au-NZ                      |
| **Check Net Total field**                               | The check performed is `Total Net Amount = Net Amount 0 + Net Amount 1 + Net Amount 2`. If the Total Net Amount field is empty, this rule enters data into the field according to the calculations.   | ES, EU; CA depends on the field group |
| **Check Total field if total tax amount is required**   | Checks that the sum of the detected net amount, tax amount, and additional costs is equal to Total. Applied to all countries except Germany.                                                          | ES, EU, US                            |
| **Check Total field if total tax amount is optional**   | Checks that the sum of each found net amount, tax amount, and additional costs is equal to Total. Applied to Germany.                                                                                 | All except Au-NZ                      |
| **Verify net total against order items**                | Checks the sum total of the values in the `TotalPriceNetto` column of the **LineItems** table against the invoice amount prior to taxes (**TotalNetAmount**).                                         | None                                  |

### Purchase Order

| Rule                                                                | Description                                                                                                                        | Enabled by default in |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| **Check invoice line items count against order items count**        | Checks whether the number of line items in an invoice is the same as the number of line items in the corresponding purchase order. | None                  |
| **Check purchase order number and amount**                          | Checks whether the order number and amount captured from an invoice correspond to the orders in the **PurchaseOrders** data set.   | All \*                |
| **Copy PO data to TrainablePO**                                     | Copies the **PurchaseOrders** group fields whose regions have been found on the invoice to the group being trained.                | All                   |
| **Check if invoice line items are matched with unique order items** | Checks whether there are multiple line items in an invoice associated with the same line item in the purchase order.               | None                  |

\* Enabled if the **Purchase order matching** feature is enabled. For more information, see [Additional fields](/flexi-capture/invoice-reader/ir-additional-fields).

### Line Items

| Rule                                        | Description                                                                                                                                                                                                  | Enabled by default in  |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- |
| **Check item amount**                       | For each invoice item, checks that `Quantity * UnitPrice` is the same as TotalPriceNetto for the item after DiscountPercentage is applied.                                                                   | All \*                 |
| **Match invoice line item with order item** | Checks that each line item from an invoice has a corresponding item in the **PurchaseOrderItems** data set.                                                                                                  | All \*                 |
| **Check LineItems currency value**          | Checks that the currency of the line item is one of the currencies specified for the project.                                                                                                                | All \*                 |
| **Price per unit is required**              | Checks that the **Unit Price** column is not empty.                                                                                                                                                          | None † · N/A in ES, EU |
| **Line level Total is required**            | Checks that the **Total Price Netto** field is not empty.                                                                                                                                                    | None † · N/A in ES, EU |
| **Quantity is required**                    | Checks that the **Quantity** column is not empty.                                                                                                                                                            | None † · N/A in ES, EU |
| **Check GL Code**                           | Checks whether the value of the field is in the **GLCodes** data set. Also used to make a list of suggestions for stations.                                                                                  | All \*\*               |
| **Check cost center**                       | Checks whether the **VendorId**, the associated **BUId**, and the associated `LineItems/CostCenter` field are present in the **CostCenters** data set. Also used to make a list of suggestions for stations. | All \*\*               |

\* Enabled if the **Line items extraction** feature is enabled. For more information, see [Additional fields](/flexi-capture/invoice-reader/ir-additional-fields).

\*\* Enabled if the **Line items extraction** and **GL Coding** features are enabled. For more information, see [Additional fields](/flexi-capture/invoice-reader/ir-additional-fields).

† When enabled, applied to Canada, Australia, and New Zealand in Invoice Processing (Au-NZ), and to Canada in Invoice Processing (CA) and (US).

<Note>
  When using an external database, the country of a document is the country of the vendor's business unit. If no external database is used, the country is determined by an automatic country detector.
</Note>

## Service rules

These rules do not affect the status of a document and do not issue any messages to Operators. They are required for the correct operation of the FlexiCapture for Invoices Document Definition.

Any pre-configured rule can be disabled by the user in the Document Definition properties. You can also create user-defined rules. As above, **Enabled by default in** lists the project types where each rule ships enabled.

### Invoice Header Data

| Rule                                          | Description                                                                                                                                                                                                                                                           | Enabled by default in |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| **Detect invoice type**                       | If Invoice Amount is negative or the words "Credit note" are found, the invoice type is changed to **Credit note**.                                                                                                                                                   | All                   |
| **Delivery Date field is empty or completed** | Sets or clears the value of the **Delivery Date Indicator** field depending on whether the **Delivery Date** field is filled (if **Delivery Date** is empty, **Delivery Date Indicator** is not set). Has no effect if **Delivery Date Indicator** has been verified. | None                  |

### Amounts

| Rule                                                       | Description                                                                                                                                                                                                                                                                                                                                  | Enabled by default in      |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| **Reversed Charge field is empty or completed**            | If the only found VAT rate is 0, or the words "Reverse Charge" are found, the value of the **Reversed Charge** field is set to Yes.                                                                                                                                                                                                          | ES, EU                     |
| **Set currency to CAD or USD**                             | If no currency indicator is detected or if `$` is detected, sets the currency to Canadian dollars (CAD) if the vendor's country is Canada, or to US dollars (USD) if the vendor's country is the USA or any other country except Canada.                                                                                                     | CA, US, JP · N/A elsewhere |
| **Set currency to AUD or NZD**                             | If no currency indicator is detected or if `$` is detected, sets the currency to Australian dollars (AUD) if the business unit's country is Australia, or to New Zealand dollars (NZD) if the business unit's country is New Zealand.                                                                                                        | Au-NZ · N/A elsewhere      |
| **Detect national currency**                               | Automatically enters data into the **Currency** field (if it is empty) in invoices from France, Great Britain, and Spain.                                                                                                                                                                                                                    | All except Au-NZ           |
| **Complete Total Additional Cost field**                   | Computes the total amount of additional costs.                                                                                                                                                                                                                                                                                               | ES · N/A in EU, JP         |
| **Complete Tax Rate field if it is empty**                 | Computes the value of the tax rate if it is not found on the invoice image, provided that the other tax fields have been found.                                                                                                                                                                                                              | All except Au-NZ           |
| **Complete Total Tax field if it is optional**             | Automatically enters data into the `Amounts\Total Tax Amount` field for countries where this field is not obligatory. Applied only to Germany.                                                                                                                                                                                               | ES, EU                     |
| **Complete Total Tax field if only one tax rate is found** | Automatically enters data into `Amounts\Total Tax Amount` if there is only one tax on the invoice.                                                                                                                                                                                                                                           | ES, EU                     |
| **Get summary information for Amounts group**              | Enters data into the `Amounts\Summary` field based on the following values: Net0, Net1, Net2, Tax Amount 1, Tax Amount 2, Tax Rate 1, Tax Rate 2. Format: `Sum (= Net0 + Net1 + Net2 + Tax Amount 1 + Tax Amount 2) + AdditionalTaxGroups\NetAmount + AdditionalTaxGroups\TaxAmount)`; and VAT rates found on the invoice. Example: 256; 0%. | CA, ES, EU                 |
| **Copy currency from LineItems**                           | If the **Currency** field (for the **Total Tax Amount**) is not found, the value is copied from the **LineItems** table.                                                                                                                                                                                                                     | All except Au-NZ           |
| **Collect matched order items**                            | Compiles a list of PO line items that are already associated with their corresponding invoice line items (necessary for proper operation of PO Matching at the items level). In the case of manual comparison, the Operator sees only those invoice line items for which no match has yet been found in the purchase order.                  | All                        |

### Line Items

| Rule                                                            | Description                                                                                                                                                                                                                                                                                                                                                       | Enabled by default in                        |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| **If Order is checked make all corresponding line items valid** | If the **Is Valid** option is selected for one of the line items when [comparing invoice line items against the purchase order](/flexi-capture/invoice-reader/ir-po-matching#itembyitem), all the other line items are marked as valid.                                                                                                                           | All                                          |
| **Copy order number from PurchaseOrders group**                 | If the **Order Number** field of the **LineItems** table is not matched, the order number value is copied into this table from the **Order Number** field (the order number from the **PurchaseOrder** group of fields).                                                                                                                                          | All                                          |
| **Separate currency from amount in field**                      | Splits amount and currency and copies the currency to the **Currency** field if it is empty.                                                                                                                                                                                                                                                                      | US; CA, ES, EU, JP depend on the field group |
| **Add GL Code to Vendor**                                       | Checks whether the **GLCode** column in the **Vendors** data set contains the necessary value for a specific vendor. Performs the same check for both vendor and business unit if the **BusinessUnitId** column in the data set is mapped. If the **GLCode** column does not contain the necessary value, it is copied from the `LineItems/GLCode` field.         | All \*                                       |
| **Set suggests list for GL Code**                               | Creates a list of suggestions for the **GLCode** field from data in the **GLCodes** data set.                                                                                                                                                                                                                                                                     | All \*                                       |
| **Fill in GL code**                                             | Checks whether the **GLCode** column in the **Vendors** data set contains the necessary value for a specific vendor. Performs the same check for both vendor and business unit if the **BusinessUnitId** column in the data set is mapped. If the **GLCode** column contains the necessary value, it is copied from the data set to the `LineItems/GLCode` field. | All \*                                       |
| **Set suggest list for cost centers**                           | Creates a list of suggestions for the **GLCode** field from data in the **CostCenters** data set. The suggestions are filtered by their **BUId** values.                                                                                                                                                                                                          | All \*                                       |

\* Enabled if the **Line items extraction** and **GL Coding** features are enabled. For more information, see [Additional fields](/flexi-capture/invoice-reader/ir-additional-fields).

<Note>
  When using an external database, the country of a document is the country of the vendor's business unit. If no external database is used, the country is determined by an automatic country detector.
</Note>
