fix sending notif package
This commit is contained in:
parent
71437b9a0e
commit
006693982b
@ -118,12 +118,11 @@ class Message
|
|||||||
$msg = str_replace('[[package]]', $package, $msg);
|
$msg = str_replace('[[package]]', $package, $msg);
|
||||||
$msg = str_replace('[[price]]', $price, $msg);
|
$msg = str_replace('[[price]]', $price, $msg);
|
||||||
list($bills, $add_cost) = User::getBills($customer['id']);
|
list($bills, $add_cost) = User::getBills($customer['id']);
|
||||||
if(count($bills)>0){
|
if($add_cost>0){
|
||||||
$note = "";
|
$note = "";
|
||||||
foreach ($bills as $k => $v) {
|
foreach ($bills as $k => $v) {
|
||||||
$note .= $k . " : " . Lang::moneyFormat($v) . "\n";
|
$note .= $k . " : " . Lang::moneyFormat($v) . "\n";
|
||||||
}
|
}
|
||||||
$note .= Lang::T("Total")." : " . Lang::moneyFormat($add_cost+$price) . "\n";
|
|
||||||
$msg = str_replace('[[bills]]', $note, $msg);
|
$msg = str_replace('[[bills]]', $note, $msg);
|
||||||
}
|
}
|
||||||
if ($u) {
|
if ($u) {
|
||||||
|
@ -38,13 +38,7 @@ foreach ($d as $ds) {
|
|||||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||||
list($bills, $add_cost) = User::getBills($ds['customer_id']);
|
if ($p['validity_unit'] == 'Period') {
|
||||||
if ($add_cost > 0) {
|
|
||||||
if (!empty($add_cost)) {
|
|
||||||
$p['price'] += $add_cost;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($p['validity_unit'] == 'Period') {
|
|
||||||
// Postpaid price from field
|
// Postpaid price from field
|
||||||
$add_inv = User::getAttribute("Invoice", $ds['customer_id']);
|
$add_inv = User::getAttribute("Invoice", $ds['customer_id']);
|
||||||
if (empty ($add_inv) or $add_inv == 0) {
|
if (empty ($add_inv) or $add_inv == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user