From b02cbe67383ec0d8ea5099eaaf376d27597ab0f8 Mon Sep 17 00:00:00 2001 From: satish <satish.dvnk@vtiger.com> Date: Fri, 26 Aug 2016 19:15:02 +0530 Subject: [PATCH] #284 - Inventory entity with 2 (or more) same service / product included, mistake taxes --- include/utils/EditViewUtils.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/utils/EditViewUtils.php b/include/utils/EditViewUtils.php index 857e05d4..8317f75d 100755 --- a/include/utils/EditViewUtils.php +++ b/include/utils/EditViewUtils.php @@ -324,10 +324,12 @@ function getAssociatedProducts($module,$focus,$seid='') //condition to avoid this function call when create new PO/SO/Quotes/Invoice from Product module if($focus->id != '') { - if($taxtype == 'individual')//if individual then show the entered tax percentage - $tax_value = getInventoryProductTaxValue($focus->id, $hdnProductId, $tax_name); - else//if group tax then we have to show the default value when change to individual tax + if($taxtype == 'individual') {//if individual then show the entered tax percentage + $tax_value = ($adb->query_result($result, $i-1, $tax_name)); + $tax_value = ($tax_value) ? $tax_value : 0; + } else {//if group tax then we have to show the default value when change to individual tax $tax_value = $tax_details[$tax_count]['percentage']; + } } else//if the above function not called then assign the default associated value of the product $tax_value = $tax_details[$tax_count]['percentage']; -- GitLab