From 936f5d23da172da6c5bd4e637d779928a285e421 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Tue, 3 Oct 2023 14:48:00 +0530 Subject: [PATCH] Approve invoice Fixes : ps --- app/Controllers/Invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index 4f3a7237..fd556807 100644 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -314,7 +314,7 @@ class Invoice extends BaseController helper('session'); $where = ['isactive' => 1, 'status' => 'Approved', 'invoice_id' => (int)$id]; $details = $model->where($where)->findAll(); - if (!empty($details)) { // change + if (empty($details)) { // Array Empty Means allow to Approve. $data = ['status' => 'Approved', 'updated_by' => get_logged_user_id()]; if ($model->update($id, $data)) { $this->approve_notifications((int)$id);