_getCarRentalBilling

(API version 2.0)

WDS_CarRentalBillingItem[] _getCarRentalBilling ( string kodf , string username , string pass , string from , string to [ , int carid ] )

Description

Return all loans for specific period.

Categories

Tags

Parameters

string kodf
Company code
string username
Login username
string pass
Login password
string from
Date from [UTC time, format: yyyy:mm:dd hh:mm:ss]
string to
Date to [UTC time, format: yyyy:mm:dd hh:mm:ss]
int carid

Return value

WDS_CarRentalBillingItem[]
  • WDS_CarRentalBillingItem
    • int orderid

      Order id

    • string ordernumber

      Order number [ YEAR-XXXXXX ]

    • string datefrom

      Date from [UTC time, format: yyyy:mm:dd hh:mm:ss]

    • string dateto

      Date to [UTC time, format: yyyy:mm:dd hh:mm:ss]

    • int carid

      Car id

    • string numberplate

      Vehicle registration number

    • int driverid

      Driver id

    • string drivername

      Driver name

    • string drivercenter

      Driver center

    • string costcenter

      Cost center of Vehicle

    • int type

      0 - business, 1 - private, 2 - car servis, 3 - short-term-lease

    • string carapprover

      Car approver

    • string rideapprover

      Ride approver

    • string keygive

      User who gives a key

    • string keyget

      User who gets a key

    • int officeid

      Office id

    • float km

      Total km

    • WDS_CarRentalRouteItem[]

      Loans splited to days

      • WDS_CarRentalRouteItem
        • string datefrom
        • string dateto
        • float km
        • long idroute
    • string keystartdate

      date of receipt of the keys (start of the loan) [UTC time, format: yyyy:mm:dd hh:mm:ss]

    • string keyenddate

      date of return of keys (end of loan) [UTC time, format: yyyy:mm:dd hh:mm:ss]

    • string datecancel

      the date and time of cancellation [UTC time, format: yyyy:mm:dd hh:mm:ss]

    • string driverpersonalnumber

      driver/employee identification (personal number)

    • string datevehicleassign

      date and time of vehicle assignment

    • float rentseconds

      number of seconds of rental

      How is rentseconds calculated:

      There are 7 different important time parameters:
      booking (the time at which the user created the reservation)
      cancellation (the time of reservation/rental cancellation by user/systém from CarSharing webadmin or Webdispecink)
      assignment (the time at which the systém assigned a vehicle to a booking)
      from (planned start of the booking)
      to (planned end of the booking)
      rental-start (the time when the user took over the vehicle)
      rental-end (the time when the user returned the vehicle)

      Here are 17 different scenarios based on these 7 time parameters:
      1) booking -> assignment -> from -> rental-start -> to -> rental-end (car assignment before from, rental-start later and didnť return car in time) = the result is interval from–rental-end
      2) booling -> assignment -> from -> rental-start -> rental¬-end -> to (car assignment before from, rental-start later and returned car in time) = the result is interval from–rental-end
      3) booking -> assignment -> rental-start -> from -> to -> rental-end (car assignment before from, rental-start earlier and didnť return car in time) = the result is interval rental-start–rental-end
      4) booking -> assignment -> rental-start -> from -> rental-end -> to (car assignment before from, rental-start earlier and returned car in time) = the result is interval rental-start–rental-end
      5) booking -> from -> assignment -> rental-start -> from -> rental-end (car assignement late = rental-start late and didnť return car in time) = the result is interval assignment–rental-end
      6) booking -> from -> assignment -> rental-start -> rental-end -> to (car assignement late = rental-start late and car returned in time) = the result is interval assignment–rental-end

      CANCELLATION BY SYSTEM = „TO“
      7) booking -> from -> to (cancellation – there was never an assigned car) = the result is 0
      8) booking -> from -> assignment -> (cancellation – late assignment, car was never picked up) = the result is interval assignment–to
      9) booking -> assignment -> from -> to (cancellation – asignment before from, car was never picked up = the result is interval from–to

      BOOKING CANCELLATION BY USER/ FROM WEBADMIN
      10) booking -> assignment -> cancellation -> from (booking cancellation with assigned car before planned start of the booking) = -> the result is 0
      11) booking -> assignment -> from -> cancellation (booking cancellation with assigned car after planned start of the booking) = the result is interval assignment–cancellation
      12) booking -> cancellation (booking cancellation with no car assignment before the start of the reservation => we don’t count at all = same as result is 0
      13) booking -> from -> cancellation (booking cancellation with no assigned car after the start of the reservation) = the result is 0

      RENTAL CANCELLATION (FROM WEBADMIN)
      14) booking -> assignment -> from -> rental-start -> cancellation (assignment before from, rental start later) = the result is interval from–cancellation
      15) booking -> assignment -> rental-start -> from -> cancellation (assignment before from, rental start earlier than from and cancellation after from) = the result is interval rental-start– cancellation
      16) booking -> assignment -> rental-start -> cancellation (assignment before from, rental start earlier than from, cancellation befor from) = the result is interval zahajeni_zap– cancellation
      17) booking -> from -> assignment -> rental-start -> cancellation (car assignment late led to cancellation after from) = -> the result is interval assignment–cancellation

Examples

API version 2.0

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

Test

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

Company code
Login username
Login password
Date from [UTC time, format: yyyy:mm:dd hh:mm:ss]
Date to [UTC time, format: yyyy:mm:dd hh:mm:ss]

* Required field