From 8954f14482832106668bf0fb0597ae4a35e13132 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Sun, 30 Jul 2017 04:38:17 +0530 Subject: [PATCH] Issue Fixed --- application/models/mrir_model.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/application/models/mrir_model.php b/application/models/mrir_model.php index c05bed76..9925c583 100755 --- a/application/models/mrir_model.php +++ b/application/models/mrir_model.php @@ -270,6 +270,32 @@ function ViewDistributionList() { } + function UpdatePOLineItem($LineItem,$PONO,$MaterialCode) + { + $this->db->where('PONO', $PONO); + $this->db->where('MaterialCode', $MaterialCode); + $this->db->update('T_PurchaseOrder_LineItem', $LineItem); + + return TRUE; + } + + function UpdatePOMaster($PONO,$updatedBy) + { + $this->db->select('*'); + $this->db->from('T_PurchaseOrder_LineItem'); + $this->db->where('PONO',$PONO); + $this->db->where('Status !=',MRIR_APPROVED); + + $query = $this->db->get(); + + + if ($query->num_rows == 0) { + $this->db->where('PONO', $PONO); + $POStatus = array('status'=>MRIR_APPROVED,'UpdateBY'=>$updatedBy); + $this->db->update('T_PurchaseOrder_Master', $POStatus); + } + + } } ?> \ No newline at end of file