Contract Lines
In the “deep_contract_lines” module there are many system automations, some closely related to contracts.
Expiration and Renewal
As with contracts, there is an automatism regarding the expiration of a line and its possible renewal.
To make this automatism work, the following basic fields are present.
FIELD NAME | DESCRIPTION | NOTE |
Expiration Date | Line expiration date |
|
Is Recurring | Flag indicating if the line is renewable | If it is set to “No,” the line will not be renewed |
Recurring Type | Time Recurrence |
|
Recurring Quantity | Quantity of temporal recurrence | Field related to “Recurring Type.” If the first is populated to Yearly and this field to 2, on the expiration date the line will be renewed by 2 years |
Recurring Increment Percentage | Increasing the “Total Amount” field at renewal | If 10% is set and “Total Amount” is at 40000, in the renewed line the “Total Amount” field will be 44000 |
Renewed Contract Line | Populated with the new renewed line |
|
The System Job that is run (every 2 hours) to check for expiration and possible renewal is the same as for Contracts.
If Job finds a line with the expiration date less than the current date (1), set the “Expired” field to “Yes” (2).
In addition, if the “Is Recurring” field is set to “Yes,” the automatism for renewal is triggered.
The date inserted in the “Expiration Date” field is retrieved and, the new line, is renewed according to the entered timing.
For example, if the expiration date of the expired line(1) is 01/08/2023 and the recurrence is 1 month, the new line(2) will automatically have the expiration date set to 01/09/2023.
“Use Groups” field
Within the line is the “Use Groups” field, which manages the line’s visibility within other modules
By setting in the “All Groups” field, the line can be used, for example in activities, by all users.
If a specific group is set, for example “IT – First Level,” all users will have visibility of the line (if the role/permissions allow), but only users in that specific group will be able to set it in an activity.
Note: By setting the “Use Line” field to “No,” the line will not be visible in other forms select regardless of the user’s group.
Lines Billing
Line billing can be done in three different ways:
- “Generate Invoice” button
- “Generate Invoice” massive action
- Automatic Invoicing
NOTE: To be able to bill lines, some fields need to be set in the “Billing” tab.
Field | Description | Note |
Product | Product that is billed |
|
Product Price | Product price | Populated automatically on product entry |
Product Quantity | Quantity of product for the line | Populated automatically on product entry |
Product Recurring Type | Temporal recurrence of the product |
|
Product Recurring Quantity | Recurrence of the quantity (temporal) of the product | Related to the “Product Recurring Type” field. |
Billing Recurring Type | Type of recurrence |
|
Billing Recurring Quantity | Quantity of billing recurrence |
|
Billing Last Date | Last billing date |
|
“Generate Invoice” Button
If the fields are populated correctly, after saving the line, the “Generate Invoice” button will appear
Mass Action “Generate Invoice”
From the grid of lines, if mass actions are active, it will be possible to mass-bill different lines from different contracts.
To mass invoice, as a first step, you need to select the lines of interest (1).
Next, in the list of mass actions (2) choose “Generate Invoice” and press the “Submit” button.
Automatic Billing
There is a job in the system that bills the lines every day at 04:00.
If the billing was successful, regardless of the chosen mode, you will be able to view the created invoice from the Contract (or directly from the sales_invoice module).