diff --git a/.gitignore b/.gitignore
index 9ce12c6..b8ad33b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,5 +48,5 @@ Thumbs.db
*.mov
*.wmv
+writable/debugbar
writable/session/
-writable/debugbar/
diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 579b82a..1e78f9a 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -65,6 +65,12 @@ $routes->get("sitesetting_page/(:any)", "Settings::sitesetting_page/$1");
$routes->post("sitesetting_synchronization", "Settings::sitesetting_synchronization");
$routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1");
+# App Site-Setting Routes(SuperAdmin)
+// $routes->get("appsetting/", "AppSettings::index");
+$routes->get("appsetting_page/(:any)", "AppSettings::appsetting_page/$1");
+$routes->post("appsetting_synchronization", "AppSettings::appsetting_synchronization");
+// $routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1");
+
# Business Routes
$routes->get("business_list/", "Business::index");
$routes->get("new_bussiness/(:any)", "Business::new_bussiness/$1");
diff --git a/app/Controllers/Address.php b/app/Controllers/Address.php
index 8b0676b..6d93833 100644
--- a/app/Controllers/Address.php
+++ b/app/Controllers/Address.php
@@ -13,7 +13,7 @@ class Address extends BaseController
helper('session');
$customerModel = new CustomerModel();
$data['page_name'] = 'Customer Listing';
- $data['customers'] = $customerModel->findAll();
+ $data['doner'] = $customerModel->findAll();
return view('address_list', $data);
}
}
diff --git a/app/Controllers/ApiIntegration.php b/app/Controllers/ApiIntegration.php
index d59fa15..598f1c2 100644
--- a/app/Controllers/ApiIntegration.php
+++ b/app/Controllers/ApiIntegration.php
@@ -486,13 +486,13 @@ class ApiIntegration extends ResourceController
$customer_id = "";
if (count($records) > 0 && !empty($wordpress_customer_id)) {
$where = ['wp_api_customer_id' => $wordpress_customer_id, 'isactive' => 1];
- $customer_details = $api_model->setTable('customers')->where($where)->first();
+ $customer_details = $api_model->setTable('doner')->where($where)->first();
if (isset($customer_details['customer_id']) && $customer_details['customer_id'] != "") {
$customer_id = $customer_details['customer_id'];
$where['customer_id'] = $customer_details['customer_id'];
}
- $countAll = $api_model->countAll('customers', $where);
+ $countAll = $api_model->countAll('doner', $where);
$this->logger->info(($countAll) ? "Api SaveCustomerDetails : in wordpress customer ref ID = ".$wordpress_customer_id." is available on customer table and its PrimaryKey = ".$customer_id : "Api SaveBookDetails : in wordpress Customer ref ID = ".$wordpress_customer_id." Not available on Customer table");
$customer_data['first_name'] = $records['first_name'];
@@ -509,7 +509,7 @@ class ApiIntegration extends ResourceController
if ((int)$countAll == 0) {
$customer_data['created_by'] = $this->global_variable_user_id;
- $insert_result = $api_model->insertData('customers', $customer_data);
+ $insert_result = $api_model->insertData('doner', $customer_data);
$last_insert_customer_id = $insert_result['info'];
$extensive_correspondence .= $insert_result['info'] ? "Customer id : " . $insert_result['info']
: "Err :" . $insert_result['err'];
@@ -520,7 +520,7 @@ class ApiIntegration extends ResourceController
$customer_data['updated_by'] = $this->global_variable_user_id;
$last_insert_customer_id = $customer_id;
$customer_where = ['customer_id' => $customer_id, 'isactive' => 1, 'wp_api_customer_id' => $wordpress_customer_id];
- $update_result = $api_model->updateData('customers', $customer_data, $customer_where);
+ $update_result = $api_model->updateData('doner', $customer_data, $customer_where);
$extensive_correspondence .= $update_result['info'] ? "Customer id : " . $last_insert_customer_id . " ( " . $update_result['info'] . ")"
: " ( Err :" . $update_result['err'] . ")";
$basic_message .= "Customer id : " . $last_insert_customer_id;
@@ -743,7 +743,7 @@ class ApiIntegration extends ResourceController
if(isset($records['billing']) && gettype($records['billing']) === 'object') {$billing_array = [$records['billing']];}
if(isset($records['shipping']) && gettype($records['shipping']) === 'object') {$shipping_array = [$records['shipping']];}
$where = ['wp_api_customer_id' => (int)$records['customer_id'], 'isactive' => 1];
- $local_customer = $api_model->getData('customers', $where);
+ $local_customer = $api_model->getData('doner', $where);
$local_customer_id = !empty($local_customer) ? $local_customer[0]->customer_id : NULL;
$this->logger->info((!empty($local_customer)) ? "Api SaveSalesDetails : in wordpress customer ref ID = ".$records['customer_id']." is available on Customer table and its PrimaryKey = ".$local_customer_id."(local customer id)" : "Api SaveSalesDetails : in wordpress customer ref ID = ".$records['customer_id']." Not available on Customer table");
diff --git a/app/Controllers/AppSettings.php b/app/Controllers/AppSettings.php
new file mode 100644
index 0000000..3f15946
--- /dev/null
+++ b/app/Controllers/AppSettings.php
@@ -0,0 +1,151 @@
+ 1];
+ if (!empty($session_role) && $session_role !== "sadmin") {
+ $where = ['app_settings.business_id' => $session_bid, 'app_settings.isactive' => 1];
+ }
+
+ $model = new AppSettingModel();
+ $model->setTable('app_settings');
+ $sitesetting_details = $model->where($where)->orderBy('app_setting_id', 'DESC')->findAll();
+ $data['page_name'] = 'App Settings Details';
+ $data['details'] = $sitesetting_details;
+ $data['session_role'] = $session_role;
+ $this->render_page('app_setting_list', $data);
+ }
+
+ ## To Load Settings Add/Update page
+ public function appsetting_page($id)
+ {
+ if ($id === '0') {
+ $data['page_name'] = 'Add Site Settings';
+ $data['details'] = [];
+ } else if ($id !== '0') {
+ $data['page_name'] = 'Edit App Settings';
+ $model = new AppSettingModel();
+ $model->setTable('app_settings');
+ $details = $model->where(['app_setting_id' => $id, 'isactive' => 1])->first();
+ $data['details'] = $details;
+
+ }
+ $data['business_details']=$this->business_details();
+ $this->render_page('app_setting_form', $data);
+ }
+ public function business_details()
+ {
+ $model = new BusinessModel();
+ $model->setTable('business');
+ $business_details = $model->where('business_id', 0)->orderBy('business_id', 'DESC')->findAll();
+ return $business_details;
+ }
+
+
+ ## To Save/Update Setting Data on DB.
+ public function appsetting_synchronization()
+ {
+ helper('session');
+ $session_bid = get_business_id();
+ $session_uid = get_logged_user_id();
+
+
+
+ $img = $this->request->getFile('slogo');
+ $business_id = $this->request->getPost('business_id');
+ $app_setting_id = $this->request->getPost('app_setting_id');
+ $filePath = 'public/uploads/' . $this->request->getPost('slogo');
+ $fileName = $img->getName();
+
+ if($fileName !== ""){
+
+ if ($img->isValid() && !$img->hasMoved()) {
+
+ $img->move(ROOTPATH . 'public/uploads', $fileName);
+ }
+
+ }
+
+
+ $favicon = $this->request->getFile('favicon');
+ $faviconName = $favicon->getName();
+
+ if($faviconName !== ""){
+
+ if ($favicon->isValid() && !$favicon->hasMoved()) {
+
+ $favicon->move(ROOTPATH . 'public/uploads', $faviconName);
+ }
+ }
+
+
+ $AppSettingModel = new AppSettingModel();
+ $data = [
+
+ 'site_name' => $this->request->getPost('site_name'),
+ 'site_title' => $this->request->getPost('site_title'),
+ 'terms_service' => $this->request->getPost('terms_service'),
+ 'footer_about' => $this->request->getPost('footer_about'),
+ 'admin_email' => $this->request->getPost('admin_email'),
+ 'mobile'=> $this->request->getPost('mobile'),
+ 'copyright'=> $this->request->getPost('copyright'),
+ 'pagination_limit'=> $this->request->getPost('pagination_limit'),
+ 'site_info'=> $this->request->getPost('site_info'),
+ 'about_info'=> $this->request->getPost('about_info'),
+ 'mail_protocol'=> $this->request->getPost('mail_protocol'),
+ 'mail_title'=> $this->request->getPost('mail_title'),
+ 'mail_host'=> $this->request->getPost('mail_host'),
+ 'mail_port'=> $this->request->getPost('mail_port'),
+ 'mail_encryption'=> $this->request->getPost('mail_encryption'),
+ 'mail_username'=> $this->request->getPost('mail_username'),
+ 'mail_password'=> $this->request->getPost('mail_password'),
+ 'currency'=> $this->request->getPost('currency'),
+ 'country'=> $this->request->getPost('country'),
+ 'business_id'=> $this->request->getPost('business_id'),
+
+ ];
+
+ if($fileName !== "")
+ {
+ $data['logo'] = $fileName;
+ }
+
+ if($faviconName !== "")
+ {
+ $data['favicon'] = $faviconName;
+ }
+
+
+ $app_setting_id = $this->request->getPost('app_setting_id'); // Get the business ID for update
+
+
+ if (empty($app_setting_id)) {
+ // It's an insert operation
+ $data['isactive'] = 1;
+ $data['created_by'] = $session_uid;
+
+ $AppSettingModel->insert($data);
+ // print_r($data);die;
+ } else {
+ // It's an update operation
+ $isactive = $this->request->getPost('isactive');
+ $data['isactive'] = ($isactive == 'on') ? 1 : 0;
+ $data['updated_by'] = $session_uid;
+ $AppSettingModel->update($app_setting_id, $data);
+ }
+ return redirect()->route('dashboard');
+ }
+}
+
+
+
diff --git a/app/Controllers/Customer.php b/app/Controllers/Customer.php
index 055572e..7547635 100644
--- a/app/Controllers/Customer.php
+++ b/app/Controllers/Customer.php
@@ -414,8 +414,8 @@ class Customer extends BaseController
// Now you can use $whereCondition in your SQL query
$db = \Config\Database::connect();
- // $sql = "SELECT doner_id,CONCAT(first_name,'',last_name) as customer_name,email,mobile_no FROM customers WHERE ".$whereCondition;
- $sql = "SELECT C.city, C.state, I.receipt_date, C.doner_id, CONCAT(C.first_name, ' ', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM customers as C
+ // $sql = "SELECT doner_id,CONCAT(first_name,'',last_name) as customer_name,email,mobile_no FROM doner WHERE ".$whereCondition;
+ $sql = "SELECT C.city, C.state, I.receipt_date, C.doner_id, CONCAT(C.first_name, ' ', C.last_name) as customer_name, C.email, C.mobile_no, C.isactive, COUNT(I.receipt_id) as invoice_count_raised_by_customer FROM doner as C
LEFT JOIN receipt I ON I.doner_id = C.doner_id and I.isactive = 1
WHERE C.isactive = 1 AND " . $whereCondition . "
GROUP BY C.doner_id";
diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php
index 792a5fd..92fe33e 100644
--- a/app/Controllers/Invoice.php
+++ b/app/Controllers/Invoice.php
@@ -8,6 +8,9 @@ use App\Models\InvoiceModel;
use App\Helpers\NotificationHelper;
use Mpdf\Mpdf;
+use Dompdf\Dompdf;
+use Dompdf\Options;
+
class Invoice extends BaseController
{
@@ -21,7 +24,7 @@ class Invoice extends BaseController
$model = new InvoiceModel();
$where = ['business_id' => (int)get_business_id()];
- $data['Donors'] = $model->getData('customers', $where);
+ $data['Donors'] = $model->getData('doner', $where);
$data['page_name'] = 'Receipt Details';
$data['receipt'] = $model->where(["business_id"=>$session_bid])->findAll();
@@ -43,7 +46,7 @@ class Invoice extends BaseController
$where = ['business_id' => (int)get_business_id()];
// Get customer names for the dropdown, events details, and books details
- $data['customers'] = $model->getData('customers', $where);
+ $data['customers'] = $model->getData('doner', $where);
$data['causes'] = $model->getData('causes', $where);
$data['invoice_number_formatting'] = $model->getData('invoice_number_formatting', $where);
@@ -304,39 +307,6 @@ class Invoice extends BaseController
return redirect()->route('receipt_list');
}
- ## To Approve Invoice details based on invoice ID
- public function approve_invoice($id)
- {
-
- try {
- if (!$id) {
- throw new \Exception("Invoice can't able to Approved. Because ID can't Found");
- }
- $model = new InvoiceModel();
- helper('session');
- $where = ['isactive' => 1, 'status' => 'Approved', 'receipt_id' => (int)$id];
- $details = $model->where($where)->findAll();
- 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);
- session()->setFlashdata('success', 'Invoice has been Approved Successfully.');
- $this->logger->info("Invoice: has been Approved successfully. ID = " . $id);
- } else {
- $this->logger->error("Invoice: Does Not Exist To Approved");
- throw new \Exception("Invoice can't Approved");
- }
- } else {
- $this->logger->error("Invoice: already Approved ID = " . $id);
- throw new \Exception("Invoice already Approved");
- }
- } catch (\Exception $e) {
- $this->logger->error("Invoice: Err Occur = " . $e->getMessage());
- session()->setFlashdata('error', 'Message: ' . $e->getMessage());
- }
- // Redirect back to the invoice list
- return redirect()->route('receipt_list');
- }
public function approve_notifications($receipt_id)
{
@@ -438,6 +408,52 @@ class Invoice extends BaseController
}
## To Generate receipt PDF based on receipt ID
+ // public function generate_invoice_pdf($id)
+ // {
+ // // Fetch the receipt data based on $receipt_id
+ // $model = new InvoiceModel();
+ // $data = $model->getInvoiceData($id);
+ // // print_r($data);die;
+
+ // $config = [
+ // 'mode' => 'utf-8',
+ // 'format' => 'letter', // You can also use [215.9, 279.4] for specifying dimensions manually
+ // 'default_font_size' => 12,
+ // 'default_font' => 'Arial',
+ // 'margin_left' => 0,
+ // 'margin_right' => 0,
+ // 'margin_top' => 0,
+ // 'margin_bottom' => 0,
+ // 'margin_header' => 0,
+ // 'margin_footer' => 0,
+ // 'orientation' => 'L', // Portrait
+ // ];
+
+ // // Create an mPDF object
+ // $mpdf = new Mpdf($config);
+ // $mpdf->autoLangToFont = true;
+ // $mpdf->autoScriptToLang = true;
+
+ // // Set PDF properties
+ // $mpdf->SetTitle('Receipt');
+ // $mpdf->SetAuthor('ORG');
+ // $mpdf->SetCreator('');
+
+ // $mpdf->AddPage('L', 'LETTER');
+
+ // // Generate the PDF content (HTML) with data
+ // $html = view('invoice_pdf_template', ['data' => $data[0]]);
+
+ // // echo $html; die;
+
+ // // Load HTML into the mPDF instance
+ // $mpdf->WriteHTML($html);
+
+ // // Output the PDF to the browser for download
+ // $mpdf->Output('Receipt' . date('Y-m-d H-i-s') . '.pdf', 'D');
+
+ // }
+
public function generate_invoice_pdf($id)
{
// Fetch the receipt data based on $receipt_id
@@ -445,28 +461,35 @@ class Invoice extends BaseController
$data = $model->getInvoiceData($id);
// print_r($data);die;
- // Create an mPDF object
- $mpdf = new Mpdf();
- $mpdf->autoLangToFont = true;
- $mpdf->autoScriptToLang = true;
+ $options = new Options();
+ $options->set('isHtml5ParserEnabled', true);
+ $options->set('isPhpEnabled', true);
+ $options->set('isRemoteEnabled', true);
+ $options->set('font_subsetting', true);
- // Set PDF properties
- $mpdf->SetTitle('Receipt');
- $mpdf->SetAuthor('ORG');
- $mpdf->SetCreator('');
+ $dompdf = new Dompdf($options);
- $mpdf->AddPage('L', 'LETTER');
-
- // Generate the PDF content (HTML) with data
+ define("DOMPDF_UNICODE_ENABLED", true);
$html = view('invoice_pdf_template', ['data' => $data[0]]);
- // Load HTML into the mPDF instance
- $mpdf->WriteHTML($html);
+ // echo $html; die;
- // Output the PDF to the browser for download
- $mpdf->Output('Receipt' . date('Y-m-d H-i-s') . '.pdf', 'D');
+ $dompdf->loadHtml($html, 'UTF-8');
+ $dompdf->setPaper('letter', 'landscape');
+ $dompdf->set_option('font_subsetting', true);
+
+ $dompdf->render();
+
+ $output = $dompdf->output();
+
+ $dompdf->stream('document.pdf', ['Attachment' => 1]);
}
+
+
+
+
+
public function print_address($id)
{
// Fetch the invoice data based on $id
@@ -496,12 +519,6 @@ class Invoice extends BaseController
$html = view('address_pdf_template', ['invoiceData' => $invoiceData]);
- // Load the mPDF library
-
-
- // Set PDF properties
-
-
// Load HTML content into mPDF
$mpdf->WriteHTML($html);
diff --git a/app/Controllers/Scheme.php b/app/Controllers/Scheme.php
deleted file mode 100644
index 3909c39..0000000
--- a/app/Controllers/Scheme.php
+++ /dev/null
@@ -1,195 +0,0 @@
- 1, 'business_id' => (int)$session_bid];
- } else {
- $where = ['isactive != ' => NULL];
- }
- $SchemeModel = new SchemeModel();
-
- $data['page_name'] = 'Scheme Details';
- $data['scheme'] = $SchemeModel->getSchemeNamesAndDurationsByBusiness($session_bid);
-
-
-
- $this->render_page('scheme_list', $data);
- } else {
- return redirect()->to('login');
- }
- }
-
- ## To Load Scheme Form (Add/Update)
- public function new_scheme($id)
- {
- helper('session');
- $session_bid = get_business_id();
- if ($id === '0') {
- $data['page_name'] = 'Add Scheme';
- $data['scheme'] = [];
- } else if ($id !== '0') {
- $data['page_name'] = 'Edit Scheme';
- $model = new SchemeModel();
-
-
- $imageData = $model->getBooksAndImagesByBookId($id);
-
- $data['scheme'] = $imageData[0];
-
- // print_r($data);die();
- }
-
- $data['session_bid'] = $session_bid;
- $this->render_page('scheme_form', $data);
- }
-
- ## For inserting/updating details of scheme
- public function insert_scheme()
- {
- try{
- helper('session');
- $session_bid = get_business_id();
- $session_uid = get_logged_user_id();
-
- $SchemeModel = new SchemeModel();
- $data = [
- 'title' => $this->request->getPost('sname'),
- 'description' => $this->request->getPost('sdescription'),
- 'price' => $this->request->getPost('sprice'),
- 'duration' => $this->request->getPost('sduration'),
- 'sku' => $this->request->getPost('sku'),
- 'business_id' => $this->request->getPost('business_id')
-
- ];
- $scheme_id = $this->request->getPost('book_id'); // Get the business ID for update
-
- if (empty($scheme_id)) {
- // It's an insert operation
- $data['isactive'] = 1;
- $data['created_by'] = $session_uid;
- if ($SchemeModel->insert($data)) {
- $last_inserted_id = $SchemeModel->insertID();
- // Retrieve the category name 'membership'
- $category_name = 'membership';
- // Find the category ID for 'membership' from the category table
- $db = db_connect();
- $category = $db->table('category')
- ->select('id')
- ->where('name', $category_name)
- ->get()
- ->getRow();
- // Check if the category exists
- if ($category) {
- // Insert data into book_categories table
- $db->table('book_categories')->insert([
- 'book_id' => $last_inserted_id,
- 'category_id' => $category->id,
- 'created_by' => $session_uid
- ]);
- }
- session()->setFlashdata('success', 'Scheme has been added successfully.');
- $this->logger->info("Scheme: has been added successfully. Inserted ID = " . $last_inserted_id);
- } else {
- session()->setFlashdata('error', 'Scheme could not be added. Please try again..');
- $this->logger->error("Scheme: Err could not be added. Please try again.");
- }
- if (!empty($_FILES['img_name']['name'])) {
- // A new image has been uploaded
-
- // First, delete the previous image file if it exists
- if (!empty($imageData) && file_exists(WRITEPATH . 'public/uploads/' . $imageData[0]->img_name)) {
- unlink(WRITEPATH . 'public/uploads/' . $imageData[0]->img_name);
- }
-
- $imageData = [
- 'book_id' => $last_inserted_id, // Assuming $last_inserted_id contains the ID of the inserted scheme
- 'img_name' => $_FILES['img_name']['name'],
- 'is_cover' => 1, // Set this based on your requirements
- 'type' => $_FILES['img_name']['type']
- ];
-
- // Move the uploaded image to a desired location
- $imagePath = 'public/uploads/' . $_FILES['img_name']['name'];
- move_uploaded_file($_FILES['img_name']['tmp_name'], $imagePath);
-
- // Update image data in the 'book_images' table
- $SchemeModel->insertImage($imageData);
- }
-}
- else {
- // It's an update operation
- $isactive = $this->request->getPost('isactive');
- $data['isactive'] = ($isactive) ? 1 : 0;
- $data['updated_by'] = $session_uid;
-
- $SchemeModel->update($scheme_id, $data);
- if ($SchemeModel->update($scheme_id, $data)) {
- session()->setFlashdata('success', 'Scheme has been updated successfully.');
- $this->logger->info("Scheme: has been updated successfully. Updated Scheme ID = " . $scheme_id);
- } else {
- session()->setFlashdata('error', 'Scheme update failed. Please try again.');
- $this->logger->error("Scheme: Err Failed to update ID =" . $scheme_id);
- }
- }
- } catch (\Exception $e) {
- $this->logger->error("Scheme: Err Occur = ".$e->getMessage()." File = ". $e->getFile() . " Line = " . $e->getLine());
- session()->setFlashdata('error', 'Message: ' . $e->getMessage());
- }
- return redirect()->route('scheme_list');
- }
-
- ## For delete the Scheme details (Which means inactive the details)
- public function delete_scheme($id)
- {
- try {
- helper('session');
- $session_uid = get_logged_user_id();
- $SchemeModel = new SchemeModel();
- $where = ['book_id' => (int)$id, 'isactive =' => 1];
- // $existingScheme = $SchemeModel->find($id);
- $existingScheme = $SchemeModel->where($where)->find($id);
- if ($existingScheme) {
- $this->logger->Info("Scheme: Going to Inactive ID = ".$id);
- $data = ['isactive' => 0 , 'updated_by' => $session_uid];
- if ($SchemeModel->update($id, $data)) {
- $activeSchemeCategory = $SchemeModel->getData('book_categories', $where);
- if(!empty($activeSchemeCategory)){
- for ($z = 0; $z < count($activeSchemeCategory); $z++) {
- $SchemeCategoryIds[$z] = $activeSchemeCategory[$z]->id;
- }
- if(!empty($SchemeCategoryIds)){
- $this->logger->Info("Scheme: Categories Going to Inactived = ".implode(" ",$SchemeCategoryIds));
- $inactive_category_whereIn[0] = 'id';
- $inactive_category_whereIn[1] = $SchemeCategoryIds;
- $SchemeModel->inactiveMissingDetails('book_categories',$data,$where, $inactive_category_whereIn);
- }
- }
-
- session()->setFlashdata('success', 'Deleted successfully.');
- $this->logger->info("Scheme: has been Inactived successfully. Inactived ID = " . $id);
- } else {
- $this->logger->error("Scheme: Not able to Inactive ID =" . $id);
- throw new \Exception("Data Not able to Deleted");
- }
- }
- } catch (\Exception $e) {
- $this->logger->error("Scheme: Err Occur = ".$e->getMessage()." File = ". $e->getFile() . " Line = " . $e->getLine());
- session()->setFlashdata('error', 'Message: ' . $e->getMessage());
- }
- return redirect()->route('scheme_list');
- }
-}
diff --git a/app/Controllers/Settings.php b/app/Controllers/Settings.php
index a2230d6..5173e1f 100644
--- a/app/Controllers/Settings.php
+++ b/app/Controllers/Settings.php
@@ -20,7 +20,7 @@ class Settings extends BaseController
$model = new SettingsModel();
$model->setTable('settings');
$sitesetting_details = $model->where($where)->orderBy('setting_id', 'DESC')->findAll();
- $data['page_name'] = 'Site Settings Details';
+ $data['page_name'] = 'Org Settings Details';
$data['details'] = $sitesetting_details;
$data['session_role'] = $session_role;
$this->render_page('setting_list', $data);
@@ -28,26 +28,54 @@ class Settings extends BaseController
## To Load Settings Add/Update page
public function sitesetting_page($id)
- {
+ {
+ helper('session');
+ $session_role = get_user_role();
+ $session_bid = get_business_id();
+
if ($id === '0') {
- $data['page_name'] = 'Add Site Settings';
+ $data['page_name'] = 'Add Org Settings';
$data['details'] = [];
} else if ($id !== '0') {
- $data['page_name'] = 'Edit Site Settings';
+ $data['page_name'] = 'Edit Org Settings';
+
$model = new SettingsModel();
$model->setTable('settings');
- $details = $model->where(['setting_id' => $id, 'isactive' => 1])->first();
+ if($session_role === 'sadmin'){
+
+ $details = $model->where(['setting_id' => $id, 'isactive' => 1])->first();
+ }
+ else{
+ $details = $model->where(['business_id' => $session_bid, 'isactive' => 1])->first();
+
+ }
$data['details'] = $details;
}
+
+
$data['business_details']=$this->business_details();
+
+ // echo '
';
+ // print_r($data); die;
$this->render_page('setting_form', $data);
}
public function business_details()
{
+ helper('session');
+ $session_role = get_user_role();
+ $session_bid = get_business_id();
+
$model = new BusinessModel();
$model->setTable('business');
- $business_details = $model->orderBy('business_id', 'DESC')->findAll();
+ if($session_role === 'sadmin'){
+
+ $business_details = $model->where('business_id !=', 0)->orderBy('business_id', 'DESC')->findAll();
+ }
+ else{
+ $business_details = $model->where('business_id', $session_bid)->findAll();
+
+ }
return $business_details;
}
@@ -58,82 +86,45 @@ class Settings extends BaseController
helper('session');
$session_bid = get_business_id();
$session_uid = get_logged_user_id();
+ $session_role = get_user_role();
- $validationRule = [
- 'usersetiing' => [
- 'label' => 'Image File',
- 'rules' => [
- 'uploaded[slogo]',
- 'is_image[slogo]',
- 'mime_in[slogo,image/jpg,image/jpeg,image/gif,image/png,image/webp]',
-
- ],
- ],
-
- 'favicon' => [
- 'label' => 'Favicon',
- 'rules' => [
- 'uploaded[favicon]',
- 'is_image[favicon]',
- 'mime_in[favicon,image/ico,image/x-icon]',
- ],
- ],
- ];
-
- if (!$this->validate($validationRule)) {
- // Validation failed, return to the form with errors
- $data['validation_errors'] = $this->validator->getErrors();
- $this->render_page('setting_form', $data);
- return;
- }
$img = $this->request->getFile('slogo');
- $setting_id = $this->request->getPost('setting_id');
- $business_id = $this->request->getPost('business_id');
-
-
- $filePath ='public/uploads/' . $this->request->getPost('slogo');
-
+ print_r($img);
+ $business_id = $this->request->getPost('business_id');
+ $app_setting_id = $this->request->getPost('app_setting_id');
+ $filePath = 'public/uploads/' . $this->request->getPost('slogo');
+ $fileName = $img->getName();
+ var_dump($fileName);
+ echo $fileName;
+ echo $fileName !== "" && $fileName !== null ? "Yes":"No";
+ // die();
+
+ if($fileName !== ""){
- ## File Already Existing or not
-
if ($img->isValid() && !$img->hasMoved()) {
- $fileName = $img->getName();
- $img->move('public/uploads/', $fileName);
-
-
- // Delete the previous image file if it exists
- if ($setting_id) {
- $previousFileName = $this->request->getPost('previous_sfile');
- if ($previousFileName && is_file('public/uploads/' . $previousFileName)) {
- unlink('public/uploads/' . $previousFileName);
- }
- }
- } else {
- $fileName = $this->request->getPost('previous_sfile', ''); // Use the previous filename if no new image is provided
- }
- $favicon = $this->request->getFile('favicon');
- if ($favicon->isValid() && !$favicon->hasMoved()) {
- $faviconName = $favicon->getName();
- $favicon->move('public/uploads/', $faviconName);
- // Delete the previous favicon file if it exists
- if ($setting_id) {
- $previousFaviconName = $this->request->getPost('previous_favicon');
- if ($previousFaviconName && is_file('public/uploads/' . $previousFaviconName)) {
- unlink('public/uploads/' . $previousFaviconName);
+ $img->move(ROOTPATH . 'public/uploads', $fileName);
+ }
+
+ }
+
+
+ $favicon = $this->request->getFile('favicon');
+ $faviconName = $favicon->getName();
+
+ if($faviconName !== ""){
+
+ if ($favicon->isValid() && !$favicon->hasMoved()) {
+
+ $favicon->move(ROOTPATH . 'public/uploads', $faviconName);
+ }
}
- }
-} else {
- $faviconName = $this->request->getPost('previous_favicon', ''); // Use the previous favicon filename if no new favicon is provided
-}
$SettingsModel = new SettingsModel();
$data = [
'site_name' => $this->request->getPost('site_name'),
'site_title' => $this->request->getPost('site_title'),
- 'favicon' => $this->request->getPost('favicon'),
- 'logo' => $this->request->getPost('logo'),
'terms_service' => $this->request->getPost('terms_service'),
'footer_about' => $this->request->getPost('footer_about'),
'admin_email' => $this->request->getPost('admin_email'),
@@ -152,12 +143,23 @@ class Settings extends BaseController
'currency'=> $this->request->getPost('currency'),
'country'=> $this->request->getPost('country'),
'business_id'=> $this->request->getPost('business_id'),
- 'logo'=>$fileName,
- 'favicon'=>$faviconName
];
+
+ if($fileName !== "" && $fileName !== null)
+ {
+ $data['logo'] = $fileName;
+ }
+
+ if($faviconName !== "" && $faviconName !== null)
+ {
+ $data['favicon'] = $faviconName;
+ }
+
+ // echo '';
+ // print_r($data); die;
+
$setting_id = $this->request->getPost('setting_id'); // Get the business ID for update
-
if (empty($setting_id)) {
// It's an insert operation
$data['isactive'] = 1;
@@ -172,7 +174,14 @@ class Settings extends BaseController
$data['updated_by'] = $session_uid;
$SettingsModel->update($setting_id, $data);
}
- return redirect()->route('sitesetting_list');
+
+ if($session_role === 'sadmin'){
+
+ return redirect()->route('sitesetting_list');
+ }
+ else{
+ return redirect()->route('dashboard');
+ }
}
}
diff --git a/app/Models/AppSettingModel.php b/app/Models/AppSettingModel.php
new file mode 100644
index 0000000..16aaa62
--- /dev/null
+++ b/app/Models/AppSettingModel.php
@@ -0,0 +1,22 @@
+insert($data);
+ } else {
+ // Update existing record
+ return $this->update($id, $data);
+ }
+ }
+
+}
+
diff --git a/app/Models/CustomerModel.php b/app/Models/CustomerModel.php
index 4cc7809..95f294b 100644
--- a/app/Models/CustomerModel.php
+++ b/app/Models/CustomerModel.php
@@ -7,7 +7,7 @@ use CodeIgniter\Model;
class CustomerModel extends Model
{
- protected $table = 'customers';
+ protected $table = 'doner';
protected $primaryKey = 'doner_id ';
// protected $allowedFields = ['doner_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','profile_picture','date_of_birth','gender','mode','isactive','business_id'];
protected $allowedFields = ['doner_id ','first_name','city','last_name','email','mobile_no','country','state','postal_code' ,'address','org_name','date_of_birth','pan_no','doner_type','isactive','business_id','created_by','updated_by'];
diff --git a/app/Models/HomeModel.php b/app/Models/HomeModel.php
index 6893a5f..4e4e935 100644
--- a/app/Models/HomeModel.php
+++ b/app/Models/HomeModel.php
@@ -6,7 +6,7 @@ class HomeModel extends Model
public function customers($where) {
- $query = $this->db->table('customers');
+ $query = $this->db->table('doner');
$totalCustomers = $query->where($where)->countAll();
$activeCustomers = $query->where($where)->countAllResults();
@@ -62,7 +62,7 @@ class HomeModel extends Model
// $now = date('Y-m-d');
// $last30days = date('Y-m-d', strtotime('+30 days'));
// return $this->db->table('subscription as S')
- // ->join('customers as C', 'C.customer_id = S.customer_id', 'left')
+ // ->join('doner as C', 'C.customer_id = S.customer_id', 'left')
// ->join('books as BK', 'BK.book_id = S.scheme_id', 'left')
// ->join('book_categories as BC', 'BC.book_id = S.scheme_id', 'left')
// ->join('category as CM', 'CM.id = BC.category_id', 'left')
diff --git a/app/Models/InvoiceModel.php b/app/Models/InvoiceModel.php
index 7f5aac8..b2522a7 100644
--- a/app/Models/InvoiceModel.php
+++ b/app/Models/InvoiceModel.php
@@ -76,7 +76,7 @@ public function updateData($table, $data, $where)
return $this->db->table($this->table.' as I' )
- ->join('customers as C', 'C.doner_id = I.doner_id', 'left')
+ ->join('doner as C', 'C.doner_id = I.doner_id', 'left')
->join('Campaign as E', 'E.Campaign_id = I.event_id', 'left')
->join('business as B', 'B.business_id = I.business_id', 'left')
->join('users as U1', 'U1.user_id = I.created_by', 'left')
@@ -122,7 +122,7 @@ public function updateData($table, $data, $where)
// Fetch invoice data
return $this->db->table('receipt')
->where('receipt_id', $id)
- ->join('customers as C','C.doner_id= receipt.doner_id','left')
+ ->join('doner as C','C.doner_id= receipt.doner_id','left')
->join('business as B','B.business_id = receipt.business_id','left')
->select('receipt.*,concat(C.first_name," ",C.last_name) as customer_name,C.address, C.postal_code,C.city, C.state,C.mobile_no as customer_mobile, C.pan_no as cust_pan_no')
->select('B.title ,B.business_logo,B.terms,B.address,B.city,B.state,B.postal_code,B.email,B.mobile_no, B.pan_no, B.org_reg_no')
@@ -163,7 +163,7 @@ public function updateData($table, $data, $where)
// public function getMembershipListForCustomer($category, $id)
// {
// $data = $this->db->table('subscription as S')
- // ->join('customers as C', 'C.doner_id = S.doner_id', 'left')
+ // ->join('doner as C', 'C.doner_id = S.doner_id', 'left')
// ->join('category as CM', 'CM.id = S.scheme_id', 'left')
// ->join('book_categories as BC', 'BC.category_id = S.scheme_id', 'left')
// ->join('causes as BK', 'BC.causes_id = BK.causes_id', 'left')
@@ -227,7 +227,7 @@ public function get_general_invoice_data($f_date = null, $t_date = null)
{
// Fetch invoice data
$query = $this->db->table('invoice')
- ->select('invoice.*, customers.*, COUNT(invoiceitems.product) as item_count')
+ ->select('invoice.*, doner.*, COUNT(invoiceitems.product) as item_count')
->where('invoice.isactive', 1)
->where('invoice.invoice_type', 1)
->where('invoiceitems.isactive', 1);
@@ -238,7 +238,7 @@ public function get_general_invoice_data($f_date = null, $t_date = null)
->where('invoice.invoice_date <=', $t_date);
}
- $result = $query->join('customers', 'customers.doner_id = invoice.doner_id', 'left')
+ $result = $query->join('doner', 'doner.doner_id = invoice.doner_id', 'left')
->join('invoiceitems', 'invoiceitems.invoice_id = invoice.invoice_id', 'left')
->join('causes', 'causes.causes_id = invoiceitems.product', 'left')
->groupBy('invoice.invoice_id') // Assuming invoice_id is the primary key of the invoice table
@@ -253,7 +253,7 @@ public function get_mem_invoice_data($f_date = null, $t_date = null)
{
// Fetch invoice data
$query = $this->db->table('invoice')
- ->select('invoice.*, customers.*, COUNT(invoiceitems.product) as item_count')
+ ->select('invoice.*, doner.*, COUNT(invoiceitems.product) as item_count')
->where('invoice.isactive', 1)
->where('invoice.invoice_type', 2)
->where('invoiceitems.isactive', 1);
@@ -264,7 +264,7 @@ public function get_mem_invoice_data($f_date = null, $t_date = null)
->where('invoice.invoice_date <=', $t_date);
}
- $result = $query->join('customers', 'customers.doner_id = invoice.doner_id', 'left')
+ $result = $query->join('doner', 'doner.doner_id = invoice.doner_id', 'left')
->join('invoiceitems', 'invoiceitems.invoice_id = invoice.invoice_id', 'left')
->join('causes', 'causes.causes_id = invoiceitems.product', 'left')
->groupBy('invoice.invoice_id') // Assuming invoice_id is the primary key of the invoice table
diff --git a/app/Models/NotificationModel.php b/app/Models/NotificationModel.php
index 1c3c2ee..0d7be31 100644
--- a/app/Models/NotificationModel.php
+++ b/app/Models/NotificationModel.php
@@ -25,7 +25,7 @@ class NotificationModel extends Model
// $lastWeek = date('Y-m-d', strtotime('+7 days'));
// $date_format = date('Y-m-d', $date);
return $this->db->table('subscription as S' )
- ->join('customers as C', 'C.customer_id = S.customer_id', 'left')
+ ->join('doner as C', 'C.customer_id = S.customer_id', 'left')
->join('category as CM', 'CM.id = S.scheme_id', 'left')
->join('business as B', 'B.business_id = S.business_id', 'left')
->join('book_categories as BC', 'BC.category_id = S.scheme_id', 'left')
diff --git a/app/Models/SchemeModel.php b/app/Models/SchemeModel.php
deleted file mode 100644
index 91742a3..0000000
--- a/app/Models/SchemeModel.php
+++ /dev/null
@@ -1,170 +0,0 @@
-insert($data);
- }
-
-
- public function getSchemeNamesAndDurationsByBusiness($business_id)
-{
- $builder = $this->builder();
- $builder->select('books.book_id, books.title, books.price, books.duration, category.name as category_name');
- $builder->join('book_categories', 'book_categories.book_id = books.book_id', 'left');
- $builder->join('category', 'category.id = book_categories.category_id', 'left');
- $builder->where('books.business_id', $business_id);
- $builder->where('category.name', 'membership');
- $builder->where('books.isactive', 1);
-
- $query = $builder->get();
-
- $schemes = [];
-
- foreach ($query->getResult() as $row) {
- $schemes[$row->book_id] = [
- 'title' => $row->title,
- 'price' => $row->price,
- 'duration' => $row->duration,
- 'category_name' => $row->category_name,
- 'book_id'=>$row->book_id
- ];
- }
-
- return $schemes;
-}
-public function getBooksAndImagesByBookId($id)
-{
- $builder = $this->db->table('books');
- $builder->select('books.*, book_images.img_name, book_images.is_cover, book_images.type');
- $builder->join('book_images', 'book_images.book_id = books.book_id', 'left');
- $builder->where('books.book_id', $id);
-
- $query = $builder->get();
-
- return $query->getResultArray();
-}
-
-public function insertImage($imageData)
-{
- return $this->db->table('book_images')->insert($imageData);
-}
-
-
-
-
-// public function getSchemeDuration($schemeId)
-// {
-// $query = $this->select('duration')
-// ->where('scheme_id', $schemeId)
-// ->get();
-
-// if ($query->getNumRows() === 1) {
-// $row = $query->getRow();
-// return $row->duration;
-// } else {
-// return null;
-// }
-// }
-public function getSchemeNamesByBusiness($business_id)
-{
- $builder = $this->builder();
- $builder->select('scheme_id, scheme_name');
- $builder->where('business_id', $business_id);
-
- $query = $builder->get();
-
- $schemes = [];
-
- foreach ($query->getResult() as $row) {
- $schemes[$row->scheme_id] = $row->scheme_name;
- }
-
- return $schemes;
-}
-public function getSchemeNames()
-{
- $builder = $this->builder();
- $builder->select('scheme_id, scheme_name');
- $query = $builder->get();
-
- $schemes =[];
- foreach ($query->getResult() as $row) {
- $schemes[$row->scheme_id] = $row->scheme_name;
- }
-
- return $schemes;
- print_r($schemes);die();
-}
-
-public function getSchemeNameById($schemeId)
-{
- // Query the database to retrieve the scheme name by ID
- $builder = $this->db->table('schemes');
- $builder->select('scheme_name');
- $builder->where('scheme_id', $schemeId);
-
- $query = $builder->get();
-
- // Check if a record was found
- if ($query->getNumRows() > 0) {
- $row = $query->getRow();
- return $row->scheme_name;
- } else {
- return null; // Return null if no scheme with the given ID is found
- }
-}
-public function getAllSchemes()
- {
- return $this->findAll();
- }
- public function updateImage($schemeId, $imageData)
-{
- $builder = $this->db->table('book_images');
- $builder->set($imageData);
- $builder->where('book_id', $schemeId);
- $builder->update();
-}
-
-
-
- public function getData($table, $where = null, $whereIn = null)
- {
- $query = $this->db->table($table);
- if ($where) {
- $query->where($where);
- }
- if ($whereIn) {
- // $query->whereIn($column_name,$missingValues)
- $query->whereIn($whereIn[0], $whereIn[1]);
- }
- return $query->get()->getResult();
- }
-
- public function inactiveMissingDetails($table_name,$dataToUpdate,$where = null,$whereIn = null)
- {
- $this->db->table($table_name);
- $query = $this->db->table($table_name);
- if ($where) {
- $query->where($where);
- }
- if ($whereIn) {
- $query->whereIn($whereIn[0], $whereIn[1]);
- }
- return $query->update($dataToUpdate);
- }
-}
-
-
-
-
diff --git a/app/Models/SubscriptionModel.php b/app/Models/SubscriptionModel.php
deleted file mode 100644
index d6f3d0e..0000000
--- a/app/Models/SubscriptionModel.php
+++ /dev/null
@@ -1,154 +0,0 @@
-db->table('subscription');
- $builder->select('subscription.*, books.title, CONCAT(customers.first_name, " ", customers.last_name) as customer_name');
- $builder->join('books', 'books.book_id = subscription.scheme_id');
- $builder->join('customers', 'customers.customer_id = subscription.customer_id');
- $builder->where($where);
- return $builder->get()->getResultArray();
-}
-public function getCustomerNameBySchemeName($schemeName)
-{
- $builder = $this->db->table('subscription');
- $builder->select('customers.first_name, customers.last_name');
- $builder->select('customer_addresses.address_1, customer_addresses.address_2');
- $builder->join('customer_addresses', 'customer_addresses.customer_id = subscription.customer_id');
- $builder->join('customers', 'customers.customer_id = subscription.customer_id');
- $builder->join('schemes', 'schemes.scheme_id = subscription.scheme_id');
- $builder->where('schemes.scheme_name', $schemeName);
-
- $query = $builder->get();
-
- if ($query->getNumRows() > 0) {
- $row = $query->getRow();
- return $row->first_name . ' ' . $row->last_name;
- } else {
- return 'Customer not found'; // You can return a default value or handle the case where the customer is not found.
- }
-}
-
-public function getCustomerAddressesBySchemeName($schemeName)
-{
- $builder = $this->db->table('subscription');
- $builder->select('CONCAT(customers.first_name, " ", customers.last_name) as customer_name, customer_addresses.address_1, customer_addresses.address_2, customer_addresses.city, customer_addresses.state,customer_addresses.postal_code, customer_addresses.address_type,business.address,business.city,business.state,business.postal_code,business.country');
- $builder->join('customers', 'customers.customer_id = subscription.customer_id');
- $builder->join('customer_addresses', 'customer_addresses.customer_id = subscription.customer_id');
- $builder->join('business', 'business.business_id = subscription.business_id');
- $builder->join('books', 'books.book_id = subscription.scheme_id');
- $builder->where('books.title', $schemeName);
-
- $query = $builder->get();
-
- $addresses = [];
-
- if ($query->getNumRows() > 0) {
- foreach ($query->getResult() as $row) {
- $addressType = $row->address_type;
- $addresses[$addressType] = [
- 'customer_name' => $row->customer_name,
- 'address_1' => $row->address_1,
- 'address_2' =>$row->address_2,
- 'city' => $row->city,
- 'state' => $row->state,
- 'postal_code'=>$row->postal_code,
- ];
- }
- } else {
- $addresses = [
- 'billing' => [
- 'customer_name' => 'Customer not found',
- 'address_line' => 'Billing Address not found',
- 'city' => '',
- 'state' => '',
- ],
- 'shipping' => [
- 'customer_name' => 'Customer not found',
- 'address_line' => 'Shipping Address not found',
- 'city' => '',
- 'state' => '',
- ],
- ];
- }
-
- return $addresses;
-}
-public function getAllCustomerDetailsBySchemeName($schemeName)
-{
- $builder = $this->db->table('subscription');
- $builder->select('customers.customer_id, CONCAT(customers.first_name, " ", customers.last_name) as customer_name,customer_addresses.mobile_no, customer_addresses.address_1,customer_addresses.address_2, customer_addresses.city, customer_addresses.state, customer_addresses.postal_code,business.title,business.address,business.city,business.state,business.postal_code,books.title,from_subscription,to_subscription');
- $builder->join('customers', 'customers.customer_id = subscription.customer_id');
- $builder->join('customer_addresses', 'customer_addresses.customer_id = customers.customer_id');
- $builder->join('business', 'business.business_id = subscription.business_id');
- $builder->join('books', 'books.book_id = subscription.scheme_id');
- $builder->where('books.title', $schemeName);
- $builder->where('customer_addresses.address_type', 2); // Filter by address_type 2
- $builder->orderBy('customers.customer_id', 'ASC'); // Order by customer_id to group by customers
-
- // Fetch the query result
- $query = $builder->get();
-
- $customerDetails = [];
-
- if ($query->getNumRows() > 0) {
- $currentCustomerID = null;
- $shippingAddress = [];
-
- foreach ($query->getResultArray() as $row) {
- $customerID = $row['customer_id'];
-
- if ($currentCustomerID !== $customerID) {
- // New customer, add the previous customer's details (if any)
- if (!empty($shippingAddress)) {
- $customerDetails[] = $shippingAddress;
- }
-
- // Start a new customer's details
- $shippingAddress = [
- 'customer_name' => $row['customer_name'],
- 'address_1' => $row['address_1'],
- 'address_2' => $row['address_2'],
- 'mobile_no'=>$row['mobile_no'],
-
- 'city' => $row['city'],
- 'state' => $row['state'],
- 'postal_code' => $row['postal_code'],
- 'address' => $row['address'],
- 'city' => $row['city'],
- 'state' => $row['state'],
- 'postal_code' => $row['postal_code'],
- 'title' => $row['title'],
- 'to_subscription'=>$row['to_subscription'],
- 'title'=>$row['title'],
- ];
-
- $currentCustomerID = $customerID;
- }
- }
-
- // Add the last customer's details (if any)
- if (!empty($shippingAddress)) {
- $customerDetails[] = $shippingAddress;
- }
- }
-
- return $customerDetails;
-}
-
-}
-
-
-
diff --git a/app/Views/app_setting_form.php b/app/Views/app_setting_form.php
new file mode 100644
index 0000000..c9e79f2
--- /dev/null
+++ b/app/Views/app_setting_form.php
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getFlashdata('success')): ?>
+
= session()->getFlashdata('success') ?>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/invoice_pdf_template.php b/app/Views/invoice_pdf_template.php
index d1eb996..7ba2b09 100644
--- a/app/Views/invoice_pdf_template.php
+++ b/app/Views/invoice_pdf_template.php
@@ -1,90 +1,283 @@
-
+
- Report PDF
+
+
+
+
+ Donation Receipt
-
-
-

-
-
-
-
-
-
= $data->title ?>
-
= $data->address ?>
-
= $data->postal_code ?>
+
+
+
+
+
+
+
+
+
Payment Method
+
=$data->payment_mode?>
+
+
+
Donated Amount
+
Rs. =$data->amount?> /-
+
+
+
+
-
-
-
-
-
-
-
Receipt No: =$data->receipt_number?>
-
Donor Name: =$data->customer_name?>
-
Amount: =$data->amount?>
-
Contact Number: =$data->mobile_no?>
-
PAN No: =$data->pan_no?>
-
Donation Date: =$data->receipt_date?>
-
-
-
-
-
-
-
-
Email: contact@company.com
-
Phone: +9876543210
-
+
+
+
diff --git a/app/Views/invoice_pdf_template_old.php b/app/Views/invoice_pdf_template_old.php
new file mode 100644
index 0000000..4f623d6
--- /dev/null
+++ b/app/Views/invoice_pdf_template_old.php
@@ -0,0 +1,92 @@
+
+
+
+
Report PDF
+
+
+
+
+
+
.)
" height="50" width="50" >
+
+

+
+
+
+
+
+
= $data->title ?>
+
= $data->address ?>
+
= $data->postal_code ?>
+
+
+
+
+
+
+
+
+
Receipt No: =$data->receipt_number?>
+
Donor Name: =$data->customer_name?>
+
Amount: =$data->amount?>
+
Contact Number: =$data->mobile_no?>
+
PAN No: =$data->pan_no?>
+
Donation Date: =$data->receipt_date?>
+
+
+
+
+
+
+
+
Email: contact@company.com
+
Phone: +9876543210
+
+
+
+
+
diff --git a/app/Views/scheme_form.php b/app/Views/scheme_form.php
deleted file mode 100644
index cd8952a..0000000
--- a/app/Views/scheme_form.php
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/app/Views/scheme_list.php b/app/Views/scheme_list.php
deleted file mode 100644
index af86d43..0000000
--- a/app/Views/scheme_list.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
- getFlashdata('success') || session()->getFlashdata('error')) : ?>
- getFlashdata('success')) : ?>
-
- = session('success') ?>
-
-
-
- getFlashdata('error')) : ?>
-
- = session('error') ?>
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/Views/setting_form.php b/app/Views/setting_form.php
index 9d9ba00..1024f1a 100644
--- a/app/Views/setting_form.php
+++ b/app/Views/setting_form.php
@@ -1,15 +1,21 @@
-
+
+
@@ -27,76 +33,79 @@