diff --git a/.gitignore b/.gitignore index 941e295..e5707a4 100644 --- a/.gitignore +++ b/.gitignore @@ -82,7 +82,7 @@ writable/**/*.sqlite #------------------------- # Composer #------------------------- -!vendor/ +vendor composer.lock tests diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index 9ee95c3..caac569 100644 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -272,6 +272,7 @@ class Invoice extends BaseController 'business_id' => (int)get_business_id(), 'isactive' => 1 ]; + // print_r($data);die; ## Based on the invoice ID, we designated Insert or Update on Details... if (empty($receipt_id)) { $data['created_by'] = (int)get_logged_user_id(); @@ -291,6 +292,7 @@ class Invoice extends BaseController 'updated_by' => (int)get_logged_user_id() ]; $this->AuditHistoryModel->save($audit_data); + /************************************* */ session()->setFlashdata('success', 'Receipt has been added successfully.'); $this->logger->info("Receipt: has been added successfully. Inserted ID = " . $receipt_id); @@ -346,7 +348,6 @@ class Invoice extends BaseController $donordata = $model->getData('donor', $where); // generate recipt $html = $this->generate_invoice_pdf($receipt_id, 'mail'); - // echo $html;die; // send mail $notification = new NotificationHelper(); if($donordata[0]->email != null || $donordata[0]->email != '') @@ -513,9 +514,8 @@ class Invoice extends BaseController $where = ['business_id' => (int)get_business_id()]; $currency_data = $model->setTable('business')->select('currency')->where($where)->findAll(); - $terms_data = $this->BusinessModel->select('terms,signature,80G,12AA,80G_vaildupto,12AA_vaildupto')->where($where)->findAll(); + $terms_data = $this->BusinessModel->select('terms,signature,80G as eightyG ,12AA as twelveAA,80G_vaildupto as eightyGVaildUpto,12AA_vaildupto as twelveAAVaildUpto')->where($where)->findAll(); $data = $model->getInvoiceData($id); - // print_r($data);die; // Check if data is empty if (!$data || !$currency_data) { throw new \Exception('Data not found or empty'); @@ -548,7 +548,6 @@ class Invoice extends BaseController } $digits = strlen((string)$data[0]->amount); $amount_in_words = $digits <= 9 ? $this->convertNumberToWords($data[0]->amount) : $data[0]->amount; - ; $html = view('invoice_pdf_template', [ 'data' => $data[0], 'currency' => $data[0]->currency, @@ -557,10 +556,8 @@ class Invoice extends BaseController 'signature' => $data[0]->signature, 'staff_name' => $user[0]['first_name'] . ' ' .$user[0]['last_name'], 'Notes' => $terms_data[0]['terms'], - 'eightyG' => $terms_data[0]['80G'] ? '