Custom Queries & Report Queue: Derived Fields odometer
User-defined queries, stored procedures, and report queue
Derived Fields odometer
This library is used to calculate odometer readings based on existing validated readings using rules defined in Estimated Odometer Calculation.
These readings are shown on screens and used in various reports, such as the Service Due Report.
This library can also be used with the following scheduler job methods: executeQuery, mailQuery, and eventQuery.
This library can also be used with the following APIs: printReportQuery and triggerTableImportProcedure.
Query Header
The following lines must be included in your query header:
## odometer ## library_type standard ## library_path /lib/PDF ## library_name odometer Input Fields
Output Fields
Derived Fields payroll_advice
This library is used to calculate an annual fbt_payable amount.
Use this for new 'Statutory Method' contracts to get an annualised FBT Payable amount.
It can be used in Scheduler Queries and Screen Reports.
Note: This library is not related to the Payroll Advice form. Those calculations are not the same.
Note: The Print a report query API does not support derived field libraries.
Input Fields
Output Fields
Sample Query
## library_type standard ## library_path /fleet/administration/contracts/templates ## library_name payroll_advice SELECT t1.contract_id, '->fbt_payable' AS fbt_payable FROM fm_contracts AS t1; Derived Fields performance_nofb
Derived fields from the /lib/PDF/performance_nofb library
This library is used to calculate FBT operating information.
Input Fields
Output Fields
Derived Fields rentals
Derived fields from the /lib/PDF/rentals library
This library is used to calculate rental amounts and associated finance information.
Input Fields
Output Fields
Derived Fields service
Derived fields from the /lib/PDF/service library
This library is used to calculate service due information based on existing validated readings from the system.
See also the Estimated Odometer Calculation page for the logic used when an odometer reading needs to be estimated for this library.
These readings are used in the Service Due Report.
This library can be used with the triggerTableImportProcedure API.
This library can be used with the Print a report query API.
Input Fields
Output Fields
Derived Fields vehicle_photos
This library is used to obtain a single photo code per variant.
This library can also be used with the following scheduler job methods: executeQuery, mailQuery, and eventQuery.
This library can also be used with the following APIs: printReportQuery.
Query Header
The following lines must be included in your query header:
## vehicle_photos ## library_type standard ## library_path /lib/PDF ## library_name vehicle_photos Input Fields
Output Fields
photo_code β Table may contain multiple photo_code values for a given variant_id (e.g. front, rear, etc.). 'Front' is treated as the default followed by Side, Interior, and Rear respectively. If no photo_codes exist, the value 'no_photo' will be returned.