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
This commit is contained in:
David E. Jones
2010-12-07 01:12:18 +00:00
parent 5eb7d80579
commit d60edd5bb4
@@ -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");