mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-28 13:58:24 +02:00
$day_exp
This commit is contained in:
parent
8318bb4e6b
commit
a6c004e1cb
1 changed files with 5 additions and 4 deletions
|
@ -56,10 +56,11 @@ class Package
|
||||||
if ($p['validity_unit'] == 'Period') {
|
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();
|
$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) {
|
if (!$day_exp) {
|
||||||
$day_exp = date('d', strtotime($c['created_at']));
|
$day_exp = 20;
|
||||||
if (empty($day_exp) || $day_exp > 28) {
|
// $day_exp = date('d', strtotime($c['created_at']));
|
||||||
$day_exp = 1;
|
// if (empty($day_exp) || $day_exp > 28) {
|
||||||
}
|
// $day_exp = 1;
|
||||||
|
// }
|
||||||
$f = ORM::for_table('tbl_customers_fields')->create();
|
$f = ORM::for_table('tbl_customers_fields')->create();
|
||||||
$f->customer_id = $c['id'];
|
$f->customer_id = $c['id'];
|
||||||
$f->field_name = 'Expired Date';
|
$f->field_name = 'Expired Date';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue