Skip to content
Snippets Groups Projects
Commit 58fed668 authored by Satish's avatar Satish
Browse files

Fixes #282 - Product & Sercice Taxes and Shipping & Handling Taxes dilemma

parent 6fa1e42b
No related branches found
No related tags found
No related merge requests found
......@@ -312,8 +312,9 @@ function getAssociatedProducts($module,$focus,$seid='')
}
$product_Detail[$i]['netPrice'.$i] = $netPrice;
$taxMode = ($focus->id) ? 'available_associated' : 'all';
//First we will get all associated taxes as array
$tax_details = getTaxDetailsForProduct($hdnProductId,'all');
$tax_details = getTaxDetailsForProduct($hdnProductId, $taxMode);
//Now retrieve the tax values from the current query with the name
for($tax_count=0;$tax_count<count($tax_details);$tax_count++)
{
......
......@@ -62,6 +62,7 @@ class Inventory_Record_Model extends Vtiger_Record_Model {
//Updating Tax details
$taxtype = $relatedProducts[1]['final_details']['taxtype'];
$taxMode = ($this->getId()) ? 'available_associated' : 'all';
$subTotal = 0;
for ($i=1;$i<=$productsCount; $i++) {
......@@ -70,7 +71,7 @@ class Inventory_Record_Model extends Vtiger_Record_Model {
$totalAfterDiscount = $product['totalAfterDiscount'.$i];
if ($taxtype == 'individual') {
$taxDetails = getTaxDetailsForProduct($productId, 'all');
$taxDetails = getTaxDetailsForProduct($productId, $taxMode);
$taxCount = count($taxDetails);
$taxTotal = '0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment