[Vtigercrm-commits] [vtiger-commits] r9729 - /vtigercrm/branches/5.0.2/modules/SalesOrder/Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Oct 26 13:20:51 EDT 2006
Author: richie
Date: Thu Oct 26 11:20:44 2006
New Revision: 9729
Log:
moved module specific save code to enitity.php file
Modified:
vtigercrm/branches/5.0.2/modules/SalesOrder/Save.php
Modified: vtigercrm/branches/5.0.2/modules/SalesOrder/Save.php
==============================================================================
--- vtigercrm/branches/5.0.2/modules/SalesOrder/Save.php (original)
+++ vtigercrm/branches/5.0.2/modules/SalesOrder/Save.php Thu Oct 26 11:20:44 2006
@@ -31,39 +31,7 @@
$focus = new SalesOrder();
setObjectValuesFromRequest(&$focus);
-if($focus->mode == 'edit' && ($focus->column_fields['sostatus'] == 'Delivered' || $focus->column_fields['sostatus'] == 'Approved'))
-{
- $prev_sostatus=$adb->query_result($adb->query("select sostatus from vtiger_salesorder where salesorderid=$focus->id"),0,'sostatus');
-
- if($focus->column_fields['sostatus'] != $prev_sostatus)
- {
- if($focus->column_fields['sostatus'] == 'Delivered')
- {
- //Deduct the quantity from Quantity In Demand
- $updateDemand = '-';
- }
- elseif($focus->column_fields['sostatus'] == 'Approved')
- {
- //Add the quantity with Quantity In Demand
- $updateDemand = '+';
- }
- }
-
-}
-
$focus->save("SalesOrder");
-
-//Checking if quote_id is present and updating the quote status
-if($focus->column_fields["quote_id"] != '')
-{
- $qt_id = $focus->column_fields["quote_id"];
- $query1 = "update vtiger_quotes set quotestage='Accepted' where quoteid=".$qt_id;
- $adb->query($query1);
-}
-
-//Based on the total Number of rows we will save the product relationship with this entity
-saveInventoryProductDetails(&$focus, 'SalesOrder','', $updateDemand);
-
$return_id = $focus->id;
More information about the vtigercrm-commits
mailing list