mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-16 04:54:24 +02:00
fix unpaid logic
This commit is contained in:
parent
7c0bdeea41
commit
a7232e2b92
1 changed files with 4 additions and 8 deletions
|
@ -333,16 +333,12 @@ $unpaid = ORM::for_table('tbl_payment_gateway')
|
|||
->find_one();
|
||||
|
||||
// check expired payments
|
||||
foreach($unpaid as $up) {
|
||||
if(strtotime($up['expired_date']) < time() || strtotime($up['created_date'], "+24 HOUR") < time()){
|
||||
$up->status = 4;
|
||||
$up->save();
|
||||
}else{
|
||||
$unpaids[] = $up;
|
||||
}
|
||||
if(strtotime($unpaid['expired_date']) < time() || strtotime($unpaid['created_date'], "+24 HOUR") < time()){
|
||||
$unpaid->status = 4;
|
||||
$unpaid->save();
|
||||
$unpaid = [];
|
||||
}
|
||||
|
||||
|
||||
$ui->assign('unpaid', $unpaids);
|
||||
$ui->assign('code', alphanumeric(_get('code'), "-"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue