[Vtigercrm-commits] [vtiger-commits] r10553 - /vtigercrm/branches/5.0.3/include/js/Inventory.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 4 09:43:19 EDT 2007
Author: saraj
Date: Wed Apr 4 07:43:14 2007
New Revision: 10553
Log:
* Added check to avoid script error. Because of this error validation not done properly in PO/SO/Quotes/Invoice, Fix #3384
Modified:
vtigercrm/branches/5.0.3/include/js/Inventory.js
Modified: vtigercrm/branches/5.0.3/include/js/Inventory.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/Inventory.js (original)
+++ vtigercrm/branches/5.0.3/include/js/Inventory.js Wed Apr 4 07:43:14 2007
@@ -624,13 +624,15 @@
function callTaxCalc(curr_row)
{
//when we change discount or list price, we have to calculate the taxes again before calculate the total
- tax_count = eval(document.getElementById('tax_table'+curr_row).rows.length-1);//subtract the title tr length
-
- for(var i=0, j=i+1;i<tax_count;i++,j++)
- {
- var tax_hidden_name = "hidden_tax"+j+"_percentage"+curr_row;
- var tax_name = document.getElementById(tax_hidden_name).value;
- calcCurrentTax(tax_name,curr_row,i);
+ if(getObj('tax_table'+curr_row))
+ {
+ tax_count = eval(document.getElementById('tax_table'+curr_row).rows.length-1);//subtract the title tr length
+ for(var i=0, j=i+1;i<tax_count;i++,j++)
+ {
+ var tax_hidden_name = "hidden_tax"+j+"_percentage"+curr_row;
+ var tax_name = document.getElementById(tax_hidden_name).value;
+ calcCurrentTax(tax_name,curr_row,i);
+ }
}
}
More information about the vtigercrm-commits
mailing list