[Vtigercrm-commits] [vtiger-commits] r6735 - in /vtigercrm/trunk: Smarty/templates/Inventory/ProductDetails.tpl modules/Invoice/EditView.php modules/PurchaseOrder/EditView.php modules/Quotes/EditView.php modules/SalesOrder/EditView.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 30 05:59:12 EDT 2006


Author: saraj
Date: Tue May 30 03:59:04 2006
New Revision: 6735

Log:
* Modified to display the product details in new PO, SO, Quotes and Invoice when we create these entities from Product DetailView or Product Relatedlist

Modified:
    vtigercrm/trunk/Smarty/templates/Inventory/ProductDetails.tpl
    vtigercrm/trunk/modules/Invoice/EditView.php
    vtigercrm/trunk/modules/PurchaseOrder/EditView.php
    vtigercrm/trunk/modules/Quotes/EditView.php
    vtigercrm/trunk/modules/SalesOrder/EditView.php

Modified: vtigercrm/trunk/Smarty/templates/Inventory/ProductDetails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Inventory/ProductDetails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Inventory/ProductDetails.tpl Tue May 30 03:59:04 2006
@@ -42,21 +42,21 @@
 		   </tr>
 		   <tr id="row1" class="dvtCellLabel">
 			<td nowrap valign="top">
-				<input type="text"  id="txtProduct1" name="txtProduct1" class="txtBox" readonly />&nbsp;<img src="themes/blue/images/search.gif" style="cursor: pointer;" align="absmiddle" onclick="productPickList(this,'{$MODULE}')" />
+				<input type="text"  id="txtProduct1" name="txtProduct1" class="txtBox" value="{$PRODUCT_NAME}" readonly />&nbsp;<img src="themes/blue/images/search.gif" style="cursor: pointer;" align="absmiddle" onclick="productPickList(this,'{$MODULE}')" />
 			</td>
 
 			{if $MODULE eq 'Quotes' || $MODULE eq 'SalesOrder' || $MODULE eq 'Invoice'}
-			   <td style="padding:3px;" id="qtyInStock1" valign="top">&nbsp;</td>
+			   <td style="padding:3px;" id="qtyInStock1" valign="top" value="{$QTY_IN_STOCK}">&nbsp;</td>
 			{/if}
 
 			<td valign="top">
 				<input type="text" id="txtQty1" name="txtQty1" class="detailedViewTextBox" onfocus="this.className='detailedViewTextBoxOn'" onBlur="FindDuplicate(); settotalnoofrows(); calcTotal(this)" />
 			</td>
-			<td style="padding:3px;"  id="unitPrice1" valign="top">&nbsp;
+			<td style="padding:3px;"  id="unitPrice1" valign="top" value="{$UNIT_PRICE}">&nbsp;
 				
 			</td>
 			<td nowrap valign="top">
-				<input type="text" id="txtListPrice1" name="txtListPrice1" class="txtBox" readonly onBlur="FindDuplicate(); settotalnoofrows(); calcTotal(this)"/>&nbsp;<img src="themes/blue/images/pricebook.gif" onclick="priceBookPickList(this)" style="cursor: pointer;" title="Price Book" align="absmiddle" />
+				<input type="text" id="txtListPrice1" name="txtListPrice1" value="{$UNIT_PRICE}" class="txtBox" readonly onBlur="FindDuplicate(); settotalnoofrows(); calcTotal(this)"/>&nbsp;<img src="themes/blue/images/pricebook.gif" onclick="priceBookPickList(this)" style="cursor: pointer;" title="Price Book" align="absmiddle" />
 			</td>
 			<!-- Added for Tax calculation-->
 			<td valign="top" style="padding-bottom:5px;">
@@ -68,17 +68,17 @@
 				<div id="tax_Lay1" style="width:93%;position:relative;border:1px dotted #CCCCCC;display:none;background-color:#FFFFCC;top:5px;padding:5px;" align="center">
 					<table width="100%" border="0" cellpadding="0" cellspacing="0" class="small">
 					   <tr id="vatrow1">
-						<td align="left" width="40%" style="border:0px solid red;"><input type="text" id="txtVATTax1" name="txtVATTax1" class="txtBox" onBlur="ValidateTax('txtVATTax1'); calcTotal(this);"/>%&nbsp;</td>
+						<td align="left" width="40%" style="border:0px solid red;"><input type="text" id="txtVATTax1" name="txtVATTax1" value="{$VAT_TAX}" class="txtBox" onBlur="ValidateTax('txtVATTax1'); calcTotal(this);"/>%&nbsp;</td>
 						<td width="20%" align="right" style="border:0px solid red;">&nbsp;{$APP.LBL_VAT}</td>
 						<td align="left" width="40%" style="border:0px solid red;"><input type="text" id="txtVATTaxTotal1" name="txtVATTaxTotal1" class="txtBox" onBlur="ValidateTax('txtVATTaxTotal1'); calcTotal(this);"/></td>
 					   </tr>
 					   <tr id="salesrow1">
-						<td align="left" style="border:0px solid red;"><input type="text" id="txtSalesTax1" name="txtSalesTax1" class="txtBox" onBlur="ValidateTax('txtSalesTax1'); calcTotal(this);"/>%&nbsp;</td>
+						<td align="left" style="border:0px solid red;"><input type="text" id="txtSalesTax1" name="txtSalesTax1" value="{$SALES_TAX}" class="txtBox" onBlur="ValidateTax('txtSalesTax1'); calcTotal(this);"/>%&nbsp;</td>
 						<td align="right" style="border:0px solid red;">&nbsp;{$APP.LBL_SALES}</td>
 						<td align="left" style="border:0px solid red;"><input type="text" id="txtSalesTaxTotal1" name="txtSalesTaxTotal1" class="txtBox" onBlur="ValidateTax('txtSalesTaxTotal1'); calcTotal(this);"/></td>
 					   </tr>
 					   <tr id="servicerow1">
-						<td align="left" style="border:0px solid red;"><input type="text" id="txtServiceTax1" name="txtServiceTax1" class="txtBox" onBlur="ValidateTax('txtServiceTax1'); calcTotal(this);"/>%&nbsp;</td>
+						<td align="left" style="border:0px solid red;"><input type="text" id="txtServiceTax1" name="txtServiceTax1" value="{$SERVICE_TAX}" class="txtBox" onBlur="ValidateTax('txtServiceTax1'); calcTotal(this);"/>%&nbsp;</td>
 						<td align="right" style="border:0px solid red;">&nbsp;{$APP.LBL_SERVICE}</td>
 						<td align="left" style="border:0px solid red;"><input type="text" id="txtServiceTaxTotal1" name="txtServiceTaxTotal1" class="txtBox" onBlur="ValidateTax('txtServiceTaxTotal1'); calcTotal(this);"/></td>
 					   </tr>
@@ -89,7 +89,7 @@
 			</td>
 			<td style="padding:3px;" id="total1">&nbsp;</td>
 			<td>
-				<input type="hidden" id="hdnProductId1" name="hdnProductId1">
+				<input type="hidden" id="hdnProductId1" name="hdnProductId1" value="{$PRODUCT_ID}">
 				<input type="hidden" id="hdnRowStatus1" name="hdnRowStatus1">
 				<input type="hidden" id="hdnTotal1" name="hdnTotal1">&nbsp;
 			</td>

Modified: vtigercrm/trunk/modules/Invoice/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/EditView.php (original)
+++ vtigercrm/trunk/modules/Invoice/EditView.php Tue May 30 03:59:04 2006
@@ -272,6 +272,17 @@
 	$smarty->assign("SUBTOTAL", $InvTotal.".00");
 	$smarty->assign("GRANDTOTAL", $InvTotal.".00");
 
+	//this is to display the Product Details in first row when we create new PO from Product relatedlist
+	if($_REQUEST['return_module'] == 'Products')
+	{
+		$smarty->assign("PRODUCT_ID",$_REQUEST['product_id']);
+		$smarty->assign("PRODUCT_NAME",getProductName($_REQUEST['product_id']));
+		$smarty->assign("UNIT_PRICE",getUnitPrice($_REQUEST['product_id']));
+		$smarty->assign("QTY_IN_STOCK",getPrdQtyInStck($_REQUEST['product_id']));
+		$smarty->assign("VAT_TAX",getProductTaxPercentage("VAT",$_REQUEST['product_id']));
+		$smarty->assign("SALES_TAX",getProductTaxPercentage("Sales",$_REQUEST['product_id']));
+		$smarty->assign("SERVICE_TAX",getProductTaxPercentage("Service",$_REQUEST['product_id']));
+	}
 }
 else
 {

Modified: vtigercrm/trunk/modules/PurchaseOrder/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/EditView.php (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/EditView.php Tue May 30 03:59:04 2006
@@ -147,6 +147,17 @@
         $smarty->assign("SUBTOTAL", $InvTotal.".00");
         $smarty->assign("GRANDTOTAL", $InvTotal.".00");
 
+	//this is to display the Product Details in first row when we create new PO from Product relatedlist
+	if($_REQUEST['return_module'] == 'Products')
+	{
+		$smarty->assign("PRODUCT_ID",$_REQUEST['product_id']);
+		$smarty->assign("PRODUCT_NAME",getProductName($_REQUEST['product_id']));
+		$smarty->assign("UNIT_PRICE",getUnitPrice($_REQUEST['product_id']));
+		$smarty->assign("QTY_IN_STOCK",getPrdQtyInStck($_REQUEST['product_id']));
+		$smarty->assign("VAT_TAX",getProductTaxPercentage("VAT",$_REQUEST['product_id']));
+		$smarty->assign("SALES_TAX",getProductTaxPercentage("Sales",$_REQUEST['product_id']));
+		$smarty->assign("SERVICE_TAX",getProductTaxPercentage("Service",$_REQUEST['product_id']));
+	}
 }
 else
 {

Modified: vtigercrm/trunk/modules/Quotes/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/EditView.php (original)
+++ vtigercrm/trunk/modules/Quotes/EditView.php Tue May 30 03:59:04 2006
@@ -167,6 +167,17 @@
         $smarty->assign("SUBTOTAL", $InvTotal.".00");
         $smarty->assign("GRANDTOTAL", $InvTotal.".00");
 
+	//this is to display the Product Details in first row when we create new PO from Product relatedlist
+	if($_REQUEST['return_module'] == 'Products')
+	{
+		$smarty->assign("PRODUCT_ID",$_REQUEST['product_id']);
+		$smarty->assign("PRODUCT_NAME",getProductName($_REQUEST['product_id']));
+		$smarty->assign("UNIT_PRICE",getUnitPrice($_REQUEST['product_id']));
+		$smarty->assign("QTY_IN_STOCK",getPrdQtyInStck($_REQUEST['product_id']));
+		$smarty->assign("VAT_TAX",getProductTaxPercentage("VAT",$_REQUEST['product_id']));
+		$smarty->assign("SALES_TAX",getProductTaxPercentage("Sales",$_REQUEST['product_id']));
+		$smarty->assign("SERVICE_TAX",getProductTaxPercentage("Service",$_REQUEST['product_id']));
+	}
 }
 else
 {

Modified: vtigercrm/trunk/modules/SalesOrder/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/EditView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/EditView.php Tue May 30 03:59:04 2006
@@ -271,6 +271,17 @@
         $smarty->assign("SUBTOTAL", $InvTotal.".00");
         $smarty->assign("GRANDTOTAL", $InvTotal.".00");
 
+	//this is to display the Product Details in first row when we create new PO from Product relatedlist
+	if($_REQUEST['return_module'] == 'Products')
+	{
+		$smarty->assign("PRODUCT_ID",$_REQUEST['product_id']);
+		$smarty->assign("PRODUCT_NAME",getProductName($_REQUEST['product_id']));
+		$smarty->assign("UNIT_PRICE",getUnitPrice($_REQUEST['product_id']));
+		$smarty->assign("QTY_IN_STOCK",getPrdQtyInStck($_REQUEST['product_id']));
+		$smarty->assign("VAT_TAX",getProductTaxPercentage("VAT",$_REQUEST['product_id']));
+		$smarty->assign("SALES_TAX",getProductTaxPercentage("Sales",$_REQUEST['product_id']));
+		$smarty->assign("SERVICE_TAX",getProductTaxPercentage("Service",$_REQUEST['product_id']));
+	}
 }
 else
 {





More information about the vtigercrm-commits mailing list