Skip to main content

VAT

Find

Web service type: Method driven

Resource location: /webservices/finder.asmx?wsdl

Method

public Message[] Search(
string type, // Finder type, See Finder type.
string pattern, // The search pattern. May contain wildcards * and ?
int field, // Fields to search through, see Search fields.
int firstRow, // First row to return, usefull for paging
int maxRows, // Maximum number of rows to return, usefull for paging
string[][] options, // See options below
out FinderData data) // Search results

Finder type

VAT

Search fields

Field IDFields searched
0code and name
1code
2name

The method will return an array containing validation messages. If there are no errors, then the data parameter will contain the actual search result.

Options

OptionTypeDescription
vattypeenumeration: purchase, salesSpecifies the VAT type.

Read

Web service type: XML Web Services

XML

Below example reads the settings of VAT code EXAMPLE.

<read>
<office>001</office>
<type>vat</type>
<code>EXAMPLE</code>
</read>

Create/Update/Delete

If VAT is not found it will be automatically created, otherwise it is updated. Set dimensiongroup/header/@status to deleted for deleting dimension group.

Root

XML structure
<vat>
<percentages></percentages>
</vat>

Element name: vat

NameDescription
vatContains information general to the VAT.
percentagesContains the percentages information of the VAT.

VAT

XML structure
<vat status="">
<office></office>
<code></code>
<name></name>
<shortname></shortname>
<type></type>
<percentages></percentages>
</vat>

Element name: vat

NameTypeDescription
@statusactive
deleted
For creating and updating active should be used. For deleting deleted should be used.
officecodeOffice code.
codecodeVAT code.
namestring(40)Name of the VAT.
shortnamestring(20)Short name of the VAT.
typesales
purchase
The VAT type.
uidstringUnique identification of the VAT code.
Read-only attribute.
createddatetimeThe date/time the VAT code was created.
Read-only attribute.
modifieddatetimeThe most recent date/time the VAT code was modified.
Read-only attribute.
touchedintegerThe number of times the VAT code is modified.
Read-only attribute.
usercodeThe code of the user who created or modified the VAT code.
Read-only attribute.
percentagesnodeThe percentages part of the VAT.

Percentages

XML structure
<percentages>
<percentage></percentage>
</percentages>

Element name: percentages

NameTypeDescription
percentagepercentagePercentage line of the VAT code.

Percentage

XML structure
<percentage>
<date></date>
<percentage></percentage>
<name></name>
<shortname></shortname>
<accounts></accounts>
</percentage>

Element name: percentage

NameTypeDescription
datedateEffective date.
percentagedoublePercentage of the VAT line.
namestring(40)Name of the VAT line.
shortnamestring(20)Short name of the VAT line.
accountsnodeAccount settings of the VAT lines.

Accounts

XML structure
<accounts>
<account></account>
</accounts>

Element name: accounts

NameTypeDescription
accountnodeAccount settings of the single line.

Account

XML structure
<account>
<dim1></dim1>
<groupcountry></groupcountry>
<group></group>
<percentage></percentage>
<linetype></linetype>
</account>

Element name: account

NameTypeDescription
@idintegerLine ID.
dim1codeGeneral ledger account on which the VAT amount will be posted.
groupcountrycodeCountry code of the VAT group.
groupcodeThe VAT group.
percentagedoubleThe VAT percentage.
linetypevat
detail
Is it a vat line or not detail. Use detail in case a part of the calculated vat value should be posted on a different general ledger account.

Example

<vat>
<code>VH</code>
<name>BTW 21%</name>
<shortname>VH 21%</shortname>
<type>sales</type>
<percentages>
<percentage>
<date>20121001</date>
<percentage>21</percentage>
<name>BTW 21%</name>
<shortname>VH 21%</shortname>
<accounts>
<account>
<dim1>1530</dim1>
<groupcountry>NL</groupcountry>
<group>NL1A</group>
<percentage>100</percentage>
<linetype>vat</linetype>
</account>
</accounts>
</percentage>
</percentages>
</vat>