# Extraction automatique du code fiscal

## **Where to Enable It**

1. Go to **Settings → Document Processing → Classification and Extraction**.
2. Enable **Auto extract tax code**.

## **What Does It Do?**

* When enabled, the system **automatically populates the tax code field** in the **Validation Screen**, provided that a **tax code field** is set up.
* The logic used to determine the tax code is outlined in the table below.

<table data-full-width="true"><thead><tr><th>Invoice Document type</th><th></th><th>Tax Code</th><th>Or in Text field</th><th>PO number</th><th>Country of supplier</th><th>Rule</th></tr></thead><tbody><tr><td>Cost Invoice</td><td>With Tax amount</td><td>NAGDH</td><td>LD + % (rounded to highest ABS amount)</td><td>empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is company country</td></tr><tr><td>Cost Invoice</td><td>Without Tax amount</td><td>NAGD0</td><td>LD + % (rounded to highest ABS amount)</td><td>empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is company country</td></tr><tr><td>Cost Invoice</td><td>Without Tax amount</td><td>EUDH</td><td>ED 0 %</td><td>empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is different from company country and EU country in country table (tcmcs010)</td></tr><tr><td>Order invoice</td><td>With Tax Amount</td><td>NAHGH</td><td>IG + % (rounded to highest ABS amount)</td><td>Not empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is company country</td></tr><tr><td>Order invoice</td><td>Without Tax Amount</td><td>NAHG0</td><td>IG + % (rounded to highest ABS amount)</td><td>Not empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is company country</td></tr><tr><td>Order invoice</td><td>With Tax Amount</td><td>EUGH</td><td>ED 0 %</td><td>Not empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is different from company country and EU country in country table (tcmcs010)</td></tr><tr><td>Cost Invoice</td><td>Without Tax amount</td><td>IMGD</td><td>ID 0 %</td><td>empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is different from company country and is not an EU member in the country table (tcmcs010)</td></tr><tr><td>Order invoice</td><td>With Tax Amount</td><td>IMHG</td><td>IG 0 %</td><td>Not empty</td><td>Can be the 2 first digits of the TaX Id<br>or country of address of supplier tccom120.cadr --> tccom130.cadr field tcom130.ccty</td><td>When country is different from company country and is not an EU member in the country table (tcmcs010)</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-fr.docbits.com/administration-and-setup/settings/document-processing/classification-and-extraction/auto-extract-tax-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
