[Vtigercrm-commits] [vtiger-commits] r10617 - in /vtigercrm/branches/5.0.3/include/js: Inventory.js en_us.lang.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 10 11:00:57 EDT 2007
Author: richie
Date: Tue Apr 10 09:00:49 2007
New Revision: 10617
Log:
* Validation has been done for group tax and S&H tax, Fixed #3336#3536
Modified:
vtigercrm/branches/5.0.3/include/js/Inventory.js
vtigercrm/branches/5.0.3/include/js/en_us.lang.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 Tue Apr 10 09:00:49 2007
@@ -290,8 +290,40 @@
alert(alert_arr.VALID_ADJUSTMENT);
return false;
}
-
- return true
+
+ //Group - Tax Validation - not allow negative values
+ //We need to validate group tax only if taxtype is group.
+ var taxtype=document.getElementById("taxtype").value;
+ if(taxtype=="group")
+ {
+ var tax_count=document.getElementById("group_tax_count").value;
+ for(var i=1;i<=tax_count;i++)
+ {
+
+ temp = /^(0|[1-9]{1}\d{0,})(\.(\d{1}\d{0,}))?$/.test(document.getElementById("group_tax_percentage"+i).value);
+ if(!temp)
+ {
+ alert(alert_arr.VALID_TAX_PERCENT);
+ return false;
+ }
+ }
+ }
+
+ //Taxes for Shippring and Handling validation - not allow negative values
+ var shtax_count=document.getElementById("sh_tax_count").value;
+ for(var i=1;i<=shtax_count;i++)
+ {
+
+ temp = /^(0|[1-9]{1}\d{0,})(\.(\d{1}\d{0,}))?$/.test(document.getElementById("sh_tax_percentage"+i).value);
+ if(!temp)
+ {
+ alert(alert_arr.VALID_SH_TAX);
+ return false;
+ }
+ }
+
+
+ return true;
}
function FindDuplicate()
Modified: vtigercrm/branches/5.0.3/include/js/en_us.lang.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/en_us.lang.js (original)
+++ vtigercrm/branches/5.0.3/include/js/en_us.lang.js Tue Apr 10 09:00:49 2007
@@ -108,5 +108,7 @@
NO_SPECIAL_CHARS:'Special Characters are not allowed in Invoice String',
SHARED_EVENT_DEL_MSG:'The User does not have permission to Delete this record.',
PLS_SELECT_VALID_FILE:'Please select a file with the following extension:\n',
- NO_SPECIAL:'Special Characters are not allowed'
+ NO_SPECIAL:'Special Characters are not allowed',
+ VALID_TAX_PERCENT:'Enter a valid Tax percentage',
+ VALID_SH_TAX:'Enter valid Taxes for shipping and handling ',
};
More information about the vtigercrm-commits
mailing list