Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-164

rateProductTaxCalcForDisplay returns incorrect priceWithTax

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Trunk
    • Component/s: accounting
    • Labels:
      None

      Description

      priceWithTax from rateProductTaxCalcForDisplay is returned incorrectly as the total tax. This is a simple diff that solves it.

      Index: applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
      ===================================================================
      — applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (revision 431541)
      +++ applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (working copy)
      @@ -108,7 +108,7 @@
      taxPercentage = taxPercentage.add(taxAdjustment.getBigDecimal("sourcePercentage"));
      BigDecimal adjAmount = taxAdjustment.getBigDecimal("amount");
      taxTotal = taxTotal.add(adjAmount);

      • priceWithTax = priceWithTax.add(adjAmount);
        + priceWithTax = priceWithTax.add(adjAmount.divide(quantity));
        Debug.logInfo("For productId [" + productId + "] added [" + adjAmount + "] of tax to price for geoId [" + taxAdjustment.getString("taxAuthGeoId") + "], new price is [" + priceWithTax + "]", module);
        }
        }

        Attachments

        1. tax.diff
          2 kB
          Eriks Dobelis

          Activity

            People

            • Assignee:
              jonesde David E. Jones
              Reporter:
              phaethon Eriks Dobelis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: