[Vtigercrm-commits] [vtiger-commits] r7307 - in /vtigercrm/trunk: Smarty/templates/DisplayFields.tpl modules/SalesOrder/EditView.php modules/SalesOrder/Save.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Jun 20 11:31:42 EDT 2006


Author: saraj
Date: Tue Jun 20 09:31:33 2006
New Revision: 7307

Log:
* Modified to fix the quote value save in SalesOrder where as previously if we select the quote in SalesOrder creation then the quote did not saved

Modified:
    vtigercrm/trunk/Smarty/templates/DisplayFields.tpl
    vtigercrm/trunk/modules/SalesOrder/EditView.php
    vtigercrm/trunk/modules/SalesOrder/Save.php

Modified: vtigercrm/trunk/Smarty/templates/DisplayFields.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DisplayFields.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DisplayFields.tpl Tue Jun 20 09:31:33 2006
@@ -248,7 +248,7 @@
 				{$fldlabel}
 			</td>
 			<td width="30%" align=left class="dvtCellInfo">
-				<input name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$ID}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Quotes&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=640,height=565,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.quote_id.value=''; this.form.quote_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+				<input name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$QUOTE_ID}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Quotes&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=640,height=565,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.quote_id.value=''; this.form.quote_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 			</td>
 
 		{elseif $uitype eq 76}

Modified: vtigercrm/trunk/modules/SalesOrder/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/EditView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/EditView.php Tue Jun 20 09:31:33 2006
@@ -80,6 +80,7 @@
 	}
 		
 	$quoteid = $focus->column_fields['quote_id'];
+	$smarty->assign("QUOTE_ID", $focus->column_fields['quote_id']);
 	$quote_focus = new Quote();
 	$quote_focus->id = $quoteid;
 	$quote_focus->retrieve_entity_info($quoteid,"Quotes");
@@ -129,6 +130,7 @@
 			$associated_prod = getAssociatedProducts("Quotes",$quote_focus,$focus->column_fields['quote_id']);
 		}
 
+		$smarty->assign("QUOTE_ID", $focus->column_fields['quote_id']);
 		$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
 		$smarty->assign("MODE", $quote_focus->mode);
 		$smarty->assign("TAXVALUE", $quote_focus->column_fields['txtTax']);

Modified: vtigercrm/trunk/modules/SalesOrder/Save.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/Save.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/Save.php Tue Jun 20 09:31:33 2006
@@ -84,7 +84,7 @@
         if($prod_status != 'D')
         {
 
-                $query ="insert into vtiger_soproductrel values($focus->id, $prod_id , $qty, $listprice, $vat, $sales, $service)";
+                $query ="insert into vtiger_soproductrel values($focus->id, $prod_id , $qty, $listprice, \"$vat\", \"$sales\", \"$service\")";
                 $adb->query($query);
 		updateStk($prod_id,$qty,$focus->mode,$ext_prod_arr,'SalesOrder');
         }





More information about the vtigercrm-commits mailing list