Rounding Settings in Cost Calculation

When working with various values in the "Cost Calculation" module, you can configure rounding.

  • "-2" - rounding to hundredths (cents)

  • "-1" - rounding to tenths (10 cents)

  • "0" - rounding to whole numbers

  • "1" - rounding to tens

  • "2" - rounding to hundreds

Settings

Rounding settings are entered in the corresponding fields of the cost calculation settings on the "Cost Calculation" tab.

Rounding is configured separately for dealers and clients.

Working with Discounts

The algorithm for working with rounding in cost calculation with discounts:

  1. Calculate the cost without discount and without rounding, i.e., the actual cost

  2. Calculate the actual discount amount

  3. Round the discount up

  4. Round the sum up

  5. Subtract the rounded discount from the rounded sum

  6. Adjust the discount amount to match the difference between the actual sum and the resulting rounded sum, so that simple row addition works correctly

Example 1:

Let's look at the profile example:

  1. Calculate the cost without discount and without rounding, i.e., the actual cost:

    4 * 265.5 = 1062

  2. Calculate the actual discount amount

    1062 * 15% = 159.3

  3. Round the discount up

    ROUND(159.3) = 160

  4. Round the sum up

    ROUND(1062) = 1070

  5. Subtract the rounded discount from the rounded sum

    1070 - 160 = 910

  6. Adjust the discount amount to match the difference between the actual sum and the resulting rounded sum

    1062 - 910 = 152

  7. Verify the result from the cost calculation:

    4 pcs * 265.5 = 1062 - 152 = 910

Example 2:

  1. Calculate the cost without discount and without rounding, i.e., the actual cost

    7.74 * 80 = 619.2

  2. Calculate the actual discount amount

    619.2 * 14% = 86.688

  3. Round the discount up

    ROUND(86.688) = 100

  4. Round the sum up

    ROUND(619.2) = 700

  5. Subtract the rounded discount from the rounded sum

    700 - 100 = 600

  6. Adjust the discount amount to match the difference between the actual sum and the resulting rounded sum, so that simple row addition works correctly

    619.2 - 600 = 19.2

  7. Verify the result from the cost calculation:

    7.74 pcs * 80 = 619.2 - 19.2 = 600