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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user