From 3fe9111824a6defdc1e136c7ac4849c061b93fd9 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum
Date: Wed, 16 Aug 2023 08:30:05 +0700
Subject: [PATCH] Bring back invoice note
---
system/autoload/Package.php | 2 ++
system/uploads/notifications.default.json | 4 ++--
ui/ui/app-notifications.tpl | 6 ++++--
ui/ui/app-settings.tpl | 18 ++++++++++++++++++
ui/ui/invoice-print.tpl | 3 ++-
ui/ui/invoice.tpl | 3 ++-
6 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/system/autoload/Package.php b/system/autoload/Package.php
index 26e1a5cc..87c20744 100644
--- a/system/autoload/Package.php
+++ b/system/autoload/Package.php
@@ -62,6 +62,7 @@ class Package
$textInvoice = str_replace('[[plan_price]]', $_c['currency_code'] . " " . number_format($p['price'], 2, $_c['dec_point'], $_c['thousands_sep']), $textInvoice);
$textInvoice = str_replace('[[user_name]]', $c['username'], $textInvoice);
$textInvoice = str_replace('[[user_password]]', $c['password'], $textInvoice);
+ $textInvoice = str_replace('[[footer]]', $_c['note'], $textInvoice);
if ($_c['user_notification_payment'] == 'sms') {
Message::sendSMS($c['phonenumber'], $textInvoice);
@@ -255,6 +256,7 @@ class Package
$textInvoice = str_replace('[[user_name]]', $in['username'], $textInvoice);
$textInvoice = str_replace('[[user_password]]', $c['password'], $textInvoice);
$textInvoice = str_replace('[[expired_date]]', date($_c['date_format'], strtotime($in['expiration'])) . " " . $in['time'], $textInvoice);
+ $textInvoice = str_replace('[[footer]]', $_c['note'], $textInvoice);
if ($_c['user_notification_payment'] == 'sms') {
Message::sendSMS($c['phonenumber'], $textInvoice);
diff --git a/system/uploads/notifications.default.json b/system/uploads/notifications.default.json
index aff56897..21e9c1cc 100644
--- a/system/uploads/notifications.default.json
+++ b/system/uploads/notifications.default.json
@@ -3,6 +3,6 @@
"reminder_7_day": "Hello *[[name]]*, \r\nyour internet package *[[package]]* will be expired in 7 days.",
"reminder_3_day": "Hello *[[name]]*, \r\nyour internet package *[[package]]* will be expired in 3 days.",
"reminder_1_day": "Hello *[[name]]*,\r\n your internet package *[[package]]* will be expired tomorrow.",
- "invoice_paid": "*[[company_name]]*\r\n[[address]]\r\n[[phone]]\r\n\r\n\r\nINVOICE: *[[invoice]]*\r\nDate : [[date]]\r\n[[payment_gateway]] [[payment_channel]]\r\n\r\n\r\nType : *[[type]]*\r\nPackage : *[[plan_name]]*\r\nPrice : *[[plan_price]]*\r\n\r\nUsername : *[[user_name]]*\r\nPassword : ***********\r\n\r\nExpired : *[[expired_date]]*\r\n\r\n\r\nThank you...",
- "invoice_balance": "*[[company_name]]*\r\n[[address]]\r\n[[phone]]\r\n\r\n\r\nINVOICE: *[[invoice]]*\r\nDate : [[date]]\r\n[[payment_gateway]] [[payment_channel]]\r\n\r\n\r\nType : *[[type]]*\r\nPackage : *[[plan_name]]*\r\nPrice : *[[plan_price]]*\r\n\r\nThank you..."
+ "invoice_paid": "*[[company_name]]*\r\n[[address]]\r\n[[phone]]\r\n\r\n\r\nINVOICE: *[[invoice]]*\r\nDate : [[date]]\r\n[[payment_gateway]] [[payment_channel]]\r\n\r\n\r\nType : *[[type]]*\r\nPackage : *[[plan_name]]*\r\nPrice : *[[plan_price]]*\r\n\r\nUsername : *[[user_name]]*\r\nPassword : ***********\r\n\r\nExpired : *[[expired_date]]*\r\n\r\n====================\r\n[[footer]]",
+ "invoice_balance": "*[[company_name]]*\r\n[[address]]\r\n[[phone]]\r\n\r\n\r\nINVOICE: *[[invoice]]*\r\nDate : [[date]]\r\n[[payment_gateway]] [[payment_channel]]\r\n\r\n\r\nType : *[[type]]*\r\nPackage : *[[plan_name]]*\r\nPrice : *[[plan_price]]*\r\n\r\n====================\r\n[[footer]]"
}
diff --git a/ui/ui/app-notifications.tpl b/ui/ui/app-notifications.tpl
index ab5a40e1..6446adf1 100644
--- a/ui/ui/app-notifications.tpl
+++ b/ui/ui/app-notifications.tpl
@@ -82,7 +82,8 @@
[[plan_price]] Internet Package Prices.
[[user_name]] Username internet.
[[user_password]] User password.
- [[expired_date]] Expired datetime.
+ [[expired_date]] Expired datetime.
+ [[footer]] Invoice Footer.
@@ -107,7 +108,8 @@
[[plan_price]] Internet Package Prices.
[[user_name]] Username internet.
[[user_password]] User password.
- [[trx_date]] Transaction datetime.
+ [[trx_date]] Transaction datetime.
+ [[footer]] Invoice Footer.
diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl
index 83ee92ae..02e44903 100644
--- a/ui/ui/app-settings.tpl
+++ b/ui/ui/app-settings.tpl
@@ -247,6 +247,24 @@
add dst-host=tawk.to
add dst-host=*.tawk.to
+
+
+
+
+ {Lang::T('Invoice')}
+
+
+
diff --git a/ui/ui/invoice-print.tpl b/ui/ui/invoice-print.tpl
index 76e7cbbc..8da794d5 100644
--- a/ui/ui/invoice-print.tpl
+++ b/ui/ui/invoice-print.tpl
@@ -43,7 +43,8 @@
{$_L['Expires_On']} : {date($_c['date_format'], strtotime($d['expiration']))}
{$d['time']}
{/if}
- ============================================
+ ============================================
+
{$_c['note']}
diff --git a/ui/ui/invoice.tpl b/ui/ui/invoice.tpl
index 8186025f..5f4a9d3f 100644
--- a/ui/ui/invoice.tpl
+++ b/ui/ui/invoice.tpl
@@ -28,7 +28,8 @@
{$_L['Expires_On']} : {date($_c['date_format'], strtotime($in['expiration']))}
{$in['time']}
{/if}
- =====================================================
+ =====================================================
+ {$_c['note']}