Skip to main content

Rates

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

TRT

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
ratetypeenumeration: time, quantitySpecifies the rate type.

Read

Web service type: XML Web Services

XML

This example reads the rate settings of the rate with: EXAMPLE

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

If the rate does not exist an empty projectrate element is returned containing an error.

Create/Update/Delete

If a rate is not found it will be automatically created, otherwise it is updated. Set projectrate/@status to deleted for deleting a rate.

Root

XML structure
<projectrate>
<ratechanges></ratechanges>
</projectrate>

Element name: projectrate

NameDescription
projectrateContains information general to the rate.
ratechangesContains detailed information of the rate.

Projectrate

XML structure
<projectrate>
<office></office>
<code></code>
<name></name>
<shortname></shortname>
<type></type>
<unit></unit>
<currency></currency>
<ratechanges></ratechanges>
</projectrate>

Element name: header

NameTypeDescription
@statusactive
deleted
hide
For creating and updating status may be left empty. For deleting deleted should be used. In case a rate that is in use, its status has been changed into hide. Hidden rates can be activated by using active.
officecodeOffice code.
codecodeRate code.
namestring(40)Rate description.
shortnamestring(20)Short rate description.
typequantity
time
The rate type.
unitintegerHow will be charged e.g. if charged per hour Time, set it to 1. If charged per 8 hours, set it to 8. Quantities refers to items such as kilometers. If charged per kilometer set it to 1.
currencycodeCurrency code.
ratechangesnodeContains rate per begin date and end date.

Rate changes

XML structure
<ratechange id="">
<begindate></begindate>
<enddate></enddate>
<internalrate></internalrate>
<externalrate></externalrate>
</ratechange>
info

At least one rate line is required.

Element name: ratechanges

NameTypeDescription
@idintegerLine ID.
@lastusedObsolete.
@statusStatus of the rate line.
begindateDateBegin date of the rate.
enddateDateBegin date of the rate.
internalratedoubleThe internal rate e.g. the cost price per unit.
externalratedoubleThe external rate e.g. the selling price per unit.

Example

<projectrate>
<office>001</office>
<code>KM</code>
<name>kilometer</name>
<shortname>kilometer</shortname>
<type>quantity</type>
<unit>1</unit>
<currency>EUR</currency>
<ratechanges>
<ratechange>
<begindate>20000101</begindate>
<enddate>20200101</enddate>
<internalrate>0.1500</internalrate>
<externalrate>0.3200</externalrate>
</ratechange>
</ratechanges>
</projectrate>