Syntax 

long PCMSGetTollBreakdown(Trip trip, int discProgram, char *state)


Parameters 

Trip trip  Handle to a trip.

int discProgram – The index value (integer) of the discount program for which the toll amount will be returned.  If this value is zero (0), it refers to cash.

char *state – If a state or jurisdiction abbreviation is specified, the returned toll amount is in that state only.  If state is an empty string, all states are included.


Description

Gets the toll amount attributable to a particular discount program. Note that if the Toll Mode is set to 1 (all cash) using PCMSSetTollMode, a value of zero will be reported for all programs except cash. This feature is only available if the PC*MILER|Tolls add-on module is installed.

 

Return Values 

Returns a toll amount in cents. -1 indicates an invalid trip ID or index value.


Sample Code

{
    PCMSGetTollDiscountName(server, i, programName, 20);
    programTolls = PCMSGetTollBreakdown(trip1, I, “ “)/ 100.0;
    printf("%s Tolls = $%.2f\n", programName, programTolls);
}


Supported Since: PC*MILER|Connect 21

Category: Trip Management