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

Import Taxes

Contents

Introduction

For importing taxes in Openbravo ERP, create a text file that defines the taxes. This file must be written following a specific format. This format must be introduced in the application. The file for the import of taxes is a plain text file that will insert data in three tables of the application DB: Tax Category (C_TaxCategory), Tax Business Partner Category (C_BP_TaxCategory) and Tax Rate (C_Tax). It is possible to insert or update data simultaneously in all the tree tables, or in a single one (for example inserting only Tax Categories but not tax rates).

File format by default

It is possible to define files in any format to import taxes, depending on your needs. The format that is most versatile is a plain text file using commas (,) as field delimiter. Each line is a record that contains the following fields:

(Note: some of these fields are mandatory depending on which data is going to be defined. For example, if the file is going to be used to create tax categories (but not tax rates or bp tax categories), only fields 12 and 13 should be filled.)

The file format is defined in the application in Master Data Management > Import Data > Import Loader Format.

Another file format

Another example of a tax import file format is defined in the Acceptance Testing document of the wiki (point 1.1.6). Here you can find a script that creates the format, and an example of a text file to import.

This is the aspect of this import format:

Import Loader Format

File example

An example of file used to import taxes is available here – text file:

VAT 3%,VAT 3%,3,01/01/2000,N,B,,ES,,ES,,VAT 3%,VAT 3%, VAT 10%, VAT 10%,10,01/01/2000,N,B,,ES,,ES,,VAT 10%,VAT 10%, VAT(3)+CHARGE(0.5),VAT(3)+CHARGE(0.5),3.5,01/01/2000,Y,S,,ES,,ES,,VAT 3%,VAT3%,Vat 3%+Charge 0.5% CHARGE 0.5%,CHARGE 0.5%,0.5,01/01/2000,N,S,VAT(3)+CHARGE(0.5),ES,,ES,,VAT 3%,VAT3%,Vat 3%+Charge 0.5% VAT 3%,VAT3%,3,01/01/2000,N,S,VAT(3)+CHARGE(0.5),ES,,ES,,VAT 3%,VAT3%,Vat 3%+Charge 0.5%

This file follows the format defined in the Acceptance Testing document.

Notice that each line in this file belongs to a tax rate to import. Moreover, some tax rates include the tax category to which they belong. If this tax category doesn't exist, it will be created. The same applies to the business partner tax category.

Import operation

Once the tax import format has been created, and so a file with taxes to import following this format, a tax import can be performed: Go to Master Data Management > Import Data > Import File Loader. Choose the file, and format file created. Click on "Ok" to preview the import, and "Process" to perform the import.

Go to Master Data Management > Import Data > Import Taxes, and then click on the "Import Taxes" button.

Retrieved from "http://wiki.openbravo.com/wiki/Import_Taxes"

This page has been accessed 9,110 times. This page was last modified on 11 June 2009, at 10:46. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.