Skip to content

Commit

Permalink
Fixed NPE in tax calculation when no ProducePrice record matches the …
Browse files Browse the repository at this point in the history
…tax calc constraints

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042884 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jonesde committed Dec 7, 2010
1 parent 0730f5e commit 8427408
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ private static List getTaxAdjustments(Delegator delegator, GenericValue product,

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");

Expand Down

0 comments on commit 8427408

Please sign in to comment.