270347

From CTMS

270347 - PA-7WSETC/ Add Carrier Trip Cost Calculation

Copyright OBS Logistics © 2010

The information contained herein is the property of OBS Logistics and is supplied without liability for errors or omissions. No part may be reproduced or used except as authorised by contract or other written permission. The copyright and foregoing restriction on reproduction and use extend to all media in which the information may be embodied


FUNCTIONAL OVERVIEW

Client Requirement

  • When a Subcontractor (Carrier) has a Contract within MTS, any order on a trip being delivered by that Carrier will Autorate the Order Cost against the respective Standard Journey in the Carriers Contract and then Sum the respective Order Cost as a total TRIP Cost showing in the Finance Detail of that Trip and recorded as the Trip Cost in the Payments Summary (Payments v2.23)
  • Carrier Contract Set-up - include a parameter to allow a Standard Journey Rate plus a set value for subsequent drops. EG: Contract Rate for a 3 Drop delivery to Postcode G - £400.00 plus £35.00 per drop for drop 2 and 3, where £35.00 is a fixed value for any additional drops above 1applicable to any tariff. - Total trip Cost = £470.00. Show Trip Cost in Trip Finance Detail and Payment Summary


Solution

Create a new procedure within the RATE package called Calculate_Multiple_Trip_Costs.

Add a column to the RES_CARRIER table called Mulltiple_Tariffs. This will be displayed on the RESOURCES screen, in the CARRIER tab and when selected will indicate that trip costs will be calculated on a stop by stop basis.

Within the existing RATE.update_trip_payments, a new cursor will be created to identify the Carrier on the trip and check if they use Multiple_Tariffs. If Multiple_Tariff is not selected, the TRIP_COSTS will be calculated as usual.

If the Multiple_Tariff is selected, then the new procedure, Calculate_Multiple_Trip_Costs will be called to continue the costing process. The starting depot and each subsequent stop will be passed to the contract module, the trip cost returned from each contract will be accumulated in a temporary field until the final stop has been costed, when the accumulated value will be returned as the TRIP COST.

Missing tariffs

If any part of the journey is not covered by a contract, the TRIP COST will not be calculated and any related status change will not be completed. The error message returned to the system will include a reference to the stop which was not covered. Trip Cost will be cancelled when the code comes to the first stop which is not covered, subsequent stops which are not covered will not be indicated in the error message.

Quantities

The quantities passed to the contract will be based on the standard journey being covered. To calculate the quantities we will require a new procedure TRIP_STOP_QTY_UNLOADED, which will be passed a trip_id, sched_name and stop_id to return the total qty unloaded at the stop. Where a journey covers more than one stop, we must accumulate the quantities at each stop covered by the journey.

STOPS

To allow additional charges to be applied based on the number of stops covered by a journey, we need to create a new tier type called STOPS. A new procedure to calculate the number of stops on a journey is required and STOPS will be integrated into the additional procedures for identifying and calculating TIERS and quantities. In most scenarios STOPS will be the additional TIER of the contract Copy from estimate

Scope

This change will be applied to system version 10.5.

Data

A new field will be added to the RES_CARRIER table called MULTIPLE_TARIFFS as a checkbox. The field will be displayed on the RESOURCES and when checked will indicate that TRIP COSTS for the CARRIER will be calculated using Multiple Tariffs.

A new TIER type will be added to the CONTRACTS screen called STOPS. A record will be inserted into CNT_CHARGE_PARAM.

FUNCTIONAL DESCRIPTION

Currently TRIP COSTS are calculated based on CARRIER contracts which cover a standard journey of the first stop to the last stop; this takes no consideration of the stops which are made during the journey.

Two functional changes will be made to allow TRIP COSTS to be based in some way on the stops made during the journey.

Functional Change 1: STOP COSTS

A new tier will be created called stops, this will allow contract charges to be applied based on the number of stops within a trip. The user will be able to create a tariff based on stops with a charge applied per stop.

The number of stops will be passed to the contract based on the number of stops on the trip excluding any Start up and Close down stops.


Functional Change 2: MULTIPLE TARIFFS

Currently, when calculating TRIP COSTS, the cost is based on a single journey from the start stop to the end stop. Multiple tariff charges will allow each charge to be incurred for each stop on the trip. This will be achieved by calling the contract module each time a stop is encountered. Each time the CONTRACT module is called, the start up stop and the current stop will be passed as the journey.


START UP LOCATION STOP 1 STOP 2 STOP 3 STOP 4
Bristol Cardif Liverpool Manchester Newcastle





In the example above, currently one charge will be applied based on the journey between Bristol and Newcastle, and the three stops in between are irrelevant when calculating the TRIP COST (unless distance is used as the tariff)

The proposed changes would incur 4 charges, which would be combined to form the TRIP COST. The contract module will be called four times, covering the following journeys:

Bristol to Cardiff Bristol to Liverpool Bristol to Manchester Bristol to Newcastle


If any of the above 4 journeys are not covered by a contract, the TRIP COST will not be calculated and an error will be displayed listing the stop which is not covered by a contract.

The quantities passed to the CONTRACT module will be based on UNLOAD quantities at each stop. DISTANCE cannot be used for multiple tariffs as Distance is calculated between each stop and for the total journey, not between the start up stop and each subsequent stop.

When TRIP COSTS are calculated, the system will check the value of the MULTIPLE_TARIFF field for the CARRIER. If the field is checked, costs will be calculated using a new procedure which treats each stop as a separate journey. If the field is not checked, the existing TRIP COST calculation will be used.

REFERENCES

Ref No
Document Title & ID
Version
Date
1
EST 270347 PA-7WSETC Add Carrier Trip Cost Calculation v0.1.doc
1.0
28/10/09


DOCUMENT HISTORY

Version
Date
Status
Reason
Initials
0.1
23/11/09
Draft
Initial version
SW
1.0
24/11/09
Issue
Reviewed and Issued
MJC


AUTHORISED BY

Matt Crisford Development Manager
Peter Greer TMSCC MTS Product Manager