From 508b3bd67887a62a0131c2d9dd94cdd91b913cc0 Mon Sep 17 00:00:00 2001 From: venbatechnologies Date: Thu, 17 May 2018 12:54:08 +0530 Subject: [PATCH] logpo --- application/controllers/emergencypurchaseorder.php | 4 ++++ application/controllers/purchaseorder.php | 13 +++++++++++++ application/controllers/servicepurchaseorder.php | 5 ++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php index e11f7a2e..f9c34999 100755 --- a/application/controllers/emergencypurchaseorder.php +++ b/application/controllers/emergencypurchaseorder.php @@ -1399,6 +1399,9 @@ $newsup=$this->input->post('newsup'); $this->purchaseorder_model->insertlogpo($logpo); } + + if(!empty($newSupId[0] )) + { if($newSupId[0] != $b4supplier) { $logpo =array('PONO'=>$PONO,'LineItemNos'=>'-','UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt,'oldValue'=>$b4supplier,'newValue'=>$newsup,'entity'=>'Supplier Changed'); @@ -1406,6 +1409,7 @@ $newsup=$this->input->post('newsup'); $this->purchaseorder_model->insertlogpo($logpo); } + } //echo $RowCount; for ($i = 1; $i <= $RowCount; $i++) diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index e353dfb5..7fe36e41 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1269,13 +1269,18 @@ function edited(){ $this->purchaseorder_model->insertlogpo($logpo); } + + if(!empty($newSupId[0] )) + { if($newSupId[0] != $b4supplier) { + //echo $b4supplier.'-'.$newSupId[0];die; $logpo =array('PONO'=>$PONO,'LineItemNos'=>'-','UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt,'oldValue'=>$b4supplier,'newValue'=>$newsup,'entity'=>'Supplier Changed'); $this->purchaseorder_model->insertlogpo($logpo); } + } //echo "OUT"; for ($i = 1; $i <= $RowCount; $i++) @@ -2264,6 +2269,9 @@ function addNewImportPurchaseOrder() $this->purchaseorder_model->insertlogpo($logpo); } + + if(!empty($newSupId[0] )) + { if($newSupId[0] != $b4supplier) { $logpo =array('PONO'=>$PONO,'LineItemNos'=>'-','UpdateBy'=>$CreateBy,'UpdatedOn'=>$updateddt,'oldValue'=>$b4supplier,'newValue'=>$newsup,'entity'=>'Supplier Changed'); @@ -2271,6 +2279,7 @@ function addNewImportPurchaseOrder() $this->purchaseorder_model->insertlogpo($logpo); } + } //echo $RowCount; @@ -2984,6 +2993,9 @@ if($Quantity != $b4qty) $this->purchaseorder_model->insertlogpo($logpo); } + + if(!empty($newSupId[0] )) + { if($newSupId[0] != $b4supplier) { @@ -2992,6 +3004,7 @@ if($Quantity != $b4qty) $this->purchaseorder_model->insertlogpo($logpo); } + } for ($i = 1; $i <= $RowCount; $i++) { diff --git a/application/controllers/servicepurchaseorder.php b/application/controllers/servicepurchaseorder.php index 1d971ca5..ea4a04d3 100755 --- a/application/controllers/servicepurchaseorder.php +++ b/application/controllers/servicepurchaseorder.php @@ -419,6 +419,9 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO); $this->purchaseorder_model->insertlogpo($logpo); } + + if(!empty($newSupId[0] )) + { if($newSupId[0] != $b4supplier) { //$newsupname = $newSupId[0].'-'.$newSupId[1]; @@ -428,7 +431,7 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO); $this->purchaseorder_model->insertlogpo($logpo); } - +} for ($i = 1; $i <= $RowCount; $i++) {