From a0b9e85f38d11de6ab72f6fd9eb0dd02b96f6945 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 28 Feb 2024 11:31:36 +0700 Subject: [PATCH] Add Expired date for reminder --- CHANGELOG.md | 5 +++++ system/autoload/Message.php | 4 ++++ ui/ui/app-notifications.tpl | 25 +++++++++++++++++-------- version.json | 2 +- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e3c66b..df88411e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ # CHANGELOG +## 2024.2.28 + +- Fix Buy Plan with Balance +- Add Expired date for reminder + ## 2024.2.27 - fix path notification diff --git a/system/autoload/Message.php b/system/autoload/Message.php index 256129de..a8005898 100644 --- a/system/autoload/Message.php +++ b/system/autoload/Message.php @@ -68,9 +68,13 @@ class Message public static function sendPackageNotification($phone, $name, $package, $price, $message, $via) { + global $u; $msg = str_replace('[[name]]', $name, $message); $msg = str_replace('[[package]]', $package, $msg); $msg = str_replace('[[price]]', $price, $msg); + if($u){ + $msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($u['expiration'], $u['time']), $msg); + } if ( !empty($phone) && strlen($phone) > 5 && !empty($message) && in_array($via, ['sms', 'wa']) diff --git a/ui/ui/app-notifications.tpl b/ui/ui/app-notifications.tpl index 2691593f..30220a31 100644 --- a/ui/ui/app-notifications.tpl +++ b/ui/ui/app-notifications.tpl @@ -15,13 +15,14 @@
-

- [[name]] will be replaced with Customer Name. [[package]] will be replaced with Package name. [[price]] will be replaced with Package price. + [[name]] will be replaced with Customer Name. + [[package]] will be replaced with Package name. + [[price]] will be replaced with Package price.

@@ -33,7 +34,10 @@ rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}

- [[name]] will be replaced with Customer Name. [[package]] will be replaced with Package name. [[price]] will be replaced with Package price. + [[name]] will be replaced with Customer Name. + [[package]] will be replaced with Package name. + [[price]] will be replaced with Package price. + [[expired_date]] will be replaced with Expiration date.

@@ -45,7 +49,10 @@ rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}

- [[name]] will be replaced with Customer Name. [[package]] will be replaced with Package name. [[price]] will be replaced with Package price. + [[name]] will be replaced with Customer Name. + [[package]] will be replaced with Package name. + [[price]] will be replaced with Package price. + [[expired_date]] will be replaced with Expiration date.

@@ -57,7 +64,10 @@ rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}

- [[name]] will be replaced with Customer Name. [[package]] will be replaced with Package name. [[price]] will be replaced with Package price. + [[name]] will be replaced with Customer Name. + [[package]] will be replaced with Package name. + [[price]] will be replaced with Package price. + [[expired_date]] will be replaced with Expiration date.

@@ -149,8 +159,7 @@
- +
diff --git a/version.json b/version.json index b8373514..60dd994c 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.2.27.1" + "version": "2024.2.28" } \ No newline at end of file