Date used for trip-based pay
During the rating process, the system uses a hierarchy to determine the trip date that is to be compared with the rate effective dates.
If an invoice exists, it uses the ship date on the invoiceheader (ivh_shipdate).
If there is no invoice and an order exists, it uses the start date on the orderheader (ord_startdate).
If no order exists, i.e., the trip is an empty move, it uses the arrival date for the first stop on the trip segment (stp_arrivaldate).