mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 18:24:32 +02:00
Expired date at Internet plan
This commit is contained in:
parent
242d43f7c1
commit
703593d5e2
12 changed files with 168 additions and 249 deletions
|
@ -64,20 +64,12 @@ class Package
|
|||
}
|
||||
}
|
||||
|
||||
if ($p['validity_unit'] == 'Period') {
|
||||
$day_exp = User::getAttribute("Expired Date", $c['id']); //ORM::for_table('tbl_customers_fields')->where('field_name', 'Expired Date')->where('customer_id', $c['id'])->find_one();
|
||||
if (!$day_exp) {
|
||||
$day_exp = 20;
|
||||
// $day_exp = date('d', strtotime($c['created_at']));
|
||||
// if (empty($day_exp) || $day_exp > 28) {
|
||||
// $day_exp = 1;
|
||||
// }
|
||||
$f = ORM::for_table('tbl_customers_fields')->create();
|
||||
$f->customer_id = $c['id'];
|
||||
$f->field_name = 'Expired Date';
|
||||
$f->field_value = $day_exp;
|
||||
$f->save();
|
||||
}
|
||||
$day_exp = 20;
|
||||
if ($p['prepaid'] == 'no') {
|
||||
$day_exp = $p['expired_date'];
|
||||
}
|
||||
if(empty($day_exp)){
|
||||
$day_exp = 20;
|
||||
}
|
||||
|
||||
if ($router_name == 'balance') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue