You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2010/12/07 02:12:18 UTC
svn commit: r1042884 -
/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
Author: jonesde
Date: Tue Dec 7 01:12:18 2010
New Revision: 1042884
URL: http://svn.apache.org/viewvc?rev=1042884&view=rev
Log:
Fixed NPE in tax calculation when no ProducePrice record matches the tax calc constraints
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=1042884&r1=1042883&r2=1042884&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Tue Dec 7 01:12:18 2010
@@ -407,7 +407,7 @@ public class TaxAuthorityServices {
GenericValue taxAdjValue = delegator.makeValue("OrderAdjustment");
- if ("Y".equals(productPrice.getString("taxInPrice"))) {
+ if (productPrice != null && "Y".equals(productPrice.getString("taxInPrice"))) {
// tax is in the price already, so we want the adjustment to be a VAT_TAX adjustment to be subtracted instead of a SALES_TAX adjustment to be added
taxAdjValue.set("orderAdjustmentTypeId", "VAT_TAX");