Discount price requested by Fiberwan
This commit is contained in:
parent
8e3a16a123
commit
aa0432df38
@ -2,6 +2,11 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2024.9.23
|
||||
|
||||
- Discount Price
|
||||
- Burst Preset
|
||||
|
||||
## 2024.9.20
|
||||
|
||||
- Forgot Password
|
||||
|
@ -83,9 +83,9 @@ switch ($action) {
|
||||
|
||||
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->where('tbl_plans.type', 'Hotspot')->findArray();
|
||||
$ids = array_column($bws, 'id_bw');
|
||||
if(count($ids)){
|
||||
if (count($ids)) {
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->select("id")->select('name_bw')->where_id_in($ids)->findArray());
|
||||
}else{
|
||||
} else {
|
||||
$ui->assign('bws', []);
|
||||
}
|
||||
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
|
||||
@ -321,6 +321,7 @@ switch ($action) {
|
||||
$id_bw = _post('id_bw');
|
||||
$typebp = _post('typebp');
|
||||
$price = _post('price');
|
||||
$price_old = _post('price_old');
|
||||
$limit_type = _post('limit_type');
|
||||
$time_limit = _post('time_limit');
|
||||
$time_unit = _post('time_unit');
|
||||
@ -353,6 +354,11 @@ switch ($action) {
|
||||
} else {
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
|
||||
if ($price_old <= $price) {
|
||||
$price_old = '';
|
||||
}
|
||||
|
||||
run_hook('edit_plan'); #HOOK
|
||||
if ($msg == '') {
|
||||
$b = ORM::for_table('tbl_bandwidth')->where('id', $id_bw)->find_one();
|
||||
@ -378,6 +384,7 @@ switch ($action) {
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price; // Set price with or without tax based on configuration
|
||||
$d->price_old = $price_old;
|
||||
$d->typebp = $typebp;
|
||||
$d->limit_type = $limit_type;
|
||||
$d->time_limit = $time_limit;
|
||||
@ -453,9 +460,9 @@ switch ($action) {
|
||||
|
||||
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->where('tbl_plans.type', 'PPPOE')->findArray();
|
||||
$ids = array_column($bws, 'id_bw');
|
||||
if(count($ids)){
|
||||
if (count($ids)) {
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->select("id")->select('name_bw')->where_id_in($ids)->findArray());
|
||||
}else{
|
||||
} else {
|
||||
$ui->assign('bws', []);
|
||||
}
|
||||
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
|
||||
@ -705,6 +712,7 @@ switch ($action) {
|
||||
$name = _post('name_plan');
|
||||
$id_bw = _post('id_bw');
|
||||
$price = _post('price');
|
||||
$price_old = _post('price_old');
|
||||
$validity = _post('validity');
|
||||
$validity_unit = _post('validity_unit');
|
||||
$routers = _post('routers');
|
||||
@ -728,6 +736,10 @@ switch ($action) {
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
if ($price_old <= $price) {
|
||||
$price_old = '';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
$old = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
if ($d) {
|
||||
@ -758,6 +770,7 @@ switch ($action) {
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price;
|
||||
$d->price_old = $price_old;
|
||||
$d->plan_type = $plan_type;
|
||||
$d->validity = $validity;
|
||||
$d->validity_unit = $validity_unit;
|
||||
@ -835,6 +848,7 @@ switch ($action) {
|
||||
$id = _post('id');
|
||||
$name = _post('name');
|
||||
$price = _post('price');
|
||||
$price_old = _post('price_old');
|
||||
$enabled = _post('enabled');
|
||||
$prepaid = _post('prepaid');
|
||||
|
||||
@ -851,11 +865,15 @@ switch ($action) {
|
||||
} else {
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
if ($price_old <= $price) {
|
||||
$price_old = '';
|
||||
}
|
||||
run_hook('edit_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
$d->name_plan = $name;
|
||||
$d->price = $price;
|
||||
$d->enabled = $enabled;
|
||||
$d->price_old = $price_old;
|
||||
$d->prepaid = 'yes';
|
||||
$d->save();
|
||||
|
||||
@ -935,9 +953,9 @@ switch ($action) {
|
||||
|
||||
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->where('tbl_plans.type', 'VPN')->findArray();
|
||||
$ids = array_column($bws, 'id_bw');
|
||||
if(count($ids)){
|
||||
if (count($ids)) {
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->select("id")->select('name_bw')->where_id_in($ids)->findArray());
|
||||
}else{
|
||||
} else {
|
||||
$ui->assign('bws', []);
|
||||
}
|
||||
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
|
||||
@ -1187,6 +1205,7 @@ switch ($action) {
|
||||
$name = _post('name_plan');
|
||||
$id_bw = _post('id_bw');
|
||||
$price = _post('price');
|
||||
$price_old = _post('price_old');
|
||||
$validity = _post('validity');
|
||||
$validity_unit = _post('validity_unit');
|
||||
$routers = _post('routers');
|
||||
@ -1210,6 +1229,10 @@ switch ($action) {
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
if($price_old<=$price){
|
||||
$price_old = '';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
$old = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
if ($d) {
|
||||
@ -1240,6 +1263,7 @@ switch ($action) {
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price;
|
||||
$d->price_old = $price_old;
|
||||
$d->plan_type = $plan_type;
|
||||
$d->validity = $validity;
|
||||
$d->validity_unit = $validity_unit;
|
||||
|
@ -1,59 +1,68 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{Lang::T('Edit Service Package')}</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/balance-edit-post">
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> {Lang::T('Enable')}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> {Lang::T('Disable')}
|
||||
</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{Lang::T('Edit Service Package')}</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/balance-edit-post">
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> {Lang::T('Enable')}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> {Lang::T('Disable')}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Package Name')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" required class="form-control" id="name" value="{$d['name_plan']}"
|
||||
name="name" maxlength="40" placeholder="{Lang::T('Topup')} 100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-md-2 control-label">{Lang::T('Package Price')}</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$_c['currency_code']}</span>
|
||||
<input type="number" class="form-control" name="price" value="{$d['price']}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Package Name')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" required class="form-control" id="name" value="{$d['name_plan']}" name="name" maxlength="40" placeholder="{Lang::T('Topup')} 100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Package Price')}</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$_c['currency_code']}</span>
|
||||
<input type="number" class="form-control" name="price" value="{$d['price']}" required>
|
||||
</div>
|
||||
</div>
|
||||
{if $_c['enable_tax'] == 'yes'}
|
||||
{if $_c['tax_rate'] == 'custom'}
|
||||
</div>
|
||||
{if $_c['enable_tax'] == 'yes'}
|
||||
{if $_c['tax_rate'] == 'custom'}
|
||||
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
|
||||
will be added')}</p>
|
||||
{else}
|
||||
{else}
|
||||
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
|
||||
will be added')}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<label class="col-md-2 control-label">{Lang::T('Price Before Discount')}</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$_c['currency_code']}</span>
|
||||
<input type="number" class="form-control" name="price_old" required value="{$d['price_old']}">
|
||||
</div>
|
||||
<p class="help-block">{Lang::T('For Discount Rate, this is price before get discount, must be more expensive with real price')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Save Changes')}</button>
|
||||
Or <a href="{$_url}services/balance">{Lang::T('Cancel')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Save Changes')}</button>
|
||||
Or <a href="{$_url}services/balance">{Lang::T('Cancel')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
@ -36,7 +36,9 @@
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled"{/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}{if !empty($ds['price_old'])}
|
||||
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($ds['price_old'])}</sup>
|
||||
{/if}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/balance-edit/{$ds['id']}" class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
|
||||
<a href="{$_url}services/balance-delete/{$ds['id']}" onclick="return confirm('{Lang::T('Delete')}?')" id="{$ds['id']}" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
|
@ -151,7 +151,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group has-success">
|
||||
<label class="col-md-3 control-label">{Lang::T('Package Price')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
@ -168,7 +168,16 @@
|
||||
will be added')}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<label class="col-md-3 control-label">{Lang::T('Price Before Discount')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$_c['currency_code']}</span>
|
||||
<input type="number" class="form-control" name="price_old" required value="{$d['price_old']}">
|
||||
</div>
|
||||
<p class="help-block">{Lang::T('For Discount Rate, this is price before get discount, must be more expensive with real price')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Shared Users')}
|
||||
|
@ -35,8 +35,8 @@
|
||||
<select class="form-control" id="type2" name="type2">
|
||||
<option value="">{Lang::T('Type')}</option>
|
||||
{foreach $type2s as $t}
|
||||
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
|
||||
</option>
|
||||
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -44,9 +44,9 @@
|
||||
<select class="form-control" id="bandwidth" name="bandwidth">
|
||||
<option value="">Bandwidth</option>
|
||||
{foreach $bws as $b}
|
||||
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
|
||||
{$b['name_bw']}
|
||||
</option>
|
||||
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
|
||||
{$b['name_bw']}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -54,8 +54,8 @@
|
||||
<select class="form-control" id="type3" name="type3">
|
||||
<option value="">{Lang::T('Category')}</option>
|
||||
{foreach $type3s as $t}
|
||||
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
|
||||
</option>
|
||||
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -63,8 +63,8 @@
|
||||
<select class="form-control" id="valid" name="valid">
|
||||
<option value="">{Lang::T('Validity')}</option>
|
||||
{foreach $valids as $v}
|
||||
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
|
||||
</option>
|
||||
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -72,7 +72,7 @@
|
||||
<select class="form-control" id="router" name="router">
|
||||
<option value="">{Lang::T('Location')}</option>
|
||||
{foreach $routers as $r}
|
||||
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
|
||||
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
|
||||
{/foreach}
|
||||
<option value="radius" {if $router eq 'radius' }selected{/if}>Radius</option>
|
||||
</select>
|
||||
@ -81,7 +81,7 @@
|
||||
<select class="form-control" id="device" name="device">
|
||||
<option value="">{Lang::T('Device')}</option>
|
||||
{foreach $devices as $r}
|
||||
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
|
||||
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -136,39 +136,43 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] !=1}class="danger" title="disabled" {elseif $ds['prepaid'] !='yes'
|
||||
}class="warning" title="Postpaid" {/if}>
|
||||
<td class="headcol">{$ds['name_plan']}</td>
|
||||
<td>{if $ds['prepaid'] == no}<b>Postpaid</b>{else}Prepaid{/if} {$ds['plan_type']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{$ds['typebp']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['time_limit']} {$ds['time_unit']}</td>
|
||||
<td>{$ds['data_limit']} {$ds['data_unit']}</td>
|
||||
<td>
|
||||
{if $ds['is_radius']}
|
||||
<span class="label label-primary">RADIUS</span>
|
||||
{else}
|
||||
{if $ds['routers']!=''}
|
||||
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$ds['device']}</td>
|
||||
<td>{if $ds['plan_expired']}<a
|
||||
href="{$_url}services/edit/{$ds['plan_expired']}">{Lang::T('Yes')}</a>{else}{Lang::T('No')}
|
||||
{/if}</td>
|
||||
<td>{if $ds['prepaid'] == no}{$ds['expired_date']}{/if}</td>
|
||||
<td>{$ds['id']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/edit/{$ds['id']}"
|
||||
class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
|
||||
<a href="{$_url}services/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{Lang::T('Delete')}?')"
|
||||
class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr {if $ds['enabled'] !=1}class="danger" title="disabled" {elseif $ds['prepaid'] !='yes'
|
||||
}class="warning" title="Postpaid" {/if}>
|
||||
<td class="headcol">{$ds['name_plan']}</td>
|
||||
<td>{if $ds['prepaid'] == no}<b>Postpaid</b>{else}Prepaid{/if} {$ds['plan_type']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{$ds['typebp']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}
|
||||
{if !empty($ds['price_old'])}
|
||||
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($ds['price_old'])}</sup>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['time_limit']} {$ds['time_unit']}</td>
|
||||
<td>{$ds['data_limit']} {$ds['data_unit']}</td>
|
||||
<td>
|
||||
{if $ds['is_radius']}
|
||||
<span class="label label-primary">RADIUS</span>
|
||||
{else}
|
||||
{if $ds['routers']!=''}
|
||||
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$ds['device']}</td>
|
||||
<td>{if $ds['plan_expired']}<a
|
||||
href="{$_url}services/edit/{$ds['plan_expired']}">{Lang::T('Yes')}</a>{else}{Lang::T('No')}
|
||||
{/if}</td>
|
||||
<td>{if $ds['prepaid'] == no}{$ds['expired_date']}{/if}</td>
|
||||
<td>{$ds['id']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/edit/{$ds['id']}"
|
||||
class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
|
||||
<a href="{$_url}services/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{Lang::T('Delete')}?')"
|
||||
class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -91,7 +91,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group has-success">
|
||||
<label class="col-md-3 control-label">{Lang::T('Plan Price')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
@ -108,7 +108,16 @@
|
||||
will be added')}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<label class="col-md-3 control-label">{Lang::T('Price Before Discount')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$_c['currency_code']}</span>
|
||||
<input type="number" class="form-control" name="price_old" required value="{$d['price_old']}">
|
||||
</div>
|
||||
<p class="help-block">{Lang::T('For Discount Rate, this is price before get discount, must be more expensive with real price')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Plan Validity')}</label>
|
||||
|
@ -35,8 +35,8 @@
|
||||
<select class="form-control" id="type2" name="type2">
|
||||
<option value="">{Lang::T('Type')}</option>
|
||||
{foreach $type2s as $t}
|
||||
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
|
||||
</option>
|
||||
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -44,9 +44,9 @@
|
||||
<select class="form-control" id="bandwidth" name="bandwidth">
|
||||
<option value="">Bandwidth</option>
|
||||
{foreach $bws as $b}
|
||||
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
|
||||
{$b['name_bw']}
|
||||
</option>
|
||||
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
|
||||
{$b['name_bw']}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -54,8 +54,8 @@
|
||||
<select class="form-control" id="type3" name="type3">
|
||||
<option value="">{Lang::T('Category')}</option>
|
||||
{foreach $type3s as $t}
|
||||
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
|
||||
</option>
|
||||
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -63,8 +63,8 @@
|
||||
<select class="form-control" id="valid" name="valid">
|
||||
<option value="">{Lang::T('Validity')}</option>
|
||||
{foreach $valids as $v}
|
||||
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
|
||||
</option>
|
||||
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -72,7 +72,7 @@
|
||||
<select class="form-control" id="router" name="router">
|
||||
<option value="">{Lang::T('Location')}</option>
|
||||
{foreach $routers as $r}
|
||||
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
|
||||
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
|
||||
{/foreach}
|
||||
<option value="radius" {if $router eq 'radius' }selected{/if}>Radius</option>
|
||||
</select>
|
||||
@ -81,7 +81,7 @@
|
||||
<select class="form-control" id="device" name="device">
|
||||
<option value="">{Lang::T('Device')}</option>
|
||||
{foreach $devices as $r}
|
||||
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
|
||||
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
@ -132,12 +132,18 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] !=1}class="danger" title="disabled" {/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['plan_type']} {if $ds['prepaid'] !=
|
||||
'yes'}<b>{Lang::T('Postpaid')}</b>{else}{Lang::T('Prepaid')}{/if}</td>
|
||||
<tr {if $ds['enabled'] !=1}class="danger" title="disabled" {/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['plan_type']} {if $ds['prepaid'] !=
|
||||
'yes'}<b>{Lang::T('Postpaid')}</b>
|
||||
{else}
|
||||
{Lang::T('Prepaid')}
|
||||
{/if}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}{if !empty($ds['price_old'])}
|
||||
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($ds['price_old'])}</sup>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['pool']}</td>
|
||||
<td>{if $ds['plan_expired']}<a
|
||||
@ -146,11 +152,11 @@
|
||||
<td>{if $ds['prepaid'] == no}{$ds['expired_date']}{/if}</td>
|
||||
<td>
|
||||
{if $ds['is_radius']}
|
||||
<span class="label label-primary">RADIUS</span>
|
||||
<span class="label label-primary">RADIUS</span>
|
||||
{else}
|
||||
{if $ds['routers']!=''}
|
||||
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
|
||||
{/if}
|
||||
{if $ds['routers']!=''}
|
||||
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$ds['device']}</td>
|
||||
|
@ -3,35 +3,39 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<div class="box box-solid box-success bg-gray-light">
|
||||
<div class="box-header">{Lang::T('Buy Balance Plans')}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_balance as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-solid box-default">
|
||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<div style="margin-left: 5px; margin-right: 5px;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{Lang::T('Price')}</td>
|
||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="box box-solid box-success bg-gray-light">
|
||||
<div class="box-header">{Lang::T('Buy Balance Plans')}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_balance as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-solid box-default">
|
||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<div style="margin-left: 5px; margin-right: 5px;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{Lang::T('Price')}</td>
|
||||
<td>{Lang::moneyFormat($plan['price'])}
|
||||
{if !empty($plan['price_old'])}
|
||||
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="{$_url}order/gateway/0/{$plan['id']}"
|
||||
onclick="return confirm('{Lang::T('Buy Balance')}?')"
|
||||
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="{$_url}order/gateway/0/{$plan['id']}"
|
||||
onclick="return confirm('{Lang::T('Buy Balance')}?')"
|
||||
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy')}</a>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -46,11 +46,12 @@
|
||||
{$plan['type']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Price')}</b> <span class="pull-right">{if $using eq
|
||||
'zero'}{Lang::moneyFormat(0)}
|
||||
{else}
|
||||
{Lang::moneyFormat($plan['price'])}
|
||||
{/if}</span>
|
||||
<b>{Lang::T('Plan Price')}</b> <span class="pull-right">
|
||||
{if !empty($plan['price_old'])}
|
||||
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($plan['price_old'])}</sup>
|
||||
{/if}
|
||||
{Lang::moneyFormat($plan['price'])}
|
||||
</span>
|
||||
</li>
|
||||
{if $plan['validity']}
|
||||
<li class="list-group-item">
|
||||
@ -121,4 +122,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="user-ui/footer.tpl"}
|
||||
{include file="user-ui/footer.tpl"}
|
@ -91,7 +91,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group has-success">
|
||||
<label class="col-md-3 control-label">{Lang::T('Plan Price')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
@ -108,7 +108,16 @@
|
||||
will be added')}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="form-group has-warning">
|
||||
<label class="col-md-3 control-label">{Lang::T('Price Before Discount')}</label>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$_c['currency_code']}</span>
|
||||
<input type="number" class="form-control" name="price_old" required value="{$d['price_old']}">
|
||||
</div>
|
||||
<p class="help-block">{Lang::T('For Discount Rate, this is price before get discount, must be more expensive with real price')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Plan Validity')}</label>
|
||||
|
@ -133,9 +133,14 @@
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['plan_type']} {if $ds['prepaid'] != 'yes'}<b>{Lang::T('Postpaid')}</b>{else}{Lang::T('Prepaid')}{/if}</td>
|
||||
<td>{$ds['plan_type']}
|
||||
{if $ds['prepaid'] != 'yes'}<b>{Lang::T('Postpaid')}</b>{else}{Lang::T('Prepaid')}{/if}
|
||||
</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}{if !empty($ds['price_old'])}
|
||||
<sup style="text-decoration: line-through; color: red">{Lang::moneyFormat($ds['price_old'])}</sup>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['pool']}</td>
|
||||
<td>{if $ds['plan_expired']}<a
|
||||
@ -176,4 +181,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.9.20"
|
||||
"version": "2024.9.23"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user