<< Back to VATs page | VAT calculation |
![]() |
Table tbl_vat
Product code | Client code | VAT category | |
---|---|---|---|
DB-field/ index |
vat_prodcode | vat_custcode | vat_categcode |
1. | A | X | |
2. | X | ||
3. | A | C | |
4. | C | ||
5. | A |
A customer X with VAT category C buys the product A .
It will be searched a record in one of the next situations in the specified order. First record found gives the final result.
1. PRODUCT+CLIENT
It will be searched if there is a record with Product code = A and Client code = X. If such a record exists, then this is the resulting vat - this means that the product A has a specific VAT value for the client X
2. CLIENT
It will be searched if there is a record with Product code = '' and Client code = X. This means that the client X has a generic VAT value for all the products.
3. PRODUCT+VAT CATEGORY
It will be searched if there is a record with Product code = A and VAT category = C. This means that the clients with VAT category C have a VAT value for the product A.
4. VAT CATEGORY
It will be searched if there is a record with Product code = '' and VAT category = C. This means that the clients with VAT category C have a default VAT value for all the products.
5. PRODUCT
It will be searched if there is a record with Product code = A and Client code='' and VAT category = ''. This means that the product A has a default VAT value for all the clients.
Obs: If none of the bellow situations is not fulfilled the 'vat' field from tbl_objects will be considered!