From ae584f91aea02aa03121b44d878173f2e12fafef Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Tue, 12 Nov 2024 07:16:10 +0000 Subject: [PATCH] FIX_Tracker Issues fixes : ps --- app/Controllers/Invoice.php | 4 +- app/Controllers/Notifications.php | 9 ++- app/Views/address_pdf_landscape_template.php | 72 ++++++++++---------- app/Views/user_form.php | 1 + 4 files changed, 44 insertions(+), 42 deletions(-) diff --git a/app/Controllers/Invoice.php b/app/Controllers/Invoice.php index 2bfee999..03848ed8 100755 --- a/app/Controllers/Invoice.php +++ b/app/Controllers/Invoice.php @@ -631,7 +631,7 @@ class Invoice extends BaseController $lineitem_html .= '

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

'; } // print_r($title);die; - $records['subject'] = $invoice_serial_number . " - Approval Notification"; + $records['subject'] = $invoice_serial_number . " - Invoice Notification"; $records['description'] = " @@ -644,7 +644,7 @@ class Invoice extends BaseController

Company Logo

THANKS FOR YOUR ORDER!!

-

Order Number:#$invoice_serial_number

+

Invoice Number:#$invoice_serial_number

Total Amount:$total_amount

diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php index b1860ebe..b29a6e83 100755 --- a/app/Controllers/Notifications.php +++ b/app/Controllers/Notifications.php @@ -635,7 +635,8 @@ class Notifications extends BaseController $emailContent = str_replace("{SCHEME_NAME}", $schemename, $emailContent); } if (isset($expirydate)) { - $emailContent = str_replace("{EXPIRY_DATE}", $expirydate, $emailContent); + $expiryon = $expirydate ? date('d/m/Y', strtotime($expirydate)) : ''; + $emailContent = str_replace("{EXPIRY_DATE}", $expiryon, $emailContent); } if (isset($customerId)) { $emailContent = str_replace("{RENEWAL_LINK}", base_url() . 'subscription_renewal/' . $customerId, $emailContent); @@ -732,7 +733,8 @@ class Notifications extends BaseController $whatsappContent = str_replace("{SCHEME_NAME}", $schemename, $whatsappContent); } if (isset($expirydate)) { - $whatsappContent = str_replace("{EXPIRY_DATE}", $expirydate, $whatsappContent); + $expiryon = $expirydate ? date('d/m/Y', strtotime($expirydate)) : ''; + $whatsappContent = str_replace("{EXPIRY_DATE}", $expiryon, $whatsappContent); } if (isset($customerId)) { $whatsappContent = str_replace("{RENEWAL_LINK}", base_url() . 'subscription_renewal/' . $customerId, $whatsappContent); @@ -1020,7 +1022,8 @@ class Notifications extends BaseController $notificationContent = str_replace("{SCHEME_NAME}", $dataPointsArray["scheme_name"], $notificationContent); } if (isset($dataPointsArray["formatted_due_date"])) { - $notificationContent = str_replace("{EXPIRY_DATE}", $dataPointsArray["formatted_due_date"], $notificationContent); + $expiryon = $dataPointsArray["formatted_due_date"] ? date('d/m/Y', strtotime($dataPointsArray["formatted_due_date"])) : ''; + $notificationContent = str_replace("{EXPIRY_DATE}", $expiryon, $notificationContent); } if (isset($dataPointsArray["customer_id"])) { $notificationContent = str_replace("{RENEWAL_LINK}", base_url() . 'subscription_renewal/' . $dataPointsArray["customer_id"], $notificationContent); diff --git a/app/Views/address_pdf_landscape_template.php b/app/Views/address_pdf_landscape_template.php index 6fc80810..f0739f27 100755 --- a/app/Views/address_pdf_landscape_template.php +++ b/app/Views/address_pdf_landscape_template.php @@ -23,19 +23,14 @@ .from-address { text-align: left; float: left; - width: 60%; - } - .order-number { - text-align: right; - float: right; - width: 40%; + width: 100%; } .to-address { text-align: left; float: right; - width: 60%; + width: 40%; clear: both; - margin-top: 20px; /* Adjust for spacing in landscape */ + /* margin-top: 20px; Adjust for spacing in landscape */ } @@ -43,35 +38,38 @@
- -
- From :
- company_name; ?>
- company_address . ","; ?>
- company_city; ?> - company_postal_code . ","; ?>
- company_state . "."; ?>
- company_mobile_no; ?> -
- -
- Order : invoice_number; ?> -
- -
- To :
- customer_name ?>
- customer_ship_address && ($value->saddr_id !== null || $value->saddr_id !== '')){ ?> - customer_ship_address ? $value->customer_ship_address . " ,
" : "" ?> - customer_ship_city ? $value->customer_ship_city . " " : "" ?> - customer_ship_postal_code ? " - " . $value->customer_ship_postal_code . "
" : ""; ?> - customer_ship_state ? $value->customer_ship_state . ".
" : "" ?> - saddr_id === null || $value->saddr_id === '') { - echo $value->shipping_address ? $value->shipping_address.'
' : ''; - } ?> - mobile_no ? "Mobile : " . $value->mobile_no . " ." : "" ?> -
-
- + + + + + +
From : + invoice_number == $value->wp_api_order_id ? "Order Number :" : "Invoice Number :"; ?> + invoice_number; ?> +
+ +
+ company_name; ?>
+ company_address . ","; ?>
+ company_city; ?> - company_postal_code . ","; ?>
+ company_state . "."; ?>
+ company_mobile_no; ?> +
+ +
+ To :
+ customer_name ?>
+ customer_ship_address && ($value->saddr_id !== null || $value->saddr_id !== '')){ ?> + customer_ship_address ? $value->customer_ship_address . " ,
" : "" ?> + customer_ship_city ? $value->customer_ship_city . " " : "" ?> + customer_ship_postal_code ? " - " . $value->customer_ship_postal_code . "
" : ""; ?> + customer_ship_state ? $value->customer_ship_state . ".
" : "" ?> + saddr_id === null || $value->saddr_id === '') { + echo $value->shipping_address ? $value->shipping_address.'
' : ''; + } ?> + mobile_no ? "Mobile : " . $value->mobile_no . " ." : "" ?> +
+
diff --git a/app/Views/user_form.php b/app/Views/user_form.php index 0110e180..b974b2b4 100755 --- a/app/Views/user_form.php +++ b/app/Views/user_form.php @@ -237,6 +237,7 @@ }