Rounding in Vertec

How to round values in Vertec

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 24.04.2009
Machine translated
Updated: 12.07.2024 | Separate articles “Rounds in OCL” and “Rounds in Python” integrated here.

Values in Vertec are rounded according to the system settings listed below.

When rounding, there may be deviation: rounding the individual numbers first and then adding them together gives a different amount than adding the individual numbers unrounded and then rounding the final amount. How the different deviation can occur is explained in the article Rounding Differences .

The following system settings are available for the different rounding rules:

System settings project / case Significance
Use rounding rules If you want to use the commercial rounding rule instead of mathematical rounding, set this system setting to YES.
Hourly rates do not round Allows rates to be specified for services up to 4 decimal places (in the rate table and all other fields for hourly rates).
Expenses and outlays round This system setting allows you to specify whether or not to round the amounts (and VAT) on individual expenses and outlays.

How these settings interact is explained below using examples.

Use rounding rules

The commercial rounding rule with the special case of rounding to 5 cents for monetary amounts has a high degree of distortion and the sum of the rounded individual values is higher than most mathematical rounding rules (see article on Wikipedia). Vertec therefore uses undistorted or mathematical rounding (round-to-even) by default because it has the least mathematical distortion (see article on Wikipedia).

If you want to use the commercial rounding rule (round-to-nearest) instead of mathematical rounding, set the system setting Use rounding rules to YES.

System settings project / case Value
Use rounding rules Yes

The mathematical rounding according to the round-to-even method rounds so that for example .425 is rounded to .42 but .435 is rounded up to .44. The commercial rounding or round-to-nearest always rounds up the 5, i.e. .425 -> .43 and .435 -> .44.

The setting is applied to the following monetary amounts (for display-only rounding or for time-specific rounding, mathematical rounding is always used):

  • All monetary amounts at the time of invoicing and invoice totals.
  • All monetary amounts on advances and invoiceAdvanceLink.
  • Value processor and value cost on the service.
  • Calculation of salary and overheads in the user settings.

As well as the rounding of services from the service entry, expense entry and outlays according to the following information.

Round hourly rates (vertec default settings)

System settings project / case Value
Hourly rates do not round No.
Use rounding rules No.

1.50 hours of 118.75 = 178.125

These 178.125 are rounded to 178.10 in Vertec. The sum of several such values results in differences:

2x 178.125 = 356.25 but 2x178.10 = 356.20

This is particularly noticeable in the case of service lists for invoices: For example, if the individual services are rounded up, this results in deviation in the result; the sum then no longer corresponds to the value when the individual items are added together.

In this example, there are nice amounts of fees, but the sum is no longer equal to the total: 6 hours of 118.75 equals 712.50, not 712.40 as shown. 8% VAT on this amount equals 56,992, whereas on the original amount it would equate to exactly 57.

According to commercial rounding rules

System settings project / case Value
Hourly rates do not round No.
Use rounding rules Yes

Here in the example you can see that the amount of the fee is not rounded to 178.10 as above, but rounded up to 178.15. The sum is then 712.60 (instead of 712.50 as calculated directly). The VAT (8%) is then 57.008, i.e. 57.01.

Hourly rates do not round

The system setting Do No rounding of hourly rates (when used as gross rates) allows rates to be specified with up to 4 decimal places (in the rate table and all other input fields for hourly rates) and prevents the rounding of the value amounts (if, for example, you still see only two decimal places in the service list, then set the renderer to dbmTim.AnsatzRenderer in the list settings).

System settings project / caseValue
Hourly rates do not roundYes

In this example, the fee amounts are not rounded. The sum does not match (4 x 178.12 = 712.48), but the total is correct and therefore the VAT (8%) is calculated correctly.

Expenses and outlays round

For expenses and outlays, you can specify whether the amounts (and VAT) should be rounded on the individual expenses and outlays or not. This is done using the system setting Round Expenses and outlays round .

Option Enabled

Is this option on Ja, then Vertec rounds to the Currency based on the settings. If the system setting Use commercial rounding rules on Ja, then these are applied. This means:

  • If the rounding step on the currency is set to 0.01 (default in Germany and Austria), this feature has NO INFLUENCE on the rounding behavior.

Here the amounts look good, but there are minimal deviation in the penny or cent range for almost all entries. This makes the total not quite correct: 7.7% VAT of 1761.55 = 132.17.

Option disabled

Is this option on Nein, then Vertec rounds to two decimal places. The system setting Use commercial rounding rules is NOT taken into account, the rounding to two decimal places is done by mathematical rounding (round-to-even). This means:

  • If the rounding step on the currency is set to 0.01 (default in Germany and Austria), the system setting Use commercial rounding rules is disabled.

Here the amounts agree, but are shown exactly on the penny or cent. The total thus amounts to 1716.35, the 7.7% VAT to 132.17. If you round these amounts afterwards, for example on the invoice, then the sum of the list no longer corresponds to the final amount.

Rounds in OCL

Rounds on the fives:

(betrag * 20)->round / 20

Round to two decimal places:

(betrag * 100)->round / 100

Rounds in Python

Rounds on the fives:

round(betrag * 20) / (20)

Rounding to a certain quantity of decimal places, in Example 2:

round(betrag, 2)

Rounding according to Vertec rounding rules

The Vertec Python feature vtcapp.roundcurrency() allows the rounding of amounts according to the stored system settings (see Top ) and optionally including the rounding step on the Currencies :

vtcapp.roundcurrency(betrag, curr)