For Notification changes : ps

This commit is contained in:
VE10-Sanjeev 2023-10-03 10:12:18 +05:30
parent 99f2adafd1
commit 09ed059e3d
9 changed files with 407 additions and 63 deletions

View File

@ -71,6 +71,9 @@ abstract class BaseController extends Controller
$details = $auth_model->getheringDetailsForHeader($session_uid);
$data['company_name'] = $details[0]['site_name'];
$data['company_short_name'] = $details[0]['site_title'];
$data['company_address'] = $details[0]['company_address'];
$data['company_mobile_no'] = $details[0]['company_mobile_no'];
$data['company_email'] = $details[0]['company_email'];
$data['loggedin_person'] = $session_uname;
$data['loggedin_person_id'] = $session_uid;
$data['loggedin_person_role'] = $details[0]['role'];
@ -79,7 +82,9 @@ abstract class BaseController extends Controller
$data['company_logo_small'] = !empty($details[0]['company_logo_small']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_small']) ? base_url("public/uploads/" . $details[0]['company_logo_small']) : base_url("public/uploads/default_logo.png");
$data['company_logo_large'] = !empty($details[0]['company_logo_large']) && file_exists(FCPATH."public/uploads/".$details[0]['company_logo_large']) ? base_url("public/uploads/" . $details[0]['company_logo_large']) : base_url("public/uploads/default.png");
$data['browser_title'] = $data['company_name'] . ' | ' . $data['company_short_name'] . ' ' . $data['page_name'];
$data['heading'] = $data['page_name'] == "Dashboard" ? 'Welcome to ' . $data['company_name'] : "";
$data['heading'] = $data['page_name'] === "Dashboard" ? 'Welcome to ' . $data['company_name'] : "";
$data['loggedin_person'] = $session_uname;
echo view('template/header.php', $data);
echo view('template/topbar.php', $data);
echo view($viewpage, $data);

View File

@ -29,7 +29,7 @@ class Invoice extends BaseController
$model = new InvoiceModel();
$data['page_name'] = 'Invoice Details';
$data['invoice'] = $model->getJoinedData($where, ['status']);
$data['invoice'] = $model->getJoinedData($where);
$this->logger->info("Invoice: Listing Count ." . count($data['invoice']));
$this->render_page('invoice_list', $data);
} else {
@ -315,7 +315,6 @@ class Invoice extends BaseController
$where = ['isactive' => 1, 'status' => 'Approved', 'invoice_id' => (int)$id];
$details = $model->where($where)->findAll();
if (!empty($details)) { // change
// print_r($details);die;
$data = ['status' => 'Approved', 'updated_by' => get_logged_user_id()];
if ($model->update($id, $data)) {
$this->approve_notifications((int)$id);
@ -341,7 +340,8 @@ class Invoice extends BaseController
{
$model = new InvoiceModel();
$where = ['I.business_id' => (int)get_business_id(), 'I.invoice_id' => $invoice_id, 'I.isactive' => 1];
$details = $model->getJoinedData($where);
$details = $model->getDetailForApproveNotifications($where);
$reference_number = "";
$invoice_serial_number = "";
$recipient_name = "";
@ -349,26 +349,46 @@ class Invoice extends BaseController
$approved_by = "";
$recipient_email = "";
$recipient_mobile = "";
if (isset($details) && gettype($details) === 'object') {
$details = [$details];
$this->logger->info("Approve : Request data type = " . gettype($details));
$subtotal = "";
$tax = "";
$total_amount = "";
$payment_method = "";
if (isset($details)) {
$this->logger->info("Invoice: approve notification Request data type = ".gettype($details));
}
helper('notification');
$notification = new NotificationHelper();
foreach ($details as $rec) {
$reference_number = $rec->order_number;
$invoice_serial_number = $rec->invoice_number;
$recipient_name = $rec->customer_name;
$approval_date = $rec->updated_on;
$approved_by = $rec->updated_by_name;
$recipient_email = $rec->customer_email;
$recipient_mobile = $rec->customer_mobile;
$records['recipient'] = $rec->customer_email;
$records['mobile'] = $rec->customer_mobile;
foreach ($details['invoice'] as $rec) {
$reference_number = $rec['order_number'];
$invoice_serial_number = $rec['invoice_number'];
$recipient_name = $rec['customer_name'];
$approval_date = $rec['updated_on'];
$approved_by = $rec['updated_by_name'];
$recipient_email = $rec['customer_email'];
$recipient_mobile = $rec['customer_mobile'];
$subtotal = $rec['subtotal'];
$tax = $rec['tax'];
$total_amount = $rec['total_amount'];
$payment_method = $rec['payment_method'];
}
$records['invoice_order_number'] = $reference_number;
$records['invoice_serial_number'] = $invoice_serial_number;
$records['recipient_name'] = $recipient_name;
$records['recipient_email'] = $recipient_email ? $recipient_email : "sanjeev.p@venbainfotech.com";
$records['subtotal'] = $subtotal;
$records['tax'] = $tax;
$records['total_amount'] = $total_amount;
$records['payment_method'] = $payment_method;
$records['favicon'] = base_url("public/uploads/default.ico");
$records['browser_title'] = "bbb-bp | Approve Template";
$records['page_name'] = 'Approve Template';
// view('approve_template',$records);
// $this->logger->info("Approve : Request data = ".json_encode($records));
view('approve_template',$records);
$records['template_name'] = 'approve_template';
$records['subject'] = $invoice_serial_number . " - Approval Notification";
$records['description'] = "<html><head><title>VBP Approve Information</title></head><body>
<p>Dear $recipient_name,</p>
<p> &ensp;&ensp; We are pleased to inform you that your Invoice has been approved.</p>
@ -392,17 +412,14 @@ class Invoice extends BaseController
$params->message = $template;
$params->instance_id = WAAI_INSTANCE;
$params->access_token = WAAI_TOKEN;
$email_result = $notification->sendEmail($records);
$this->logger->info("Invoice: approve notification = " . json_encode($email_result));
$this->logger->info("Invoice: approve notification Email Request data = ".json_encode($records));
$email_result = $notification->sendEmail($details);
$this->logger->info("Invoice: approve notification Email Response = " . json_encode($email_result));
$this->logger->info("Invoice: approve notification Whatsapp Request data = ".json_encode($params));
$whatsapp_result = $notification->sendWhatsAppMessage(SEND_WAAI_URL, "POST", $params);
$this->logger->info("Invoice: approve notification = " . json_encode($whatsapp_result));
$this->logger->info("Invoice: approve notification Whatsapp Response = " . json_encode($whatsapp_result));
}
## To Generate Invoice PDF based on invoice ID
public function generate_invoice_pdf($id)
{

View File

@ -15,6 +15,7 @@ class Notifications extends BaseController
$request = \Config\Services::request();
if ($request->is('post')) {
$records = $request->getVar();
$records['template_name'] = "";
helper('notification');
$notification = new NotificationHelper();
$data = $notification->sendEmail($records);

View File

@ -21,14 +21,24 @@ class NotificationHelper
$cc = isset($records['carboncopy']) ? $records['carboncopy'] : '';
$bcc = isset($records['blindcarboncopy']) ? $records['blindcarboncopy'] : '';
try {
$this->email->setTo($records['recipient']);
$this->email->setTo($records['recipient_email']);
$this->logger->info('Helper : Email recipient = '.$records['recipient_email']);
$this->email->setFrom('no-reply@tripapprovaltool.com', isset($records['company'])?$records['company']:"VBP");
$this->email->setSubject($records['subject']);
$this->email->setMessage($records['description']);
$this->logger->info('Helper : Email subject = '.$records['subject']);
if($records['template_name'] != ""){
$this->logger->info('Helper : Email Template = '.$records['template_name']);
$emailContent = view($records['template_name'],$records);
$this->email->setMessage($emailContent);
}else{
$this->logger->info('Helper : Email Dynamic Template');
$this->email->setMessage($records['description']);
}
if (!empty($cc)) {
$ccRecipients = explode(',', $cc);
$this->logger->info('Helper : Email CC recipient = '.$ccRecipients);
foreach ($ccRecipients as $ccRecipient) {
$this->email->setCC(trim($ccRecipient));
}
@ -36,6 +46,7 @@ class NotificationHelper
if (!empty($bcc)) {
$bccRecipients = explode(',', $bcc);
$this->logger->info('Helper : Email BCC recipient = '.$bccRecipients);
foreach ($bccRecipients as $bccRecipient) {
$this->email->setBCC(trim($bccRecipient));
}
@ -43,13 +54,13 @@ class NotificationHelper
if ($this->email->send()) {
$message['success'] = 'Email sent successfully';
$this->logger->info('Email sent successfully');
$this->logger->info('Helper : Email = sent successfully');
} else {
throw new \Exception('Email sending failed.');
}
} catch (\Exception $e) {
$this->logger->error('Email Error: ' . $e->getMessage());
$message['error'] = 'Email Error : ' . $e->getMessage();
$message['error'] = 'Helper : Email Exception Occur : ' . $e->getMessage();
}
return $message;
}

View File

@ -10,7 +10,7 @@ class AuthenticationModel extends Model
public function getheringDetailsForHeader($user_id)
{
$builder = $this->db->table('users');
$builder->select('user_id,user_name,users.email,users.first_name,users.last_name,users.password,users.mobile_no,date_of_birth,users.address,gender,profile_picture,users.city,users.state,users.postal_code,users.country,role,setting_id,site_name,site_title,favicon,logo,terms_service,footer_about,admin_email,mobile,copyright,pagination_limit,site_info,about_info,mail_protocol,mail_title,mail_host,mail_port,mail_encryption,mail_username,mail_password,currency,settings.country,settings.logo as company_logo_large,business.business_logo as company_logo_small');
$builder->select('users.user_id,users.user_name,users.business_id,users.profile_picture,users.role,settings.site_name,settings.site_title,settings.favicon,settings.logo as company_logo_large,business.business_logo as company_logo_small,business.email as company_email,business.address as company_address,business.mobile_no as company_mobile_no,business.title');
$builder->join('settings', 'settings.business_id = users.business_id', 'left');
$builder->join('business', 'business.business_id = users.business_id', 'left');
$builder->where('user_id', $user_id);

View File

@ -53,14 +53,32 @@ public function updateData($table, $data, $where)
->join('business as B', 'B.business_id = I.business_id', 'left')
->join('users as U1', 'U1.user_id = I.created_by', 'left')
->join('users as U2', 'U2.user_id = I.updated_by', 'left')
->select('I.invoice_id, I.invoice_number, I.customer_id,concat(C.first_name," ",C.last_name) as customer_name , I.invoice_date, I.due_date, I.subtotal, I.tax, I.discount, I.total_amount,I.status, I.payment_status, I.order_number, I.payment_method, I.event_id,E.event_name, I.business_id,B.title as business_name, I.created_on, I.created_by,concat(U1.first_name," ",U1.last_name) as created_by_name, I.updated_on, I.updated_by,concat(U2.first_name," ",U2.last_name) as updated_by_name, I.isactive,C.email as customer_email,C.mobile_no as customer_mobile')
->select('I.invoice_id, I.invoice_number, I.customer_id,concat(C.first_name," ",C.last_name) as customer_name , I.invoice_date, I.due_date, I.subtotal, I.tax, I.discount, I.total_amount,I.status, I.payment_status, I.order_number, I.payment_method, I.event_id,E.event_name, I.business_id,B.title as business_name, I.created_on, I.created_by,concat(U1.first_name," ",U1.last_name) as created_by_name, I.updated_on, I.updated_by,concat(U2.first_name," ",U2.last_name) as updated_by_name, I.isactive,C.email as customer_email,C.mobile_no as customer_mobile,I.shipping_address_id,I.shipping_address,I.billing_address_id,I.billing_address')
->where($where)
->get()
->getResult();
->getResultArray();
// I.shipping_address_id, I.billing_address_id,
}
public function getDetailForApproveNotifications($where)
{
$result = $this->getJoinedData($where);
if(!empty($result)){
foreach ($result as $object) {
$invoiceId = $object['invoice_id'];
$items = $this->getInvoiceItems($invoiceId);
}
}else{
$items = [];
}
$data['invoice'] = $result;
$data['item'] = $items;
return $data;
}
public function getData($table, $where = null)
{
$query = $this->db->table($table);
@ -106,11 +124,11 @@ public function updateData($table, $data, $where)
->getResult();
}
// this function Also Used For Approve Notification.
public function getInvoiceItems($id)
{
return $this->db->table('invoiceitems')
->where('invoice_id', $id)
->where(['invoice_id'=>$id,'invoiceitems.isactive'=>1])
->join('books as B','B.book_id=invoiceitems.product','left')
->select('invoiceitems.*,B.title')
->get()

View File

@ -0,0 +1,310 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?= $browser_title ?></title>
<meta name="description" content="The small framework with powerful features">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="<?= $favicon; ?>">
<!-- STYLES -->
<style {csp-style-nonce}>
* {
transition: background-color 300ms ease, color 300ms ease;
}
*:focus {
background-color: rgba(221, 72, 20, .2);
outline: none;
}
html,
body {
/* background-color: rgba(247, 248, 249, 1); */
background-color: rgb(189 194 199);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Helvetica Neue, Roboto;
font-size: 15px;
width: 600px;
margin: 0 auto;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
header {
padding: .4rem 0rem 0rem;
}
.menulogo {
padding: 0rem 2rem;
}
.menucontent {
padding: 0rem 2rem;
text-align: center;
}
section {
padding: 0rem 2rem;
}
section a {
color: rgba(221, 72, 20, 1);
}
.further {
padding: 0rem 2rem;
font-family: Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
background-color: rgb(255, 255, 255);
}
footer {
padding: 0rem 2rem;
text-align: center;
}
footer .copyrights {
background-color: rgba(62, 62, 62, 1);
color: rgba(200, 200, 200, 1);
padding: 25px 35px;
}
.row {
display: flex;
justify-content: space-between;
text-align: left;
}
.column {
flex: 1;
text-align: left;
}
.space {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}
.row-1 {
display: flex;
align-items: center;
margin: 12px 0px;
}
</style>
</head>
<body>
<!-- HEADER: MENULOGO + MENUCONTENT SECTION -->
<header>
<div class="menulogo">
<div style="padding : 15px 35px;
background-color : rgb(255,255,255);
border-radius : 5px 5px 0px 0px;
border-width : 2px 0px;
border-style : solid hidden;
border-top-color : rgb(104,104,104); border-right-color : initial;
border-bottom-color : rgb(104,104,104); border-left-color : initial;" align="center">
<img src="https://vijayabharathambooks.com/wp-content/uploads/2021/09/vijaya-bharatham-logo-8pt.png"><br>
</div>
</div>
<div class="menucontent">
<div style="padding : 15px 35px; background-color : rgb(249,249,249); ">
<div align="center">
<h2><span>Thanks for your Order</span></h2>
<div>
<p style="padding : 35px 0px 0px; ">
<span style="font-size : 24px; ">Order <?= $invoice_serial_number.'('.$invoice_order_number.')'; ?>.</span><br>
</p>
<p style="padding : 10px 0px 0px; ">
<span style="font-size : 24px; "> Hi <?= $recipient_name; ?>, Thank you for your purchase.</span><br>
</p>
<p style="padding : 10px 0px 0px; ">
<span style="font-size : 24px; ">We are processing your order.</span><br>
</p>
<div style="width : 204px;">
<a href="https://vijayabharathambooks.com" style="display : block; text-decoration : none; background-color : rgb(244,105,46);
line-height : 44px; min-height : 44px; color : rgb(238,238,238); " target="_blank">
<span style="color : rgb(238, 238, 238); ">VIEW YOUR ORDER</span><br>
</a>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- CONTENT -->
<section>
<div style="padding : 20px 35px; background-color : rgb(255,255,255); ">
<?php if (!empty($item)) {
foreach ($item as $ii) { ?>
<div class="row-1">
<div style="flex:0; vertical-align: middle; display: inline-block;">
<a href="https://vijayabharathambooks.com/books/pasumpon-thevar-potriya-rss/" target="_blank"><img id="1695982823501100004_imgsrc_url_1" width="150" src="https://vijayabharathambooks.com/wp-content/uploads/2023/01/front-1-300x450.jpg"></a><br>
</div>
<div class="column">
<div style="padding-left:15px;">
<a href="https://vijayabharathambooks.com/books/pasumpon-thevar-potriya-rss/" target="_blank"><?= $ii->title; ?><small> (#VB-65)</small></a><br>
<p style="text-align:left;">
<span style="color : rgb(60, 67, 74); "><span style=" font-weight : 400; line-height : 18.2px; ">x <?= $ii->quantity; ?></span></span>
<span style="color : rgb(60, 67, 74); float:right; "><span style="text-align : right; white-space : nowrap; font-weight : 400; line-height : 18.2px; ">&nbsp;<?= $ii->unit_price; ?></span></span>
</p>
</div>
</div>
</div>
<?php }}else{?>
<div class="row-1">
<div style="flex:0; vertical-align: middle; display: inline-block;">
<a href="https://vijayabharathambooks.com/books/pasumpon-thevar-potriya-rss/" target="_blank"><img id="1695982823501100004_imgsrc_url_1" width="150" src="https://vijayabharathambooks.com/wp-content/uploads/2023/01/front-1-300x450.jpg"></a><br>
</div>
<div class="column">
<div style="padding-left:15px;">
<a href="https://vijayabharathambooks.com/books/pasumpon-thevar-potriya-rss/" target="_blank">பசும்பொன் தேவர் போற்றிய ஆர்.எஸ்.எஸ்<small> (#VB-65)</small></a><br>
<p style="text-align:left;">
<span style="color : rgb(60, 67, 74); "><span style=" font-weight : 400; line-height : 18.2px; ">x 1</span></span>
<span style="color : rgb(60, 67, 74); float:right; "><span style="text-align : right; white-space : nowrap; font-weight : 400; line-height : 18.2px; ">&nbsp;125</span></span>
</p>
</div>
</div>
</div>
<div class="row-1">
<div style="flex:0; vertical-align: middle; display: inline-block;">
<a href="https://vijayabharathambooks.com/books/pasumpon-thevar-potriya-rss/" target="_blank"><img id="1695982823501100004_imgsrc_url_1" width="150" src="https://vijayabharathambooks.com/wp-content/uploads/2023/01/front-1-300x450.jpg"></a><br>
</div>
<div class="column">
<div style="padding-left:15px;">
<a href="https://vijayabharathambooks.com/books/pasumpon-thevar-potriya-rss/" target="_blank">பசும்பொன் தேவர் போற்றிய ஆர்.எஸ்.எஸ்<small> (#VB-65)</small></a><br>
<p style="text-align:left;">
<span style="color : rgb(60, 67, 74); "><span style=" font-weight : 400; line-height : 18.2px; ">x 1</span></span>
<span style="color : rgb(60, 67, 74); float:right; "><span style="text-align : right; white-space : nowrap; font-weight : 400; line-height : 18.2px; ">&nbsp;125</span></span></p>
</div>
</div>
</div>
<?php } ?>
</div>
<div style="padding : 15px 35px; background-color : rgb(249,249,249); " width="100%" align="center">
<div class="row">
<div class="column">
<div style=" width : 265px; line-height : 30px; ">
<p><span style="font-size : 20px; ">Payment Method</span><br>
</p>
</div>
<div style=" width : 265px; line-height : 22px; ">
<p>Paytm Payment Gateway<br> </p>
</div>
<div style=" width : 265px; line-height : 22px; ">
<p><span style="font-size : 20px; ">Shipment Method</span><br>
</p>
</div>
<div style=" width : 265px; line-height : 22px; ">
<p>Flexible Shipping<br> </p>
</div>
</div>
<div class="column">
<div style=" color : rgb(68,68,68); line-height : 24px; ">
<div style="padding : 0px; border : 0px hidden; text-align : left; ">
<p>Subtotal<br></p>
</div>
<div style="padding : 0px; border : 0px hidden; text-align : left; ">
<p>Shipping<br></p>
</div>
</div>
<div style="font-size : 20px; font-weight : 400; color : rgb(68,68,68); line-height : 30px;">
<div style="padding : 0px; border : 0px hidden; text-align : left; ">
<p style="font-weight : 400;">Total<br></p>
</div>
</div>
</div>
<div class="column">
<div style=" color : rgb(68,68,68); line-height : 24px; ">
<div style="padding : 0px; border : 0px hidden; text-align : right; ">
<p><span style="font-weight : 300;"><span></span>&nbsp;<?= $subtotal; ?></span><br></p>
</div>
<div style="padding : 0px; border : 0px hidden; text-align : right; ">
<p><span style=" font-weight : 300;"><span></span>&nbsp;<?= $tax; ?></span><br></p>
</div>
</div>
<div style="font-size : 20px; font-weight : 400; color : rgb(68,68,68); line-height : 30px;">
<div style="padding : 0px; border : 0px hidden; text-align : right;">
<p><span style="font-weight : 400;"><span></span>&nbsp;<?= $total_amount; ?></span><br></p>
<!-- float:right; -->
</div>
</div>
</div>
</div>
<div style="text-align : left;">
<h3>Note</h3>
<p> A publisher manages the design, editing, and production process with the help of proofreaders, printers, and editors. Publishers make schedules for every stage of the process and work backward from the planned date for publication. They distribute promotional catalogs to libraries and booksellers. </p><br>
</div>
</div>
</section>
<section>
<div class="further">
<div class="row">
<div class="column">
<div> <!-- padding : 25px 0px 0px; -->
<!-- <h3><span style="font-weight: normal;">Billing Address</span></h3> -->
<h3>Billing Address</h3>
</div>
<div style=" font-weight : 300; color : rgb(68,68,68); line-height : 22px; padding : 5px 0px; background-image : none; background-color : transparent; ">
<p>
<span>ARAVIND S<br></span>
<span>22/2, SriKrishna Apartments<br> </span>
<span>1st Street, Subramania Nagar, Kodambakkam<br> </span>
<span>CHENNAI 600024<br></span>
<span>Tamil Nadu<br></span>
<span><a href="tel:+919445062922" style="color : rgb(68,68,68); font-weight : 300; " target="_blank">+919445062922</a><br></span>
<span><a href="mailto:arasubu@gmail.com" style="color : rgb(68,68,68); font-weight : 300; " target="_blank">arasubu@gmail.com</a><br></span>
</p>
</div>
</div>
<div class="column">
<div>
<!-- <h3><span style="font-weight: normal;">Shipping Address</span></h3> -->
<h3>Shipping Address</h3>
</div>
<div style=" font-weight : 300; color : rgb(68,68,68); line-height : 22px; padding : 5px 0px; background-image : none; background-color : transparent; ">
<p>
<span>ARAVIND S<br></span>
<span>22/2, SriKrishna Apartments<br> </span>
<span>1st Street, Subramania Nagar, Kodambakkam<br> </span>
<span>CHENNAI 600024<br></span>
<span>Tamil Nadu<br></span>
<span><a href="tel:+919445062922" style="color : rgb(68,68,68); font-weight : 300; " target="_blank">+919445062922</a><br></span>
<span><a href="mailto:arasubu@gmail.com" style="color : rgb(68,68,68); font-weight : 300; " target="_blank">arasubu@gmail.com</a><br></span>
</p>
</div>
</div>
</div>
</div>
</section>
<!-- FOOTER: DEBUG INFO + COPYRIGHTS -->
<footer>
<div class="copyrights">
<p class="space"><span style="font-size : 20px; line-height : 22px; ">Get in Touch<br></span></p>
<p class="space" style="text-align : center; line-height : 22px; padding: 20px 0px;">
<span style="color : rgb(245, 245, 245); ">
<span style="font-size : 12px; ">For any questions, please send an email to&nbsp;</span>
</span>
<span style="color : rgb(255, 255, 255); ">
<a style="font-size : 12px; color : rgb(255,255,255); " href="mailto:contact@vijayabharathambooks.com" target="_blank">contact@vijayabharathambooks.com</a>
</span><br>
</p>
<div style=" line-height : 22px; background-image : none; background-color : transparent; border-radius : 0px; border-width : 0px; border-style : hidden; ">
<p class="space" style="text-align : center; "><span style="font-size : 12px; "><a style="color : rgb(245,245,245); " href="https://vijayabharathambooks.com/privacy-policy/" target="_blank">Privacy Policy</a><span style="color : rgb(245, 245, 245); ">&nbsp; |&nbsp;&nbsp;</span><a style="color : rgb(245,245,245); " href="https://vijayabharathambooks.com/terms-conditions/" target="_blank">Terms &amp; Conditions</a></span><br>
</p>
</div>
</div>
</footer>
<br>
</body>
</html>

View File

@ -47,32 +47,14 @@
<tbody>
<?php foreach ($invoice as $row): ?>
<tr>
<td><?php echo $row->invoice_number;?></td>
<td><?php echo $row->invoice_date;?></td>
<td><?php echo $row->customer_name;?></td>
<td><?php echo $row->status;?></td>
<td style align="center"><a href="<?= "approve_invoice/" . $row->invoice_id; ?>" class="approve-button"><i class="ri-checkbox-circle-fill"></i></a>
</td>
<td>
<a href="<?= "new_invoice/" . $row->invoice_id; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
</td>
<td>
<a href="<?= base_url("generate_invoice_pdf/{$row->invoice_id}") ?>" class="download-pdf-button"><i class="ri-file-download-line"></i></a>
</td>
<td>
<a href="<?= base_url("print_address/{$row->invoice_id}") ?>" class="print-address-button"><i class="ri-printer-line"></i></a>
</td>
<td><?= $row['invoice_number']; ?></td>
<td><?= $row['invoice_date']; ?></td>
<td><?= $row['customer_name']; ?></td>
<td><?= $row['status']; ?></td>
<td style align="center"><a href="<?= "approve_invoice/" . $row['invoice_id']; ?>" class="approve-button"><i class="ri-checkbox-circle-fill"></i></a></td>
<td><a href="<?= "new_invoice/" . $row['invoice_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a></td>
<td><a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button"><i class="ri-file-download-line"></i></a></td>
<td><a href="<?= base_url("print_address/{$row['invoice_id']}") ?>" class="print-address-button"><i class="ri-printer-line"></i></a></td>
</tr>
<?php endforeach; ?>

View File

@ -463,7 +463,7 @@
<div class="row">
<div class="col-12">
<div class="page-title-box">
<h4 class="page-title"><?echo $heading; ?></h4>
<h4 class="page-title"><?= $heading;?></h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);"><?= $company_name; ?></a></li>