Fix variable cron for notification

This commit is contained in:
Ibnu Maksum
2024-04-16 13:53:29 +07:00
parent ad565c15ca
commit 115a5c81a7
3 changed files with 13 additions and 9 deletions

View File

@ -121,7 +121,7 @@ class Message
public static function sendPackageNotification($customer, $package, $price, $message, $via)
{
global $u;
global $user_recharge;
if(empty($message)){
return "";
}
@ -141,8 +141,8 @@ class Message
}else{
$msg = str_replace('[[bills]]', '', $msg);
}
if ($u) {
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($u['expiration'], $u['time']), $msg);
if ($user_recharge) {
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($user_recharge['expiration'], $user_recharge['time']), $msg);
}
if (
!empty($customer['phonenumber']) && strlen($customer['phonenumber']) > 5