Products
Products on a contract determine the revenue accounts to credit with the settlement invoice. By default, the revenue account is determined by the ARCode associated with the product. The product code provides a default unit price to the contract line. When you assign a product code, you may find it helpful to include the pricing unit as part of the code; e.g., you might use "PASysDay" to indicate the cost of renting a PA system per day.
|
Extras\Contracts Processing\Import CP Products.xls |
Products security
Common accesses available on products
Product filters
The following built-in filters are available for products:
| Filter Name | Effect |
|---|---|
| ? ARCode | Prompts for an ARCode and lists the products with the specified ARCode. |
| ? Code | Prompts for a product code and shows the products with the specified product code. |
| ? Description | Prompts for a description and lists the products with a description that contains the specified search string. |
| ? Expression Contains | Prompts for a product expression and lists the products with an expression that contains the specified search string. |
| ? Has Group | Prompts for a product group and lists the products with the specified product group. |
| ? Type | Prompts for a product type and lists the products with the specified product type. |
Contract and settlement expression functions
| Function | Explanation | Example |
|---|---|---|
| If | Boolean with three parameters: (test, true result, false result) | IF(Comm.Count = 12, -Park.Amount, 0) |
| IsNull | Determines which of two numbers is "not null". One of the parameters must be a terms code. | ISNULL(MinQty, .Ticket.Quantity) [MinQty is a numeric terms code] |
| Date | Calculates a date based on a date expression
Note This is not the same as the .Date keyword. .Date returns the date on a contract or settlement line. |
Security.Hours.History(, DATE(.Date("yesterday"))) |
| Number | Converts a string value to a number | NUMBER(ATTRIBUTEITEM("Booth")) |
| AttributeItem | Returns an attribute item from the contract. The syntax is AttributeItem("attribute name"). The "attribute name" argument takes a literal string and must be enclosed in quotation marks. | IF(ATTRIBUTEITEM("Booth") = "100C", .Price, .Price * .95) |
| MIN | Determines which of two numbers is smaller | MIN(.Amount, Comm.Amount.History) |
| MAX | Determines which of two numbers is larger | MAX(FoodT.Amount, FoodNT.Amount) |
| ROUND | Rounds a number to the specified number of decimal digits | ROUND((Food.Amount * .9361) + Bev.Amount * .7238, 2) |
| TRUNCATE | Truncates the number to the specified number of digits | TRUNCATE(PreTick.Quantity, -2) |
| TRUE | TRUE can only reference a user-defined terms code/keyword | IF(IntProd = TRUE, .Price, .Price * 1.15), where IntProd is a true/false terms code |
| FALSE | FALSE can only reference a user-defined terms code/keyword | IF(IntProd = FALSE, .Price, 0), where IntProde is a true/false terms code |
Contract and settlement expressions
All group keywords (non-history) include lines on the current settlement or contract.
All .History keywords include only the settlements on the current contract.
All the keywords listed below produce numbers, so expressions can use arithmetic operators between keywords as is illustrated in many of the examples which follow.
| Keyword | Explanation | Example |
|---|---|---|
| .Date | The date on a contract line or settlement line | IF(.Date > #01/01/2018#, 1, .75) |
| #Date# | A literal date | #01/15/2018# |
| "string" | Text or string. | "ABC" |
| .Minutes | Minutes on the contract or settlement line | .Minutes * .Price |
| .Hours | Hours on the contract line | .Hours * .Price |
| .Quantity | Quantity on the contract or settlement line | .Quantity * .Price |
| .Price | Price on the contract or settlement line | .Quantity/1.0825 * .Price |
| .Amount | Amount on the contract or settlement line
Note .Amount is for use in credit expressions only! |
.Amount * .25 |
| .Discount | Discount on the settlement line
Note .Discount is for use in credit expressions only! |
((.Quantity * .Price) - .Discount) * .15 |
| .Credit | Credit on the settlement line
Note .Credit is for use in amount expressions only! |
(.Quantity * .Price) - .Credit |
| group.Minutes(begin,end) | The total minutes of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other.† | Staff.Minutes * .Price |
| group.Hours(begin,end) | The total hours of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other.† | Security.Hours * .Price |
| group.Quantity(begin,end) | The total quantity of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other.† | IF(Ticket.Quantity > 1200, Ticket.Quantity * .Price * .75, Ticket.Quantity * .Price) |
| group.Discount(begin,end) | The total discount on all products on the settlement which are assigned to group. The begin and end date parameters are optional and independent of each other.† | (.Quantity * .Price) - Rent.Discount |
| group.Amount(begin,end) | The total amount of all products on the contract or settlement which are assigned to group. The begin and end date parameters are optional and independent of each other.† | IF(Comm.Amount ≥ 4000, .Quantity * .Price * .15, 0) |
| group.Credit(begin,end) | The total credit amount of all products on the settlement which are assigned to group. The begin and end date parameters are optional and independent of each other.† | MAX(0,Rent.Amount.History + Rent.Amount - Comm.Credit.History - Comm.Credit) |
| group.Count(begin,end) | The number of settlement lines for products assigned to group. The begin and end date parameters are optional and independent of each other.† | IF(Comm.Count = 12, - Park.Amount, 0) |
| group.Minutes.History(begin,end) | The total minutes for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.† | Security.Minutes.History(, DATE(.Date("yesterday")) * .Price |
| group.Hours.History(begin,end) | The total hours for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.† | Security.Hours.History(, DATE(.Date("yesterday")) * .Price |
| group.Quantity.History(begin,end) | The total quantity for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.† | MAX(0, Comm.Quantity.History(, .Date) + Comm.Quantity(, .Date) + .Quantity) - 350000 |
| group.Amount.History(begin,end) | The total amount for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.† | MIN(.Amount, Rent.Amount.History + Rent.Amount - Comm.Credit.History(, .Date) - Comm.Credit(, .Date)) |
| group.Discount.History(begin,end) | The total discount amount for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.† | |
| group.Credit.History(begin,end) | The total credit amount for all products assigned to group on all settlements for the contract. The begin and end date parameters are optional and independent of each other.† | MIN(.Amount,Rent.Amount.History + Rent.Amount - Comm.Credit.History(, .Date) - Comm.Credit(, .Date)) |
| group.Count.History(begin,end) | The total number of all settlement lines for the contract for all products assigned to group. The begin and end date parameters are optional and independent of each other.† |
† The following syntax is allowed for the begin and end date parameters of a group function:
| Syntax Sample | Explanation |
|---|---|
| group.amount | No date range |
| group.amount() | No date range |
| group.amount(,) | No date range |
| group.amount(begin) | Begin date only |
| group.amount(begin,) | Begin date only |
| group.amount(,end) | End date only |
| group.amount(begin,end) | Both begin and end date |

