Approve invoice Fixes : ps
This commit is contained in:
parent
495776e377
commit
936f5d23da
@ -314,7 +314,7 @@ class Invoice extends BaseController
|
|||||||
helper('session');
|
helper('session');
|
||||||
$where = ['isactive' => 1, 'status' => 'Approved', 'invoice_id' => (int)$id];
|
$where = ['isactive' => 1, 'status' => 'Approved', 'invoice_id' => (int)$id];
|
||||||
$details = $model->where($where)->findAll();
|
$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()];
|
$data = ['status' => 'Approved', 'updated_by' => get_logged_user_id()];
|
||||||
if ($model->update($id, $data)) {
|
if ($model->update($id, $data)) {
|
||||||
$this->approve_notifications((int)$id);
|
$this->approve_notifications((int)$id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user