Importing batches/vouchers

This section describes importing batches/vouchers.

Importing batches/vouchers

When you want to import data, you must decide which fields you want to import and what values the fields are to have. You must know what names the tables and fields have in the database.

You can import data into Visma Business by selecting "Home/Company/Import" or by running Visma Business in command/import mode. This latter method is explained later in the chapter.

General

Which columns must be assigned values and which values must be used

If for example you want to import batches with voucher lines, you can do the following:

  1. Retrieve the fields you want to import.
  2. Select the rows you want to import.
  3. Write the window to file

You write the window to file as follows:

  1. Shift + the Print icon
  2. enter the path and file name

You can now compare the data in the file with the data on the screen. The fields occur in the same sequence in the file as on screen. You can leave out number and text fields that are 0 or blank. You can also leave out fields to which Visma Business automatically allocated a value.

Heading with table name and field names

In front of the first row on a new table, there must be a heading with the name of the table and the fields; see the section on syntax above.

You can create the heading as follows:

  1. Retrieve the required table.
  2. Select the fields you want to include.
  3. If required, select one or more rows.
  4. Select Home/Print/Page setup
  5. On the General tab, select write to file.
  6. Click on search and select the path and file name.
  7. Go to the File parameters tab and select Name in the drop-down list under table heading.
  8. Then select Home/Print/Print.

The file contains a heading as it will appear on import.

Fields that are filled in automatically during voucher registration

The fields below must be included in the import file if they are important for the data.

The Origin of batches field

All batches that are produced or entered in Visma Business are given an origin code in the Origin field. Batches without an origin code are imported. We recommend that the system that exports data uses the value 12 [Import] in this field.

Tax processing/Currency processing

There is a minimum of fields that must be included in the import file for tax processing and currency processing.

Tax processing:

Currency processing:

Calculations in the voucher lines

If the currency number and currency amount are specified, Visma Business calculates the amount in default currency if this is not present in the voucher line. If the exchange rate is not specified, the selling rate in the Currency table will be used.

Values in the batch head and on the voucher lines which Visma Business imports

The values in financial year and period, tax year and term,

You do not need to register financial year and period, tax year or term for the batches or vouchers when you have registered the value date. Visma Business will find the values when you update the vouchers. Visma Business will find the values from the date intervals in the Accounting periods and VAT periods tables. If the date ranges overlap within one of the tables, Visma Business selects the first period/term that includes the date. For example, if both accounting periods 12 and 13 expire on 31 December, you must indicate the financial year and period for vouchers that are to be referred to period 13. The value date for the batch will be used as the voucher date and value date for the transactions if the dates are not included on the voucher lines.

Currency

If the fields for the currency in question have not been completed, they will be completed with the values for default currency for the transactions. If there is no amount field in default currency on importing of a voucher line, but currency number and amount in currency are given, it will be calculated from the exchange rate on the row.

Due Date

If the due date is not specified on the voucher lines, it will be calculated from the customer or supplier, or alternatively standard payment terms in the Bedriftsopplysninger table or net 30 days.

Account type

When you want to import vouchers, you should state the debit and credit account type, in order to be independent of the definitions in the Account no. series table.

Turnover class

If there is no turnover class on the voucher line, it is calculated from the Area field in the Associates table and the current tax code, or it is retrieved from the General ledger accounts table.

Invoice number

If there is no invoice number for a ledger transaction and a voucher type has been used in which Affects turn./purch. has been selected, the invoice number is set the same as the voucher number.

Reference

When no reference is specified in the voucher line the invoice number is used as a reference number. Alternatively, the voucher number is used if there is no invoice number.

What must be included in the import file for batches and vouchers

The batch head (WaBnd) should/must include the following:

Field name SQL name Description
Batch no. BndNo The file must never contain the "Batch no." field
Value date ValDt There must always be a value date if you do not want to enter it manually.
Origin SrcTp Enter original = 12, for import.
Description Descr We recommend that you enter a description

The voucher lines must contain the following:

Field name SQL name Description
Voucher no. VoNo  
Voucher date VoDt  
Debit account/Credit account type DbAcCl/CrAcCl Debit account type or credit account type, depending on whether it is a debit or credit posting. This is to ensure that customers and suppliers are not seen as a general ledger account.
Debt tax code/Credit tax code DbTxCd/CrTxCd Debit tax code or credit tax code, must be included in the case of a general ledger transaction which is to be subject to tax.
Voucher type VoTp Voucher type, because it determines how the voucher will be processed.

The voucher lines should include:

Field name SQL name Description
Cust. no. Cust Customer number, if it is a customer transaction as well as a debit or credit account
Sup. no. Sup Supplier number, if it is a supplier transaction
VAT amount VatAm If the VAT amount is known, you can enter it in the "VAT amount" field. The "Trans. status" field must then have the value "1". This means an overridden VAT amount. This amount will then be used.
Debit turnover class/Credit turnover class DbTrnCl/CrTrnCl Debit turnover class or Credit turnover class, if you want information via the tax classes in Visma Business.
Text Txt Voucher text, which explains the voucher line.
Merk: The debit turnover class must be included if it is not given in the general ledger accounts or in the VAT code.

The voucher lines should not include:

Field name SQL name Description
Value date ValDt Value date, if you do not want to override the value date in the batch head
Currency no Cur Currency number, exchange rate and amount in currency, if it is a domestic currency and you are not simultaneously registering correct values in all the fields.
Exchange rate ExRt Currency number, exchange rate and amount in currency, if it is a domestic currency and you are not simultaneously registering correct values in all the fields.
Amount in currency VcurAm Currency number, exchange rate and amount in currency, if it is a domestic currency and you are not simultaneously registering correct values in all the fields.
VAT amount VatAm If the VAT amount is known, you can enter it in the "VAT amount" field. The "Trans. status" field must then have the value "1". This means an overridden VAT amount. This amount will then be used.
Total debit/Total credit SmDb/SmCr Total debit and Total credit are recalculated when you save. Therefore you should not include the fields during import.

In order to be certain that the import file contains the necessary data, you should register a voucher manually. You then bring up all the fields in order to see which fields are completed automatically and which fields are hidden.

Example of import of batch

Below is an example of a file that updates company number 1 by first updating the Associates table with new and changed customers and then adding new batches and voucher lines. In the example, the VAT amount is a separate transaction with overridden "VAT amount". "Trans. status" will then also be included. On a credit note, "Cross reference" must be used to refer to the invoice that will be credited, so that it can be matched automatically.

@FIRM_BEGIN(1)
@IMPORT_METHOD(1)
@Actor (=CustNo,Nm,Ad1,Ad2,PNo,PArea,Ctry,Phone,Fax,CpmtTrm,Cur)
10001 "Dataspesialisten AS" "Ruseløkka 61" "0457" "OSLO" "NO" 15 "NOK" 
10010 "Kontorservice AS" "Bentsebrugate 21" "0461" "OSLO" "NO" 15 "USD"
@IMPORT_METHOD(3)
@WaBnd(Descr,ValDt,SrcTp)
"Imported from another application" 20181002 12
@WaVo(VoNo,Valdt,VoDt,Votp,Txt,DbAcNo,DbTxCd,DbTrnCl,DbAcCl,CrAcNo,CrTxCd,CrTrnCl,CrAcCl,TransSt,VatAm,Cur,CurAm,ExRt,Am,InvoNo,DueDt,AgRef,R1,R2,R7,Cust,Sup)
1 0 20181002 11 "Outgoing invoice" 10001 0 0 1 0 0 0 0 0 0 "0" 0 0 1250.00 1 20181101 "" 0 0 "" 10001 0 
1 0 20181002 11 "Outgoing invoice" 0 0 0 0 3000 3 0 3 1 0 "0" 0 0 1000.00 1 0 "" 0 0 "" 10001 0 
1 0 20181002 11 "Outgoing invoice" 0 0 0 0 2700 0 0 3 0 0 "0" 0 0 250.00 1 0 "" 0 0 "" 10001 0 
2 0 20181002 11 "Outgoing invoice" 10010 0 0 1 0 0 0 0 0 0 "USD" 100.00 8.000000 800.00 2 20181101 "" 0 0 "" 10010 0 
2 0 20181002 11 "Outgoing invoice" 0 0 0 0 3100 4 0 3 0 0 "USD" 100.00 8.000000 800.00 2 0 "" 0 0 "" 10001 0

Example of import of batch with a minimum of fields

An example is given below of an import file with a minimum of fields and where the voucher does not have current and responsibility units. Tax processing assumes that an account plan has been added to account plan/VAT codes, and there are correct account number series for customer, supplier and general ledger accounts. Visma Business calculates the VAT amount on updating, which can lead to rounding differences between invoicing system and the accounting.

@IMPORT_METHOD(3)
@WaBnd(ValDt)
20181002
@WaVo(VoNo,VoDt,VoTp,DbAcNo,DbTxCd,DbTrnCl,DbAcCl,CrAcNo,CrTxCd,CrTrnCl,CrAcCl,AmExVAT,VatAm,Am,InvoNo,DueDt)
1 20181002 11 10001 0 0 1 0 0 0 0 1250.00 0 1250.00 1234 20181101
1 20181002 11 0 0 0 0 3000 3 1 3 1000.00 250.00 1250.00 1234 0


Vi setter pris på dine tilbakemeldinger. Send tilbakemelding til Visma på dette emnet.