Applying user-defined formulas to billing rates
The basic process TMWSuite uses to create invoice details consists of multiplying a specified dollar amount by a particular quantity. For example, a rate of $3.00 per mile multiplied by a quantity of 100 miles would create an invoice detail of $300.00.
You can set up a billing rate as a:
Simple rate
A simple rate consists of a single dollar amount. For example, to charge a customer $3.00 per mile each time, you could enter a $3.00 rate in the Edit Billing Rate Schedule window.
Table rate
A table rate consists of a matrix of rates. For example, you could set up a rate table that would adjust the per mile charge according to the number of miles driven.
You can also create variable billing rates by attaching a user-defined formula to a rate. When the system applies a formula rate to an order, it:
Pulls the user-defined data from the database
Uses that data to compute a calculated rate to apply to the order.
For example, you could create a billing rate formula to calculate charges based on the weight delivered and the number of miles traveled. When that rate is applied to an invoice, the system:
1. Pulls the weight and mileage data from the order.
2. Pulls the dollar amount from the rate header.
3. Performs the variable calculation.
For our example, the invoice charge would be calculated as shown here:
[ Weight | * | Billable Miles | * | Rate ] | = | Calculated Rate | * | Quantity | = | Charge |
[ 35 tons | * | 52 miles | * | $ 0.0312 ] | = | $56.78/ton | * | 35 tons | = | $1,987.30 |
Note: This sample formula uses weight, mileage, and rate as factors. However, formulas can be set up in many different ways.
The formulas you create in the Expression Editor window can be based on these elements:
Operators
Addition, subtraction, multiplication, division, and parentheses
Parameters
Billable miles, count, index factor (allows indexes on the same rate to have different factors), minimum quantity, rate (linked to the Rate field or a rate table), volume, weight
Numbers
Whole numbers or decimal numbers
You can attach formulas to simple rates or to table rates. You can attach formulas to primary, secondary, line item, and linked line item billing rates.
Note: User-defined formulas are not supported for pay rates.