Why Sub-Items may not round

For more information about sub-items and how they are used, click here.

Understanding how Sub-Items Round

When working with parent line items that include sub-items, you may notice that the total extended price does not always round as expected. This discrepancy arises from how the quantities of the parent and sub-items are calculated. Contrary to a common misconception, the items are not simply grouped and summed using straightforward arithmetic. Instead, the sub-item calculations depend on the parent item’s quantity.

The following examples demonstrate how the decimal calculation varies based on the configuration of the parent item quantity. By examining these examples, you can better understand the impact of the parent item quantity setting on the final pricing calculations.

Adding your Parent Item

To ensure that the decimals calculate as they would if the items were grouped, a parent item is required as a placeholder with no associated costs. In the example below, the parent item has a quantity of 1, and all pricing values are set to 0.

When additional sub-items are added, their pricing values are divided by the parent item’s quantity to determine the overall unit cost for the parent item, which is then displayed on the transactions. The example below illustrates how this process is applied to provide the pricing for line item 1.

Option 2

Alternatively, when the parent item has its own costs and quantity variables, including sub-items will affect the decimal calculations. The example below uses the same sub-items as in the previous image, but excludes the parent item with a quantity of 1 and no variables. Instead, the first sub-item becomes the parent item. Note how the decimals in the final pricing differ.

Summary

The two pricing scenarios show a 10-cent difference due to the calculation method being influenced by the parent item’s quantity and pricing variables. Although both methods are technically correct, the first method is preferred when pricing with sub-items. By understanding and applying the recommended approach, you can ensure more accurate and consistent pricing calculations.

Print Friendly, PDF & Email

Was this article helpful?

Related Articles