[Vtigercrm-commits] [vtiger-commits] r9971 - /vtigercrm/branches/5.0.3/modules/PurchaseOrder/Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Dec 14 05:09:39 EST 2006
Author: richie
Date: Thu Dec 14 03:09:35 2006
New Revision: 9971
Log:
* Modified to update the stock when PO status is Received Shipment when it is created also, Fixes #2741
Modified:
vtigercrm/branches/5.0.3/modules/PurchaseOrder/Save.php
Modified: vtigercrm/branches/5.0.3/modules/PurchaseOrder/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/PurchaseOrder/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/PurchaseOrder/Save.php Thu Dec 14 03:09:35 2006
@@ -33,13 +33,18 @@
//Added code for auto product stock updation on receiving goods
$focus->update_prod_stock='';
-if($focus->column_fields['postatus'] == 'Received Shipment' && $focus->mode == 'edit')
+if($focus->column_fields['postatus'] == 'Received Shipment')
{
- $prev_postatus=getPoStatus($focus->id);
- if($focus->column_fields['postatus'] != $prev_postatus)
- {
- $focus->update_prod_stock='true';
- }
+ if($focus->mode != 'edit')
+ $focus->update_prod_stock='true';
+ else
+ {
+ $prev_postatus=getPoStatus($focus->id);
+ if($focus->column_fields['postatus'] != $prev_postatus)
+ {
+ $focus->update_prod_stock='true';
+ }
+ }
}
More information about the vtigercrm-commits
mailing list