View source | Discuss this page | Page history | Printable version   

Coworking:Tax Rate

This article is protected against manual editing because it is automatically generated from Openbravo meta-data. Learn more about writing and translating such documents.
Back button.png   Back to Coworking:Financial Management



Each tax rate in Openbravo is a combination of different variables such as the tax category, the rate and the business partner tax category among others.
If all those variables are properly setup the correct tax rate is automatically filled in every business transaction.

It is possible to create tax rates which are a combination of more than one tax rate.
That scenario can apply to a business partner who is subject to VAT and Income tax at the same time while renting an office to a third party out of its "normal" business activities.

Applying Taxes

Taxes are applied to orders and invoices. In this process there are two steps: associate the desired tax to the line and process the document that will apply the tax and calculate the actual amount.

Obtaining default tax

When in a document line (order or invoice) a product is selected, a default tax is associated to this line. Keep in mind that we can select the tax we want for this line. The selection of the default tax is achieved by the C_GetTax DB stored procedure. The rules followed by this procedure are as follows:

For sale transactions with an associated project, if a project has a tax rate, this tax rate will be taken. This works when an order is generated by a Project (Order). In this case the tax it is taken directly from the project line tax. For sale transactions, if a partner is marked as tax exempt, the selected tax will be the one checked as exempt with the most recent dated relative to the ordered or invoiced date.

Otherwise, the tax is selected from the ones defined in the same tax category as the product on the line. Taxes with defined business partner tax category can only be applied to those business partners with the same tax category (for vendor or customer). If the tax does not have a business partner tax category, it can be applied to any partner (with or without an associated tax category). If a tax with business partner tax category and another one without it can both be applied, the one with business partner tax category will be selected. In addition to this, the “to” and “from” locations are taken into account. At first those taxes defined for closer regions are selected (if a tax is for region and another one for country, the region one will be selected). This information is associated to the tax rate, through the “Tax Zone” tab. Taxes are applied taking into account if they are defined as Sales, Purchases or Both.

Apart from these rules, and only in the case of Purchase/Sales Orders and Invoices, the system will filter the tax rates taking into account the Cash VAT flag defined at the document's header too, which is automatically set based on the organization's and the business partner's configuration for sales and purchase documents respectively (although it can be manually overridden afterwards). Thus in case the document is enabled for the Cash VAT regime, the system will get a Cash VAT tax rate and the other way around.

Once the tax is selected (the default one, or another one selected by the user), an approximated amount is calculated by the SL_Order_Tax or SL_Invoice_Tax callouts. If the tax is checked as summary, the calculation will be done using the rate defined in the parent, not exploding it and taking the real values from its children. In addition, information c_order_tax and c_invoice_tax tables are populated with taxes at this point. The actual amount is calculated when the document is processed.

When creating a new invoice, it is possible to write down taxes manually and check them as “no recalculate”. In this case the tax will be applied with the amount written down in the tax tab of the invoice, so no recalculation will be done while processing the invoice. When a tax in an invoice is marked as recalculated, if the tax is edited manually all changes will be lost when processing the invoice. This is because the tax amount of the invoice is recalculated. “No recalculate” taxes are not associated to any invoice line, where as the recalculted ones are. So when a tax comes from a line, it will be checked as recalculate. If it is manually created, it won't be checked, and this value will be not updateable.

No recalculating taxes is useful for invoices that include tax lines without a product. For example, it can be used for imported products: these products usually have an invoice that is tax exempt and another invoice that is created by the custom broker without any product, but a tax amount for the imported products.

Calculating actual amount

When these documents are processed (c_order_post and c_invoice_post), the actual taxes and amounts are calculated from the selected taxes (unless they are defined as “no recalculate” for invoices) following these steps:

Every tax at C_OrderTax or C_InvoiceTax tables is deleted. This is done because the taxes in these tables before the process of the document are for information only and can be inaccurate.

A new line is created in C_OrderTax or C_InvoiceTax tables for every different tax applied to the lines of the document (each line will have only one tax). The amount paid to the tax is calculated from the base amount of the lines that are associated to this tax.

For taxes defined as summary, a new line is inserted for each of its children and the amount is calculated taking into account whether or not the children are cascade.


Tax rate window allows to create as many tax rates as required.


The fields to fill in to properly setup a tax rate are:

Bulbgraph.png   Openbravo for Retail (Web POS) calculates the tax amount only using Line base amount by rate rule. So for Openbravo for Retail installations this field has to be set to Line base amount by rate to avoid different taxes calculation for orders created from Web POS and backoffice.

Under "More Information" section there are also few relevant fields:

The way Deductible and Not Deductible tax rates behave in terms of accounting is explained below:

Account Debit Credit Comments
Product Expense Line Net Amount One per invoice line
Tax Credit Tax Amount One per tax line
Vendor Liability Total Gross Amount One per invoice
Account Debit Credit Comments
Product Expense Line Net Amount + Tax Amount One per invoice line and tax rate
Vendor Liability Total Gross Amount One per invoice

Tax rates examples:

Tax Zone

Tax zone defines the origin country/region and destination country/region where a given tax rate applies,
for those case where it is not enough to define only one "Origin" Country/Region and only one "Destination" Country/Region at header level

For instance an "Export" tax rate must detail as Origin Country/Region the location of the warehouse organization and as Destination Country/Region the rest of countries and regions where it is possible to export the goods. This tax rate would apply to sales transactions between the "local" organization and its customers located abroad.

Same would apply to an "Import" tax rate, in this case Origin Country/Region would be all the country from where goods can be imported and the Destination Country/Region would be Organization one.


Tax rates can be translated to any language required.


Accounting tab allows to configure the account to be used while posting tax rate transactions to the general ledger.


A purchase invoice posting looks like:

Account Debit Credit Comments
Product Expense Line Net Amount One per invoice line
Tax Credit Tax Amount One per tax line. For Cash VAT regime the Tax Credit Transitory account is used instead.
Vendor Liability Total Gross Amount One per invoice

And a sales invoice posting looks like:

Account Debit Credit Comments
Customer Receivable Total Gross Amount One per invoice
Product Revenue Line Net Amount One per Invoice Line
Tax Due Tax Amount One per Tax Line. For Cash VAT regime the Tax Due Transitory account is used instead.

"Negative" Withholding tax rates needs to have specific accounting information in this tab in order to get that withholding tax amounts are posted in a different account.

Below posting applies in the case that the "Allow Negative" feature is not enabled either for the General Ledger configuration used while posting or for the Document Type which in this case is an "AP Invoice"

In other words, a negative withholding posting means a negative debit posting which will turn into a positive credit posting if allow negative feature is not enable.

Account Debit Credit Comments
Product Expense Line Net Amount One per Invoice Line
Tax Credit Tax Amount One per tax line. For Cash VAT regime the Tax Credit Transitory account is used instead.
Tax Credit Withholding Amount One per withholding line
Vendor Liability Total Gross Amount (Line Net Amount+Tax Amount-Withholding Amount)

Full list of Tax Rate window fields and their descriptions is available in the Tax Rate Screen Reference.

Back button.png   Back to Coworking:Financial Management

Retrieved from ""

This page has been accessed 2,289 times. This page was last modified on 13 June 2013, at 15:52. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.