From d60edd5bb4e61db1ec1154a50a88258176fdec6b Mon Sep 17 00:00:00 2001 From: "David E. Jones" Date: Tue, 7 Dec 2010 01:12:18 +0000 Subject: [PATCH] Fixed NPE in tax calculation when no ProducePrice record matches the tax calc constraints git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042884 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/accounting/tax/TaxAuthorityServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java b/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java index 2635821000..70f0ccbd48 100644 --- a/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java @@ -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");