diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index f4c9483..3ad1d6a 100644 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -123,7 +123,8 @@ class Invoice extends BaseController $model = new InvoiceModel(); $bmodel = new BooksModel(); $setting_model = new SettingsModel(); - $where = ['business_id' => (int)get_business_id()]; + $where = ['business_id' => (int)get_business_id() ]; + $cus_where = ['business_id' => (int)get_business_id() , 'isactive' => 1]; $rec_where = ['business_id' => (int)get_business_id(), 'YEAR(created_on)' => date('Y')]; $receipt = $model->getData('receipt', $rec_where); @@ -137,7 +138,7 @@ class Invoice extends BaseController $data['count_receipt_no'] = $settingData[0]['prefix_format'].'/'.$pad.''.$count_receipt_no; // Get customer names for the dropdown, events details, and books details $data['currency'] = $setting_model->select('currency')->where($where)->findAll(); - $data['customers'] = $model->getData('donor', $where); + $data['customers'] = $model->getData('donor', $cus_where); // $data['causes'] = $model->getData('causes', $where); $data['causes'] = $bmodel->select('*')->where('business_id', (int)get_business_id() )->where('isactive',1)->get()->getResult(); $data['campaign'] = $model->getData('campaign', $where); diff --git a/app/Views/customer_form.php b/app/Views/customer_form.php index 88a9ec4..9db1477 100644 --- a/app/Views/customer_form.php +++ b/app/Views/customer_form.php @@ -65,15 +65,16 @@