fix language clean after change and still use expired date from customer attribute when it have
This commit is contained in:
parent
2218115177
commit
04983e8a3a
@ -64,14 +64,30 @@ class Package
|
||||
}
|
||||
}
|
||||
|
||||
$day_exp = 20;
|
||||
if ($p['prepaid'] == 'no') {
|
||||
$day_exp = $p['expired_date'];
|
||||
}
|
||||
if (empty($day_exp)) {
|
||||
$day_exp = 20;
|
||||
if ($p['validity_unit'] == 'Period') {
|
||||
// if customer has attribute Expired Date use it
|
||||
$day_exp = User::getAttribute("Expired Date", $c['id']);
|
||||
if (!$day_exp) {
|
||||
$day_exp = 20;
|
||||
$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();
|
||||
}else{
|
||||
// if customer no attribute Expired Date use plan expired date
|
||||
$day_exp = 20;
|
||||
if ($p['prepaid'] == 'no') {
|
||||
$day_exp = $p['expired_date'];
|
||||
}
|
||||
if (empty($day_exp)) {
|
||||
$day_exp = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($router_name == 'balance') {
|
||||
// insert table transactions
|
||||
$t = ORM::for_table('tbl_transactions')->create();
|
||||
|
@ -260,8 +260,8 @@ switch ($action) {
|
||||
$d->value = $lan;
|
||||
$d->save();
|
||||
unset($_SESSION['Lang']);
|
||||
_log('[' . $admin['username'] . ']: ' . Lang::T('Settings Saved Successfully'), $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/localisation', 's', Lang::T('Settings Saved Successfully'));
|
||||
_log('[' . $admin['username'] . ']: ' . 'Settings Saved Successfully', $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/localisation', 's', 'Settings Saved Successfully');
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -368,5 +368,26 @@
|
||||
"Hotspot": "Hotspot",
|
||||
"Monthly_Registered_Customers": "Monthly Registered Customers",
|
||||
"Total_Monthly_Sales": "Total Monthly Sales",
|
||||
"Active_Users": "Active Users"
|
||||
"Active_Users": "Active Users",
|
||||
"SuperAdmin": "S\u00fcper Y\u00f6netici",
|
||||
"Lists": "Listeler",
|
||||
"Vouchers": "Kuponlar",
|
||||
"Refill_Customer": "M\u00fc\u015fteriyi Yeniden Doldurun",
|
||||
"Recharge_Customer": "M\u00fc\u015fteriyi Yeniden \u015earj Edin",
|
||||
"Internet_Plan": "\u0130nternet Plan\u0131",
|
||||
"Bandwidth": "Bant geni\u015fli\u011fi",
|
||||
"Customer_Balance": "M\u00fc\u015fteri Bakiyesi",
|
||||
"Send_Message": "Mesaj g\u00f6nder",
|
||||
"Single_Customer": "Tek M\u00fc\u015fteri",
|
||||
"Bulk_Customers": "Toplu M\u00fc\u015fteriler",
|
||||
"Radius": "Yar\u0131\u00e7ap",
|
||||
"Radius_NAS": "Yar\u0131\u00e7ap NAS",
|
||||
"Static_Pages": "Statik Sayfalar",
|
||||
"Customer_Announcement": "M\u00fc\u015fteri Duyurusu",
|
||||
"Privacy_Policy": "Gizlilik Politikas\u0131",
|
||||
"Terms_and_Conditions": "\u015eartlar ve ko\u015fullar",
|
||||
"Maintenance_Mode": "Bak\u0131m Modu",
|
||||
"Logs": "K\u00fct\u00fckler",
|
||||
"Language_Editor": "Dil Edit\u00f6r\u00fc",
|
||||
"Change_title_in_user_Plan_order": "Kullan\u0131c\u0131 Plan\u0131 s\u0131ras\u0131ndaki ba\u015fl\u0131\u011f\u0131 de\u011fi\u015ftir"
|
||||
}
|
@ -180,7 +180,7 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Expired Date')}
|
||||
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
|
||||
data-trigger="focus" data-container="body"
|
||||
data-content="Expired will be this date every month, 0 will be when customer buy internet plan">?</a>
|
||||
data-content="Expired will be this date every month">?</a>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input type="number" class="form-control" name="expired_date" maxlength="2" value="20" min="1" max="28" step="1" >
|
||||
|
@ -211,7 +211,7 @@
|
||||
<label class="col-md-3 control-label">{Lang::T('Expired Date')}
|
||||
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
|
||||
data-trigger="focus" data-container="body"
|
||||
data-content="Expired will be this date every month, 0 will be when customer buy internet plan">?</a>
|
||||
data-content="Expired will be this date every month">?</a>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
<input type="number" class="form-control" name="expired_date" maxlength="2"
|
||||
|
@ -118,7 +118,7 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Expired Date')}
|
||||
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
|
||||
data-trigger="focus" data-container="body"
|
||||
data-content="Expired will be this date every month, 0 will be when customer buy internet plan">?</a>
|
||||
data-content="Expired will be this date every month">?</a>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input type="number" class="form-control" name="expired_date" maxlength="2" value="20" min="1" max="28" step="1" >
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.6.21"
|
||||
"version": "2024.6.21.1"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user