[Vtigercrm-commits] [vtiger-commits] r10178 - in /vtigercrm/branches/5.0.3: Smarty/templates/Inventory/InventoryCreateView.tpl Smarty/templates/Inventory/InventoryEditView.tpl Smarty/templates/Settings/TaxConfig.tpl include/js/Inventory.js include/language/en_us.lang.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Feb 12 08:40:04 EST 2007


Author: saraj
Date: Mon Feb 12 06:39:54 2007
New Revision: 10178

Log:
fix for Inventory and Tax configuartion related i18n issue  --Minnie

Modified:
    vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryCreateView.tpl
    vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryEditView.tpl
    vtigercrm/branches/5.0.3/Smarty/templates/Settings/TaxConfig.tpl
    vtigercrm/branches/5.0.3/include/js/Inventory.js
    vtigercrm/branches/5.0.3/include/language/en_us.lang.php

Modified: vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryCreateView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryCreateView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryCreateView.tpl Mon Feb 12 06:39:54 2007
@@ -205,5 +205,12 @@
 
         var fielddatatype = new Array({$VALIDATION_DATA_FIELDDATATYPE})
 
+	var product_labelarr = {ldelim}CLEAR_COMMENT:'{$APP.LBL_CLEAR_COMMENT}',
+                                DISCOUNT:'{$APP.LBL_DISCOUNT}',
+                                TOTAL_AFTER_DISCOUNT:'{$APP.LBL_TOTAL_AFTER_DISCOUNT}',
+                                TAX:'{$APP.LBL_TAX}',
+                                ZERO_DISCOUNT:'{$APP.LBL_ZERO_DISCOUNT}',
+                                PERCENT_OF_PRICE:'{$APP.LBL_OF_PRICE}',
+                                DIRECT_PRICE_REDUCTION:'{$APP.LBL_DIRECT_PRICE_REDUCTION}'{rdelim};
 
 </script>

Modified: vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryEditView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryEditView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/Inventory/InventoryEditView.tpl Mon Feb 12 06:39:54 2007
@@ -177,6 +177,14 @@
 
         var fielddatatype = new Array({$VALIDATION_DATA_FIELDDATATYPE})
 
+	var product_labelarr = {ldelim}CLEAR_COMMENT:'{$APP.LBL_CLEAR_COMMENT}',
+				DISCOUNT:'{$APP.LBL_DISCOUNT}',
+				TOTAL_AFTER_DISCOUNT:'{$APP.LBL_TOTAL_AFTER_DISCOUNT}',
+				TAX:'{$APP.LBL_TAX}',
+				ZERO_DISCOUNT:'{$APP.LBL_ZERO_DISCOUNT}',
+				PERCENT_OF_PRICE:'{$APP.LBL_OF_PRICE}',
+				DIRECT_PRICE_REDUCTION:'{$APP.LBL_DIRECT_PRICE_REDUCTION}'{rdelim};
+
 	var ProductImages=new Array();
 	var count=0;
 	function delRowEmt(imagename)

Modified: vtigercrm/branches/5.0.3/Smarty/templates/Settings/TaxConfig.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/Settings/TaxConfig.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/Settings/TaxConfig.tpl Mon Feb 12 06:39:54 2007
@@ -77,8 +77,6 @@
 		<input type="hidden" name="save_tax" value="">
 		<input type="hidden" name="edit_tax" value="">
 		<input type="hidden" name="add_tax_type" value="">
-		<input type="hidden" id="tax_savebutton" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
-		<input type="hidden" id="tax_cancelbutton" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
 
 		<!-- Table to display the Product Tax Add and Edit Buttons - Starts -->
 		<table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading">
@@ -262,3 +260,9 @@
    </tr>
 </tbody>
 </table>
+<script>
+	var tax_labelarr = {ldelim}SAVE_BUTTON:'{$APP.LBL_SAVE_BUTTON_LABEL}',
+                                CANCEL_BUTTON:'{$APP.LBL_CANCEL_BUTTON_LABEL}',
+                                TAX_NAME:'{$APP.LBL_TAX_NAME}',
+                                TAX_VALUE:'{$APP.LBL_TAX_VALUE}'{rdelim};
+</script>

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 Mon Feb 12 06:39:54 2007
@@ -391,10 +391,10 @@
 	colone.className = "cellLabel small";
 	coltwo.className = "cellText small";
 
-	colone.innerHTML="<input type='text' id='"+label_name+"' name='"+label_name+"' value='Tax Name' class='txtBox' onclick=\"this.form."+label_name+".value=''\";/>";
-	coltwo.innerHTML="<input type='text' id='"+label_val+"' name='"+label_val+"' value='Tax Value' class='txtBox' onclick=\"this.form."+label_val+".value=''\";/>";
-
-	document.getElementById(td_id).innerHTML="<input type='submit' name='Save' value=' "+$('tax_savebutton').value+" ' class='crmButton small save' onclick=\"this.form.action.value='TaxConfig'; this.form."+add_tax_flag+".value='true'; this.form.parenttab.value='Settings'; return validateNewTaxType('"+label_name+"','"+label_val+"');\">&nbsp;<input type='submit' name='Cancel' value=' "+$('tax_cancelbutton').value+" ' class='crmButton small cancel' onclick=\"this.form.action.value='TaxConfig'; this.form.module.value='Settings'; this.form."+add_tax_flag+".value='false'; this.form.parenttab.value='Settings';\">";
+	colone.innerHTML="<input type='text' id='"+label_name+"' name='"+label_name+"' value='"+tax_labelarr.TAX_NAME+"' class='txtBox' onclick=\"this.form."+label_name+".value=''\";/>";
+	coltwo.innerHTML="<input type='text' id='"+label_val+"' name='"+label_val+"' value='"+tax_labelarr.TAX_VALUE+"' class='txtBox' onclick=\"this.form."+label_val+".value=''\";/>";
+
+	document.getElementById(td_id).innerHTML="<input type='submit' name='Save' value=' "+tax_labelarr.SAVE_BUTTON+" ' class='crmButton small save' onclick=\"this.form.action.value='TaxConfig'; this.form."+add_tax_flag+".value='true'; this.form.parenttab.value='Settings'; return validateNewTaxType('"+label_name+"','"+label_val+"');\">&nbsp;<input type='submit' name='Cancel' value=' "+tax_labelarr.CANCEL_BUTTON+" ' class='crmButton small cancel' onclick=\"this.form.action.value='TaxConfig'; this.form.module.value='Settings'; this.form."+add_tax_flag+".value='false'; this.form.parenttab.value='Settings';\">";
 }
 
 function validateNewTaxType(fieldname, fieldvalue)
@@ -489,14 +489,13 @@
 		var colsix = row.insertCell(5);
 		var colseven = row.insertCell(6);
 	}
-	
 	//Delete link
 	colone.className = "crmTableRow small";
 	colone.innerHTML='<img src="'+image_path+'delete.gif" border="0" onclick="deleteRow(\''+module+'\','+count+')"><input id="deleted'+count+'" name="deleted'+count+'" type="hidden" value="0">';
 
 	//Product Name with Popup image to select product
 	coltwo.className = "crmTableRow small"
-	coltwo.innerHTML= '<table border="0" cellpadding="1" cellspacing="0" width="100%"><tr><td class="small"><input id="productName'+count+'" name="productName'+count+'" class="small" style="width: 70%;" value="" readonly="readonly" type="text"><input id="hdnProductId'+count+'" name="hdnProductId'+count+'" value="" type="hidden"><img src="'+image_path+'search.gif" style="cursor: pointer;" onclick="productPickList(this,\''+module+'\','+count+')" align="absmiddle"></td></tr><tr><td class="small" id="setComment'+count+'"><textarea id="comment'+count+'" name="comment'+count+'" class=small style="width:70%;height:40px"></textarea><br>[<a href="javascript:;" onclick="getObj(\'comment'+count+'\').value=\'\'";>Clear Comment</a>]</td></tr></tbody></table>';	
+	coltwo.innerHTML= '<table border="0" cellpadding="1" cellspacing="0" width="100%"><tr><td class="small"><input id="productName'+count+'" name="productName'+count+'" class="small" style="width: 70%;" value="" readonly="readonly" type="text"><input id="hdnProductId'+count+'" name="hdnProductId'+count+'" value="" type="hidden"><img src="'+image_path+'search.gif" style="cursor: pointer;" onclick="productPickList(this,\''+module+'\','+count+')" align="absmiddle"></td></tr><tr><td class="small" id="setComment'+count+'"><textarea id="comment'+count+'" name="comment'+count+'" class=small style="width:70%;height:40px"></textarea><br>[<a href="javascript:;" onclick="getObj(\'comment'+count+'\').value=\'\'";>'+product_labelarr.CLEAR_COMMENT+'</a>]</td></tr></tbody></table>';	
 	
 	//Quantity In Stock - only for SO, Quotes and Invoice
 	if(module != "PurchaseOrder"){
@@ -510,7 +509,7 @@
 	
 	//List Price with Discount, Total after Discount and Tax labels
 	colfive.className = "crmTableRow small"
-	colfive.innerHTML='<table width="100%" cellpadding="0" cellspacing="0"><tr><td align="right"><input id="listPrice'+count+'" name="listPrice'+count+'" value="0.00" type="text" class="small " style="width:70px" onBlur="calcTotal(); callTaxCalc('+count+');" onChange="setDiscount(this,'+count+')"/>&nbsp;<img src="'+image_path+'pricebook.gif" onclick="priceBookPickList(this,'+count+')"></td></tr><tr><td align="right" style="padding:5px;" nowrap>		(-)&nbsp;<b><a href="javascript:doNothing();" onClick="displayCoords(event,\'discount_div'+count+'\',\'discount\','+count+')" >Discount</a> : </b><div class=\"discountUI\" id=\"discount_div'+count+'"><input type="hidden" id="discount_type'+count+'" name="discount_type'+count+'" value=""><table width="100%" border="0" cellpadding="5" cellspacing="0" class="small"><tr><td id="discount_div_title'+count+'" nowrap align="left" ></td><td align="right"><img src="'+image_path+'close.gif" border="0" onClick="fnHidePopDiv(\'discount_div'+count+'\')" style="cursor:pointer;"></td></tr><tr><td align="left" class="lineOnTop"><input type="radio" name="discount'+count+'" checked onclick="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp; Zero Discount</td><td class="lineOnTop">&nbsp;</td></tr><tr><td align="left"><input type="radio" name="discount'+count+'" onclick="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp; % of Price </td><td align="right"><input type="text" class="small" size="2" id="discount_percentage'+count+'" name="discount_percentage'+count+'" value="0" style="visibility:hidden" onBlur="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp;%</td></tr><tr><td align="left" nowrap><input type="radio" name="discount'+count+'" onclick="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp; Direct Price Redunction</td><td align="right"><input type="text" id="discount_amount'+count+'" name="discount_amount'+count+'" size="5" value="0" style="visibility:hidden" onBlur="setDiscount(this,'+count+'); callTaxCalc('+count+');"></td></tr></table></div></td></tr><tr> <td align="right" style="padding:5px;" nowrap><b>Total After Discount :</b></td></tr><tr id="individual_tax_row'+count+'" class="TaxShow"><td align="right" style="padding:5px;" nowrap>(+)&nbsp;<b><a href="javascript:doNothing();" onClick="displayCoords(event,\'tax_div'+count+'\',\'tax\','+count+')" >Tax </a> : </b><div class="discountUI" id="tax_div'+count+'"></div></td></tr></table> ';
+	colfive.innerHTML='<table width="100%" cellpadding="0" cellspacing="0"><tr><td align="right"><input id="listPrice'+count+'" name="listPrice'+count+'" value="0.00" type="text" class="small " style="width:70px" onBlur="calcTotal(); callTaxCalc('+count+');" onChange="setDiscount(this,'+count+')"/>&nbsp;<img src="'+image_path+'pricebook.gif" onclick="priceBookPickList(this,'+count+')"></td></tr><tr><td align="right" style="padding:5px;" nowrap>		(-)&nbsp;<b><a href="javascript:doNothing();" onClick="displayCoords(event,\'discount_div'+count+'\',\'discount\','+count+')" >'+product_labelarr.DISCOUNT+'</a> : </b><div class=\"discountUI\" id=\"discount_div'+count+'"><input type="hidden" id="discount_type'+count+'" name="discount_type'+count+'" value=""><table width="100%" border="0" cellpadding="5" cellspacing="0" class="small"><tr><td id="discount_div_title'+count+'" nowrap align="left" ></td><td align="right"><img src="'+image_path+'close.gif" border="0" onClick="fnHidePopDiv(\'discount_div'+count+'\')" style="cursor:pointer;"></td></tr><tr><td align="left" class="lineOnTop"><input type="radio" name="discount'+count+'" checked onclick="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp; '+product_labelarr.ZERO_DISCOUNT+'</td><td class="lineOnTop">&nbsp;</td></tr><tr><td align="left"><input type="radio" name="discount'+count+'" onclick="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp; % '+product_labelarr.PERCENT_OF_PRICE+' </td><td align="right"><input type="text" class="small" size="2" id="discount_percentage'+count+'" name="discount_percentage'+count+'" value="0" style="visibility:hidden" onBlur="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp;%</td></tr><tr><td align="left" nowrap><input type="radio" name="discount'+count+'" onclick="setDiscount(this,'+count+'); callTaxCalc('+count+');">&nbsp; '+product_labelarr.DIRECT_PRICE_REDUCTION+'</td><td align="right"><input type="text" id="discount_amount'+count+'" name="discount_amount'+count+'" size="5" value="0" style="visibility:hidden" onBlur="setDiscount(this,'+count+'); callTaxCalc('+count+');"></td></tr></table></div></td></tr><tr> <td align="right" style="padding:5px;" nowrap><b>'+product_labelarr.TOTAL_AFTER_DISCOUNT+' :</b></td></tr><tr id="individual_tax_row'+count+'" class="TaxShow"><td align="right" style="padding:5px;" nowrap>(+)&nbsp;<b><a href="javascript:doNothing();" onClick="displayCoords(event,\'tax_div'+count+'\',\'tax\','+count+')" >'+product_labelarr.TAX+' </a> : </b><div class="discountUI" id="tax_div'+count+'"></div></td></tr></table> ';
 
 	//Total and Discount, Total after Discount and Tax details
 	colsix.className = "crmTableRow small"

Modified: vtigercrm/branches/5.0.3/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/include/language/en_us.lang.php Mon Feb 12 06:39:54 2007
@@ -546,6 +546,8 @@
 'LBL_SERVICE' => 'Service',
 'LBL_TAX_DETAILS' => 'Tax Details',
 'LBL_TAX_CALCULATION' => 'Tax Calculation',
+'LBL_TAX_NAME' => 'Tax Name',
+'LBL_TAX_VALUE' => 'Tax Value',
 'COVERED_PERCENTAGE' => '(%)',
 'LBL_TAG_CLOUD' => 'Tag Cloud',
 'LBL_FOR' => 'for',





More information about the vtigercrm-commits mailing list