270177
270177 - NW-7WRLZP / Load Rate for Weight
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
Modify Load Rates to take into account the Weight on an Order, this should allow a fixed and variable time to be applied to an Order activity at a Location based on the Load Rate assigned against the activity Location.
To remove the possibility of conflicts with DU's it may be worth making the current DU variables against Load Rates configurable so that a user has to select either DU or Weight as the driving variable. This is because HUK are likely to want to continue to use DU variables but Baxter will need to use Weight.
Solution
Add a new flag (LOAD_RATE_TYPE) to the cost centre table (REV_COST_CENTRE) to indicate if the cost centre is going to use DU Types/Quantity (Null or ‘D’) or Weight (‘W’) for calculating its loading and unloading times.
As the locations are shared between cost centres on the same database and hence the loading rates are also shared then we are proposing adding a new field (to the loading header table for minutes per weight.
All of the places were the loading and unloading times are calculated in MTS will need changing to take into account these new fields.
Packages effected are :- CSV (Write_Orders_to_Paragon)
GEO (get_acitivity_rate, get_fixed_mins, get_SU_mins, get_CL_mins) - Will all need cost centre passing from TRM
IMP (Process_TI_Order ??? cust_id, process_slot,)
INT_XML_OUT (add_location, update_location)
TRM (calc_visit_distance_and_time, set_trip_status, loading_time) -
Forms effected are :-
RESOURCE
CUST_COST
Scope
This change will be applied to system version 10.6.
SET-UP
Database Changes
Alter table REV_COST_CENTRE adding new field LOAD_RATE_TYPE VARCHAR2(12).
This will be set to ‘WEIGHT’ for the Baxter cost centre as they will be using the new weight functionality for calculating the loading and unloading times.
All other cost centres will be set to ‘DU QTY’ so as to use the existing DU_Type and Quantity values for determining the times.
NB) If the field is null then it will be assumed to be ‘DU QTY’.
Alter table RES_LOAD_RATE adding new field MINS_PER_WEIGHT NUMBER(11,5).
This will hold the new value for Baxter for determining the time in minutes to load/unload a single weight (KG) unit.
System Registries
A pair of system registries called ‘TRM_LOAD_dflt_mins_per_rpe’ and ‘TRM_UNLOAD_dflt_mins_per_rpe’ already exist and are used in the calculation of the loading and unloading times when no suitable value has been provided.
This should never happen as specific rates should always be provided but to keep the new functionality consistent with the old functionality we will create 2 new registries called ‘TRM_LOAD_dflt_mins_per_weight’ and ‘TRM_UNLOAD_dflt_mins_per_weight’ which will be used if no suitable value (RES_LOAD_RATE.MINS_PER_WEIGHT) has been provided.
FUNCTIONAL DESCRIPTION
The 2 visible changes for the client will be to the RESOURCE form to allow the new load rate type field to be maintained and to the CUST_COST form to allow a new minutes per weight to be maintained.
All of the other changes will be in the packages which will use these new fields in calculating the load and unload times.
Forms
Cost Centres
The current main form looks like :-
The new field (LOAD_RATE_TYPE) will be added as a dropdown list allowing the 2 hard coded values of ‘WEIGHT’ and ‘DU QTY’ to be selected and will be placed on the form just above the Internal Revenue field.
Load Rates
The current main canvas on the forms looks like :-
Some of the columns (‘SU/CL Mins’, ‘Fixed Mins’ etc.) can be narrowed and a new column added after ‘Dflt Mins per DU’ called ‘Mins per Weight’ containing the new field (MINS_PER_WEIGHT).
The column heading will need coding as the rest to allow the data to be sorted by this column.
The New/Edit canvas currently looks like :-
The new field (MINS_PER_WEIGHT) will need adding below the ‘Dflt Mins per Du’ field to allow the value to be entered and amended as required.
Packages
CSV Packages
The only procedure that needs changing in this package is Write_Orders_to_Paragon which was changed recently specifically for Baxter to add the loading and unloading times.
This code will need changing to check the REV_COST_CENTRE. LOAD_RATE_TYPE field and if set to ‘WEIGHT’ which it should be for Baxter then the calculation of the variable time will need some new code.
It will not need to link to the RES_LOAD_RATE_DTL table but will still need to link to the SCH_ORDER_LINE (SOL) table.
Instead of summing the SOL.quantity * DU rate it will need to sum the SOL.weight * RES_LOAD_RATE. MINS_PER_WEIGHT.
GEO Package
The procedure get_activity_rate will need changing but in order to put the new code in place an additional parameter called cost_centre will need passing to it. The only place that this procedure is called from is the procedure loading_time in the TRM package (see later).
The passed cost_centre will be used to retrieve the corresponding REV_COST_CENTRE record and the LOAD_RATE_TYPE field will be checked.
If this is either NULL or set to ‘DU QTY’ then the code will do exactly the same as it is doing now.
If this is set to ‘WEIGHT’ then it will always use the rate from RES_LOAD_RATE.MINS_PER_WEIGHT if not NULL otherwise it will use the one of the new respective system registry values ‘TRM_LOAD_dflt_mins_per_weight’ or ‘TRM_UNLOAD_dflt_mins_per_weight’.
Other procedures (get_fixed_mins, get_SU_mins and get_CL_mins) also use the RES_LOAD_RATE table but are unaffected by this change.
IMP Package
The procedure Process_TI_Order uses the cust_id as a loading rate so this code is unaffected by the change.
The procedure process_location does a check for a valid loading rate and again this code in unaffected by the change.
The procedure process_slot gets the fixed minutes for a loading rate sop again is unaffected by this change
INT_XML_OUT Package
The procedures add_location and update_location both have code to validate the loading rate but will be unaffected by this change.
TRM Package
The procedures calc_visit_distance_and_time and set_trip_status both use the loading rate but only for fixed minutes so are unaffected by these changes.
The procedure loading_time needs changing so that the call to GEO.get_activity_rate passes an extra parameter for the cost_centre. This will be obtained from the SCH_ORD table.
The cost_centre will also be used to retrieve the corresponding REV_COST_CENTRE record and the LOAD_RATE_TYPE field will be checked.
If this is either NULL or set to ‘DU QTY’ then the code will do exactly the same as it is doing now.
If this is set to ‘WEIGHT’ then it will use the SCH_ORDER_LINE.WEIGHT to multiply with the returned rate in order to calculate the loading/unloading times.
REFERENCES
Not Applicable
DOCUMENT HISTORY
Initial version | ||||
Reviewed and Issued |
AUTHORISED BY
Matt Crisford | Development Manager | |
Peter Greer | TMSCC MTS Product Manager |