use customer Expired Date first then Expired Date from plan

This commit is contained in:
Ibnu Maksum 2024-07-01 15:25:27 +07:00
parent 540270f927
commit 7f757e07c8
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -67,9 +67,7 @@ class Package
if ($p['validity_unit'] == 'Period') { if ($p['validity_unit'] == 'Period') {
// if customer has attribute Expired Date use it // if customer has attribute Expired Date use it
$day_exp = User::getAttribute("Expired Date", $c['id']); $day_exp = User::getAttribute("Expired Date", $c['id']);
if ($day_exp) { if (!$day_exp) {
$day_exp = 20;
}else{
// if customer no attribute Expired Date use plan expired date // if customer no attribute Expired Date use plan expired date
$day_exp = 20; $day_exp = 20;
if ($p['prepaid'] == 'no') { if ($p['prepaid'] == 'no') {