Target Transaction Report

This report is created so the system automatically updates the targets as the business grows. This is based on how many active clients per year.

These Reports are created in Settings > Target Reports.
The value of each row (Display Name) that is matching a global variable (name) is set as the new value of this variable.
The idea is to create a report for each set of target variables, e.g. one for APL targets, one for financial targets and one for transactional (product) targets, so each report can be released separately.
It can be triggered by pressing the "Set Target" button in Setup Wizard or by running a command (e.g. monthly using webcron)

These Reports are processed from the top down. The rows last row overwrites the previous one so that the default target report/ targets can be overridden by user reports/targets without changing the default report.

A Target Report can be created from a normal report by copying the normal report and checking the "Copy as Target Report" checkbox. A normal report can also be created from a Target Report  by doing the same process.

Example report:

In Settings, click "Target Reports", and "Create new Report". 

Add Row. The first row added should be your active clients, as this is what the targets are based on.

Add the following rows. The display name must be from the Target Variables.
Eg. "target_diagnostic_bloods": calculates the target for global variable "target_diagnostic_bloods" 

Do this for all the transactional variables.

If the name is not matching any global variable, it will be ignored.

Once all the rows are created, go to Setup Wizard, and down the bottom to where the targets are.

Click "Set Targets". Displayed will be all the Targets that have been successfully set.

The following targets will be displayed as a percentage %:

Costs of Goods Sold per Year

Wages per Year

Net Profit per Year

Expenses per Year

Gross Profit per Year

EBDITA per Year

Example of copying a normal Report to be a Target Report:

For the Targets to display a round number, this must be done when creating the formula in the row.

The Round() Function:
round(<value>, <precision>, <mode>):
It rounds the given <value> to the specified <precision> using the <mode> and returns the rounded number.
Precision and mode are optional.

  • value: the value to be rounded, e.g. the calculated target
  • precision (optional): the decimal digits to round to. 0 = round to integer, - = digits to the left, + digits to the right. default: 0.
  • mode (optional): i guess this is rarely needed. 4 rounding modes are available:
    • PHP_ROUND_HALF_UP (default)
    • PHP_ROUND_HALF_DOWN
    • PHP_ROUND_HALF_EVEN
    • PHP_ROUND_HALF_ODD

Examples: 
round(3.4); // 3
round(3.5); // 4
round(3.6); // 4
round(3.6, 0); // 4
round(1.95583, 2); // 1.96
round(1241757, -3); // 1242000
round(5.045, 2); // 5.05
round(5.055, 2); // 5.06

*xxx will be your original formula