Enabling Extra Precision in Billing Pricing

You can use up to 8-digit precision for pricing. This is useful for when you need the price for a resource unit to be displayed with more than 2 digits after the decimal separator (2-digit precision is default).

To enable extra precision pricing, you must perform the following steps:

  1. Enable extra precision for the currencies that you need.
  2. Adjust the Order Placed and Invoice notification templates.

Enabling Extra Precision for a Currency

  1. Prepare a deployment container.

  2. In the interactive shell of the container that you prepared, execute the following commands:

    NAMESPACE=NAMESPACE_OF_YOUR_CBC_INSTALATION
    POD=`kubectl -n $NAMESPACE get pods -l stellart=atm -o name`
    kubectl -n $NAMESPACE exec $POD -- cp /usr/local/stellart/share/currencies.txt /k8s_data/currencies.txt
  3. Open the /k8s_data/currencies.txt currency configuration file and update the precision settings of the currency that you need.

    Every line in that file belongs to a currency and contains the following columns:

    • The alphabetic ISO 4217 code of that currency. For example: USD

    • The numeric ISO 4217 code of that currency. For example: 840

    • The precision to be used for that currency. This defines the number of digits after the decimal separator which will be displayed in all fields of AR documents in Billing (except for the Unit Price field in sales orders, which will be displayed with the high precision specified in the next column). For example: 2

    • The high precision to be used for that currency. This generally defines the precision used for internal billing calculations, or the number of digits after the decimal separator that are taken into account in billing pricing. For example: 4

      Important: For a currency, a value in the high precision column must be greater than or equal to a value in the precision column.

      Note: High precision is not limited to 8 digits.

    To open that file, you can use, for example, these commands:

    kubectl -n $NAMESPACE exec -ti $POD -- bash
    vi /k8s_data/currencies.txt
  4. After you modify the /k8s_data/currencies.txt currency configuration file as you need, restart the BSS component:

    kubectl -n $NAMESPACE rollout restart deploy -l app=bss

Adjusting Notification Templates

  1. Go to System > Settings > Notifications > Notifications Templates.
  2. In the Invoice notification template, replace the standard placeholders

    • @@Detail_UnitPrice@
    • @@Detail_UnitPrice_With_Taxes@
    • @@Detail_UnitPrice_WO_Taxes@

    with the placeholders

    • @@Detail_AccurateUnitPrice@
    • @@Detail_AccurateUnitPrice_With_Taxes@
    • @@Detail_AccurateUnitPrice_WO_Taxes@
  3. In the Order Placed notification template, replace @@Detail_UnitPrice@ with @@Detail_AccurateUnitPrice@.

Related Topics

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.