_setCarCosts

(API version 2.0)

int _setCarCosts ( string kodf , string username , string pass , WDS_CarCostsItem costdata )

Description

Function change costs and add new ones.

Categories

Parameters

string kodf
company code
string username
user name
string pass
password
WDS_CarCostsItem costdata
  • string Datum

    date (local time)

  • string Cislo

    number

  • string Zdroj

    Source of fuel. One of constants:

    0 - Information system
    1 - Manually
    2 - Card
    3 - Home charging
    4 - Company charging
    5 - Unknown charging

    Or source as text string. If constant 3 (Home charging) is entered, VAT is not calculated and Price with VAT = Price without VAT.

  • string Typ

    Type
    If the type is empty, it is filled with IsFuel.

  • string Popis

    description

  • string Misto

    place

  • float km

    kilometres

  • int mh

    moto hours odometer

  • float Mnozstvi

    amount

  • float Cenamj

    price per unit without VAT

  • float Cenabezdph

    total price without VAT

  • float Dph_procent

    percentage VAT rate

  • float Dph

    total price amount of VAT

  • float Cenacelkem

    total price including VAT

  • string Mena

    currency

  • int carid

    vehicle's ID

  • int IsFuel

    1 - fuel
    2 - CNG
    3 - electricity
    0 - other

  • int PaidDriver

    Paid by driver 0/1

  • long IdCost

    cost's ID

  • string Note

    note

  • string User

    user name

  • string Driver

    driver

  • string Supplier

    supplier

  • int IsFull

    tanked to the full 0/1

  • int TankId

    petrol station's ID - from own places

  • string TankSt

    petrol station

  • int TankR

    refuel direction:
    0 - not specified
    1 - ban
    4 - only small amount of petrol to drive to allowed petrol station
    8 - tank to the full

  • int IdDriver

    driver's ID

  • int Druh_stanice

    Type of station.
    0 .. public
    1 .. corporate
    2 .. homemade
    3 .. unrecognized
    If the entered value is > 3, 3 is entered.

  • string ExternalID

    Unique identificator

Return value

int

0 - incorrect login
-1 - missing edit permissions
-2 - car id not found or user has not permissions
-3 - logbook is locked
-4 - duplication
-5 - cost was not found
-6 - cost doesn't belong to user, who can edit only own costs
-7 - cost can not be in future

Examples

API version 2.0

$client = new SoapClient('https://api.webdispecink.cz/code/WebDispecinkServiceNet.php?wsdl');
$return = $client->_setCarCosts($kodf, $username, $pass, $costdata);

Test

To test the function, enter parameters in form below and press Try it out button.

company code
user name
password
WDS_CarCostsItem costdata
date (local time)
number
Source of fuel. One of constants:

0 - Information system
1 - Manually
2 - Card
3 - Home charging
4 - Company charging
5 - Unknown charging

Or source as text string. If constant 3 (Home charging) is entered, VAT is not calculated and Price with VAT = Price without VAT.
Type
If the type is empty, it is filled with IsFuel.
description
place
kilometres
moto hours odometer
amount
price per unit without VAT
total price without VAT
percentage VAT rate
total price amount of VAT
total price including VAT
currency
vehicle's ID
1 - fuel
2 - CNG
3 - electricity
0 - other
Paid by driver 0/1
cost's ID
note
user name
driver
supplier
tanked to the full 0/1
petrol station's ID - from own places
petrol station
refuel direction:
0 - not specified
1 - ban
4 - only small amount of petrol to drive to allowed petrol station
8 - tank to the full
driver's ID
Type of station.
0 .. public
1 .. corporate
2 .. homemade
3 .. unrecognized
If the entered value is > 3, 3 is entered.
Unique identificator

* Required field