diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 04000705..75a760cf 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -51,6 +51,8 @@ $routes->get('dashboard/', 'Home::index'); $routes->get("user_list/", "Users::index"); $routes->get("user_page/(:any)", "Users::user_page/$1"); $routes->post("insert_users", "Users::insert_users"); +$routes->get('users/fetch_event_names', 'Users::fetch_event_names'); + $routes->get("delete_user/(:any)", "Users::delete_user/$1"); # Books Routes @@ -114,6 +116,9 @@ $routes->post("insert_invoice_number_format", "Event::insert_invoice_number_form $routes->get("invoice_list/", "Invoice::index"); $routes->get("new_book_invoice/(:any)", "Invoice::new_book_invoice/$1"); $routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1"); +// $routes->get("download_invoice_pdf/(:num)",'Invoice::download_invoice_pdf/$1'); +$routes->get("download_invoice_pdf/(:any)", 'Invoice::download_invoice_pdf/$1'); + $routes->post("get_customer_billing_details", "Invoice::get_customer_billing_details"); @@ -128,6 +133,9 @@ $routes->get('print_address/(:num)', 'Invoice::print_address/$1'); $routes->match(['get','post'],'/general_inv_rp','Invoice::general_inv_rp'); $routes->match(['get','post'],'/mem_inv_rp','Invoice::general_membership_inv_rp'); $routes->match(['get','post'],'/itemwise_report','Invoice::itemwise_report'); +$routes->match(['get','post'],'/expired_customer_report','Invoice::expired_customer_report'); +$routes->match(['get','post'],'/book_publishwise_Report','Invoice::book_publishwise_Report'); + # Notifications Routes diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index 83cddded..1806c7d4 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -65,7 +65,8 @@ abstract class BaseController extends Controller echo "This is a command-line request."; // echo $requestedRoute; } else { - if ($requestedRoute !== '/login' && $requestedRoute !== '/authenticate' && $uri->getSegment(1) != 'getExpCustomerDetail') { + + if ($requestedRoute !== '/login' && $requestedRoute !== '/authenticate' && $uri->getSegment(1) != 'getExpCustomerDetail'&& $uri->getSegment(1) != 'download_invoice_pdf') { $this->authData = $this->session_log(); } } diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index 68df5ee3..37cb69e5 100644 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -541,6 +541,8 @@ class Invoice extends BaseController $recipient_mobile = $rec['customer_mobile']; $subtotal = $rec['subtotal']; $tax = $rec['tax']; + $invoiceDate=$rec['invoice_date']; + $total_amount = $rec['total_amount']; $payment_method = $rec['payment_method']; $business_name= $rec['business_name']; @@ -549,7 +551,8 @@ class Invoice extends BaseController $business_state= $rec['business_state']; $business_postal_code= $rec['business_postal_code']; $business_email= $rec['business_email']; - $business_mobile_no= $rec['business_mobile_no']; + $business_mobile_no= $rec['business_mobile_no']; + } $records['invoice_order_number'] = $reference_number; $records['invoice_serial_number'] = $invoice_serial_number; @@ -568,24 +571,49 @@ class Invoice extends BaseController $records['template_name'] = 'approve_template'; $records['item'] = $details['item']; + // print_r($records['item']);die; + $lineitem_html=""; + foreach ($records['item'] as $inv) { + // print_r($item->title);die; + $lineitem_html.='

'.$inv->title. ' x ' .$inv->quantity .' => ' .$inv->subtotal.'

'; + + + } + // print_r($title);die; $records['subject'] = $invoice_serial_number . " - Approval Notification"; - $records['description'] = "VBP Approve Information -

Dear $recipient_name,

-

   We are pleased to inform you that your Invoice has been approved.

-

Details:

-
-

Best regards,

-