forked from kevinowino869/mitrobill
fix unpaid logic
This commit is contained in:
parent
7c0bdeea41
commit
a7232e2b92
@ -333,16 +333,12 @@ $unpaid = ORM::for_table('tbl_payment_gateway')
|
|||||||
->find_one();
|
->find_one();
|
||||||
|
|
||||||
// check expired payments
|
// check expired payments
|
||||||
foreach($unpaid as $up) {
|
if(strtotime($unpaid['expired_date']) < time() || strtotime($unpaid['created_date'], "+24 HOUR") < time()){
|
||||||
if(strtotime($up['expired_date']) < time() || strtotime($up['created_date'], "+24 HOUR") < time()){
|
$unpaid->status = 4;
|
||||||
$up->status = 4;
|
$unpaid->save();
|
||||||
$up->save();
|
$unpaid = [];
|
||||||
}else{
|
|
||||||
$unpaids[] = $up;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$ui->assign('unpaid', $unpaids);
|
$ui->assign('unpaid', $unpaids);
|
||||||
$ui->assign('code', alphanumeric(_get('code'), "-"));
|
$ui->assign('code', alphanumeric(_get('code'), "-"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user