Loading
Get Started with B2C Commerce
목차
필터 선택

          결과 없음
          결과 없음
          몇 가지 검색 팁

          키워드의 맞춤법을 확인하십시오.
          더 일반적인 검색 용어를 사용하십시오.
          필터 수를 줄여 검색 범위를 확장하십시오.

          전체 Salesforce 도움말 검색
          Unit Level Rounding

          Unit Level Rounding

          If you prorate tax across an order, each line item has values for the single unit base price and the line item totals for gross, net, and tax. The single unit net price isn't calculated or stored. All rounding is done at the line level, which can cause rounding discrepancies. If your B2C Commerce site experiences these discrepancies, use unit-level rounding.

          When updating the tax with the dw.order.LineItem#updateTax() method, and using unit-level rounding, the tax is calculated for each unit, rounded, and then summed.

          Note
          Note The default implementation, using dw.ocapi.shop.basket.calculation, also considers this preference in the same way during calculation.

          Many order management systems require the single unit net price to calculate refunds for returned products, which must be calculated based on the values provided in the order. One way to do this is to divide the net line total by the line item quantity. If the customer returns all three units from the order, the sum of all three returned items is a penny off from the calculated net total.

          This feature is disabled by default. Configure it in order site preferences and configure discount taxation in promotion site preferences.

          The following table shows the formulas used for the tax calculations:

            Gross total Tax total Net total
          Item level Round (BasePrice * Quantity) Round(GrossTotal * (1-(1/(1+TaxRate))) Round(GrossTotal - TaxTotal)
          Unit level Round (BasePrice * Quantity)

          $TaxUnit = Round(BasePrice * (1-(1/(1+TaxRate)))

          TaxTotal = TaxUnit * Quantity

          Round(GrossTotal - TaxTotal)

          Configuration Setting

          Example

          The following table shows an order with three units of product_A, where line-level rounding (the default) is used:

          Item Base price Quantity Tax rate Gross total Tax total Net total
          1 $18.99 3 0.21% $56.97 $9.89 $47.08
                  Gross total order Tax total order Net total order
                  $56.97 $9.89 $47.08

          The line item net total is 47.08.

          Item Base price Quantity Tax rate Gross total Tax total Net total
          1 $18.99 1 0.21% $18.99 $3.30 $15.69
          2 $18.99 1 0.21% $18.99 $3.30 $15.69
          3 $18.99 1 0.21% $18.99 $3.30 $15.69
                  Gross total order Tax total order Net total order
                  $56.97 $9.90 $47.07

          If the order is for three line items of quantity one, the line item net total is $47.07, a one penny discrepancy.

          When item price rounding is set to Item-level, the tax total formula is now in two parts (as shown in the above formula table):

          1. TaxUnit = Round(BasePrice * (1-(1/(1+TaxRate)))
          2. TaxTotal = TaxUnit * Quantity

          Following the above example, the calculation for an order with three line items, each with a quantity of one, stays the same; while an order with one item with a quantity of three is as follows:

          Item Base price Quantity Tax rate Gross total Tax total Net total
          1 $18.99 3 0.21% $56.97 $9.90 $47.07
                  Gross total order Tax total order Net total order
                  $56.97 $9.90 $47.07

          With rounding on the unit level, the order totals are the same regardless of whether products are in one or multiple line items.

           
          로드 중
          Salesforce Help | Article