Project Hours Limit Policy template

Use this template to create a business rule that sets the limit on the number of hours per week that can be billed to a specific project.

class name =
largesoft.br.rules.system.ProjectHoursLimit

This business rule template ensures that no one can charge more than a specified number of hours to a project over any one week in a timesheet.

This business rule is limited by:

  • Only handles weekly time periods.
  • Does not check the previous or next timesheet.

Therefore, if this timesheet begins in the middle of the week, this rule uses the hours for the fraction of the week that is in this timesheet.

This business rule iterates over existing line items to compute a total and then checks whether the current line item pushes the total over some max value. In the HTML client, the current line item is added to the document after the business rule is run. Therefore, run the business rule run during submit so that violation is against the document rather than a single line item.

Parameters

This template has these parameters:

Project/Charge Code
Specify the project charge code.
Comparison Type
Select the type of comparison.
Start of Week
Select the day of the week to use as the starting point for evaluating the project hours limit policy.
Maximum Hours Allowed
Specify the number of maximum hours allowed per week for the policy.

Example

This example shows the possible values for this business rule.

Project hours limit policy fields

This table shows the values for fields:

Field Value
Name Charge Code Billing Limit Policy
Severity Explanation
Notification Interactive
Fire on Itemization Left blank
Fire Scope Left blank
Offline and Online Firing Options Fire Offline and Online
Status Active
Fire On Update TS Standard Line Item Update TSLI on Charge Code Screen

Project hours limit policy strings

This table shows the values for strings:

Strings Value
Description Determines whether too many hours have been charged to a specific project code.
Interactive Message You may not charge more than <maxHoursAllowed> hours per week to project <chargeCode>.
Policy You may not bill more than <maxHoursAllowed> hours per week to charge code <chargeCode>.
Report Message Too many hours charged to this project.

Project hours limit policy parameters

This table shows the values for parameters:

Parameter Value
Project / Charge Code 92312
Comparison Type Starts With
Start of Week Monday
Maximum Hours Allowed 20

Project hours limit policy applications

This table shows the values for applications:

Name Organization/Group
Default Company Organization