User Condition and Contract Compare

yellowbox

User Condition Section

The User Condition section consists of a blank text field where you can enter SQL Statements to make custom modifications to the Driver Pay Rules. You can access the 'User Condition' field by clicking the 'Show Memo' button visible just beneath the lower tabs section of the Pay Contracts program. Once displayed, the 'Show Memo' button will change to a 'Hide Memo' button, which will toggle the 'User Condition' field off again.

If you hover your mouse over the User Condition field, you will notice a pop-up description of two SQL Scripts. These scripts read:

SELECT (*) FROM LEGSUM WHERE LS_LEG_ID = 999 AND
SELECT (*) FROM TLORDER WHERE DETAIL_LINE_ID = 999 AND
The first SQL Statement is applicable to Trip Based pay rules, and the second is applicable to Freight Bill based pay rules. You can tell which of these statements is being used by checking the value in the 'Trip Based' field in the above grid. If 'Trip Based' is set at 'True', the first statement will be used. If not, the Freight Bill based rule will be used.

What do I enter in the User Condition field?

Any SQL that is entered into the User Condition field must take into account the above SQL Statements- the User must, in effect, finish the 'AND' clause that is defined by this SQL Script. The User does not need to enter either of the two statements described above, as they are entered automatically.

Contract Compare Window

image51

On the Contract Compare screen, the User must choose the following:

Driver ID: This field represents the current Driver whose pay you want to compare. The Driver’s associated contract is displayed directly beneath this field.

Date Range: Enter a Date Range for calculation purposes. The Contract Compare functionality will recalculate pay for the Trip(s) and Freight Bill(s) the selected Driver was on between the dates specified by the Date Range.

Simulation Driver: The new pay records will be created using this Driver ID, so that the Driver Pay for the current Driver (the 'Driver ID' selected above) will not be adversely affected by these calculations. The simulation driver must not be 'Active' for Driver Pay, and must not have a Driver Pay Contract assigned to them.

  1. Ensure that the 'Simulation Driver' is NOT SET TO A REAL DRIVER’S 'Driver ID'! Doing this will seriously damage your Driver Pay records.

  2. Do not run the Driver Pay Register program while new pay records are displayed in this window. If any other Users may be doing so, do not use this Comparison tool, as the simulated Pay records will be posted into actual Driver Pay.

The User should then select the 'Create Pay' button. The Driver Pay simulation will be calculated based on the current contract on the main Driver Pay Contracts form. New pay records are added to the DRIVERPAY table, and a new table, DRIVERPAY_SIM, is created to so that the amounts can be compared. The records added to the DRIVERPAY table will be deleted (and created) each time the 'Create Pay' button is selected. If the User exits this window, all new records in the DRIVERPAY table will be deleted.

New Pay Records grid

This grid displays the new Driver Pay records that are created for the purposes of comparison. You can sort on a column by selecting the column header (making direct comparison much easier between the two grids).

Old Pay Records grid

This grid displays the old Driver Pay records found for the selected Pay Contract. You can sort on a column by selecting the column header (making direct comparison much easier between the two grids).