remove [[bills]] if there no bills found
This commit is contained in:
parent
53a309fee8
commit
1f5033b471
@ -125,6 +125,8 @@ class Message
|
|||||||
}
|
}
|
||||||
$note .= "Total : " . Lang::moneyFormat($add_cost+$price) . "\n";
|
$note .= "Total : " . Lang::moneyFormat($add_cost+$price) . "\n";
|
||||||
$msg = str_replace('[[bills]]', $note, $msg);
|
$msg = str_replace('[[bills]]', $note, $msg);
|
||||||
|
}else{
|
||||||
|
$msg = str_replace('[[bills]]', '', $msg);
|
||||||
}
|
}
|
||||||
if ($u) {
|
if ($u) {
|
||||||
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($u['expiration'], $u['time']), $msg);
|
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($u['expiration'], $u['time']), $msg);
|
||||||
@ -134,9 +136,9 @@ class Message
|
|||||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||||
) {
|
) {
|
||||||
if ($via == 'sms') {
|
if ($via == 'sms') {
|
||||||
Message::sendSMS($customer['phonenumber'], $msg);
|
echo Message::sendSMS($customer['phonenumber'], $msg);
|
||||||
} else if ($via == 'wa') {
|
} else if ($via == 'wa') {
|
||||||
Message::sendWhatsapp($customer['phonenumber'], $msg);
|
echo Message::sendWhatsapp($customer['phonenumber'], $msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "$via: $msg";
|
return "$via: $msg";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user