[ http://issues.apache.org/jira/browse/OFBIZ-164?page=all ]

David E. Jones reassigned OFBIZ-164:
------------------------------------

    Assignee: David E. Jones

> rateProductTaxCalcForDisplay returns incorrect priceWithTax
> -----------------------------------------------------------
>
>                 Key: OFBIZ-164
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-164
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Eriks Dobelis
>         Assigned To: David E. Jones
>         Attachments: tax.diff
>
>
> 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);
>                  }
>              }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to