Fix Edit Plan

This commit is contained in:
Ibnu Maksum 2024-02-02 13:38:22 +07:00
parent bba09ca647
commit 4ab32bc68d
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 7 additions and 3 deletions

View File

@ -174,6 +174,7 @@ switch ($action) {
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
$ui->assign('p', $p);
run_hook('view_edit_customer_plan'); #HOOK
$ui->assign('_title', 'Edit Plan');
$ui->display('prepaid-edit.tpl');
} else {
r2(U . 'services/list', 'e', $_L['Account_Not_Found']);
@ -228,11 +229,14 @@ switch ($action) {
run_hook('edit_customer_plan'); #HOOK
$d->username = $username;
$d->plan_id = $id_plan;
$d->namebp = $p['name_plan'];
//$d->recharged_on = $recharged_on;
$d->expiration = $expiration;
$d->time = $time;
if(strtotime($expiration.' '.$time) > time()){
$d->status = 'on';
if($d['status'] == 'off'){
if(strtotime($expiration.' '.$time) > time()){
$d->status = 'on';
}
}
if($p['is_radius']){
$d->routers = 'radius';

View File

@ -4,7 +4,7 @@
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{$_L['Recharge_Account']}</h3>
<h3 class="panel-title">Edit Plan</h3>
</div>
<div class="panel-body">
<form class="form-horizontal" method="post" role="form" action="{$_url}prepaid/edit-post">