Cambiar tipo de impuesto por defecto a Grupo

Versiones anteriores a la 5.4.0

Editar fichero Smarty/templates/Inventory/ProductDetails.tpl

  • Intercambiar elemento seleccionado en las líneas 107-108
  • Añadir el siguiente código al final de la plantilla
    <!-- Added to calculate the tax and total values when page loads -->
    <script>
     decideTaxDiv();
     calcGroupTax();
     calcTotal();
     calcSHTax();
    </script>
    <!-- This above div is added to display the tax informations --> 
  • Añadir función javascript calcGroupTax(); despuésd de función loadTaxes_Ajax(1); al event onBlur del elemento cantidad. Línea 173, queda:
    <input id="qty1" name="qty1" type="text" class="small " style="width:50px" onfocus="this.className='detailedViewTextBoxOn'" onBlur="settotalnoofrows(); calcTotal(); loadTaxes_Ajax(1); calcGroupTax();" onChange="setDiscount(this,'1')" value=""/>

Editar fichero Smarty/templates/Inventory/ProductDetailsEditView.tpl

  • Modifica el javascript al final del fichero para que quede como el de arriba
  • Modifica evento onBlur de elemento cantidad para que quede como el de arriba

Versión 5.4.0

Index: Smarty/templates/Inventory/ProductDetails.tpl
===================================================================
--- Smarty/templates/Inventory/ProductDetails.tpl	(revisión: 1)
+++ Smarty/templates/Inventory/ProductDetails.tpl	(copia de trabajo)
@@ -125,8 +125,8 @@
 	<td class="dvInnerHeader" align="center" colspan="2">
 		<b>{$APP.LBL_TAX_MODE}</b>&nbsp;&nbsp;
 		<select id="taxtype" name="taxtype" onchange="decideTaxDiv(); calcTotal();">
-			<OPTION value="individual" selected>{$APP.LBL_INDIVIDUAL}</OPTION>
-			<OPTION value="group">{$APP.LBL_GROUP}</OPTION>
+			<OPTION value="individual">{$APP.LBL_INDIVIDUAL}</OPTION>
+			<OPTION value="group" selected>{$APP.LBL_GROUP}</OPTION>
 		</select>
 	</td>
    </tr>
@@ -197,7 +197,7 @@
 
 	<!-- column 4 - Quantity - starts -->
 	<td class="crmTableRow small lineOnTop">
-		<input id="qty1" name="qty1" type="text" class="small " style="width:50px" onfocus="this.className='detailedViewTextBoxOn'" onBlur="settotalnoofrows();calcTotal(); loadTaxes_Ajax(1); setDiscount(this,'1'); calcTotal();{if $MODULE eq 'Invoice'}stock_alert(1);{/if}" value=""/><br><span id="stock_alert1"></span>
+		<input id="qty1" name="qty1" type="text" class="small " style="width:50px" onfocus="this.className='detailedViewTextBoxOn'" onBlur="settotalnoofrows();calcTotal(); loadTaxes_Ajax(1); calcGroupTax(); setDiscount(this,'1'); calcTotal();{if $MODULE eq 'Invoice'}stock_alert(1);{/if}" value=""/><br><span id="stock_alert1"></span>
 	</td>
 	<!-- column 4 - Quantity - ends -->
 
@@ -456,5 +456,13 @@
    </tr>
 
 
+<!-- Added to calculate the tax and total values when page loads -->
+<script>
+ decideTaxDiv();
+ calcGroupTax();
+ calcTotal();
+ calcSHTax();
+</script>
+<!-- This above div is added to display the tax informations --> 
 
 
Index: Smarty/templates/Inventory/ProductDetailsEditView.tpl
===================================================================
--- Smarty/templates/Inventory/ProductDetailsEditView.tpl	(revisión: 1)
+++ Smarty/templates/Inventory/ProductDetailsEditView.tpl	(copia de trabajo)
@@ -236,7 +236,8 @@
 
 	<!-- column 4 - Quantity - starts -->
 	<td class="crmTableRow small lineOnTop" valign="top">
-		<input id="{$qty}" name="{$qty}" type="text" class="small " style="width:50px" onfocus="this.className='detailedViewTextBoxOn'" onBlur="settotalnoofrows(); calcTotal(); loadTaxes_Ajax('{$row_no}');{if $MODULE eq 'Invoice' && $entityType neq 'Services'} stock_alert('{$row_no}');{/if}" onChange="setDiscount(this,'{$row_no}')" value="{$data.$qty}"/><br><span id="stock_alert{$row_no}"></span>
+		<input id="{$qty}" name="{$qty}" type="text" class="small " style="width:50px" onfocus="this.className='detailedViewTextBoxOn'" onBlur="settotalnoofrows(); calcTotal(); loadTaxes_Ajax('{$row_no}'); calcGroupTax();{if $MODULE eq 'Invoice' && $entityType neq 'Services'} stock_alert('{$row_no}');{/if}" onChange="setDiscount(this,'{$row_no}')" value="{$data.$qty}"/><br><span id="stock_alert{$row_no}"></span>
+
 	</td>
 	<!-- column 4 - Quantity - ends -->
 
@@ -542,9 +543,12 @@
 
 
 <!-- Added to calculate the tax and total values when page loads -->
-<script>decideTaxDiv();</script>
-<script>calcTotal();</script>
-<script>calcSHTax();</script>
+<script>
+ decideTaxDiv();
+ calcGroupTax();
+ calcTotal();
+ calcSHTax();
+</script>
 <!-- This above div is added to display the tax informations -->