5.3 KiB
CONTRACTS
Overview
A contract is used to automatically enforce special pricing rules and response time commitments on work orders.
Contract form fields and options
todo: this section
Automatic contract selection rules
Customer or Head office Contract
When a work order is saved for the first time or subsequently saved with a change of Customer, AyaNova will attempt to select the most applicable contract for that work order based on the pre-selected Customer or that Customer's Head office by checking those object's for a Contract that is not expired and applying it to the Work order.
Note that a change of Customer and a manual change of Contract on the same save is ambiguous and AyaNova will still automatically set the Contract based on the Customer or Head office if applicable and effectively ignore the manual setting. However if neither the Customer or the Head office has a Contract then the manual setting will still be preserved in this case.
Unit contract
When a Unit is selected on a work order and that Unit has a Contract, AyaNova will use that Contract for the entire work order automatically when that work order is first saved with the new Unit selection.
Multiple Units with Contracts on the same work order are not permitted. AyaNova would not be able to determine which Contract should take effect when there are multiple Unit's with Contracts on the same work order so for this reason it will not allow a Unit to be added with a Contract if there is already a Unit with a Contract in effect on the Work order. To avoid this scenario only select one Contract holding Unit per work order, use a Customer or HeadOffice Contract instead of a Unit Contract or manually select a Contract instead of using automatic Contract selection if you want full control over what Contract is in effect in order to apply to multiple Units on the same work order.
Contract expiry
Contract expiry dates are checked at the time a Contract is automatically selected for a work order only. If a work order is in progress and has items added after it's Contract has expired the Contract will still apply to that work order and any new items added to that work order.
How a Contract effects pricing
Contract pricing is set automatically in two ways:
-
On the save of an object that might have it's price affected by a work order (e.g. a Labor item or Part added to a workorder) the price is calculated when the object is first added and saved or changed to a new item for example changing the service rate or part to a different selection.
-
On selection of a different Contract for the entire work order all Contract price affected items on the work order will be re-visited and have their prices updated if applicable.
Prices are not automatically updated on a work order for existing items when the Contract itself has it's discounts modified. When new items are added to the work order then yes the new contract pricing will take effect for those items only but not the prior entered items. If you want a work order to have all it's prices updated to reflect the Contract change then you will need to de-select the Contract, save the work order then re-select and save again in order to force a re-calculation of all the existing items on the work order.
What about manually entered prices?
Any manually adjusted prices on the workorder will be overwritten upon save if the Contract has changed.
How Contract tagged override items are applied
Tagged override items are matched to objects when the object has ALL the tags specified in the Contract override. If a Contract has a Labor price override when tagged with "red, green" then the work order item Labor record must have both the "red" and "green" tags amongst it's tags to match. E.G. a Contract part override for Travel rates tagged with "zone-5, van" would match with a Travel rate tagged with "zone-5,zone-6,zone-7,van" (both tags present) but would not match with a Travel rate tagged with "zone-5, car" (only one tag present).
Tagged Contract price overrides take precedence over general Contract price overrides. For example, if a Contract has a general discount for Labor rates and also has a tag specific override for a Labor rate and the tags match between the Work order item labor record and the Contract tagged labor price override then the tag override is the one used and the general override is ignored. If no tags matched then the general price override would be applied.
Conflict - multiple potential matches with tagged Contract override items
Contract tagged items are checked against the object in order of the Contract tagged override with the most tags to the Contract override with the least tags. This is done to try to make the most specific possible tag match. For example, a Contract with 3 tagged labor price overrides and their tags selected are: "green", "red, green, blue", "orange, green". AyaNova will attempt to match by starting with the Contract labor override with the most tags: "red,green,blue" then "orange,green" and finally "green". If a record is saved tagged with "orange,red,yellow,green,black,blue" it will be matched to the first item tagged "red,green,blue" as it has the most terms that match and it's override terms will be used and the other two will not be used.