diff --git a/system/controllers/order.php b/system/controllers/order.php
index f22e97ce..7b77bea5 100644
--- a/system/controllers/order.php
+++ b/system/controllers/order.php
@@ -345,7 +345,11 @@ switch ($action) {
$tax_rate = $tax_rate_setting;
}
$plan = ORM::for_table('tbl_plans')->find_one($routes['3']);
- $tax = Package::tax($plan['price'], $tax_rate);
+ $add_cost = 0;
+ if ($router['name'] != 'balance') {
+ list($bills, $add_cost) = User::getBills($id_customer);
+ }
+ $tax = Package::tax($plan['price'] + $add_cost, $tax_rate);
$pgs = array_values(explode(',', $config['payment_gateway']));
if (count($pgs) == 0) {
sendTelegram("Payment Gateway not set, please set it in Settings");
@@ -359,6 +363,8 @@ switch ($action) {
}
$ui->assign('route2', $routes[2]);
$ui->assign('route3', $routes[3]);
+ $ui->assign('add_cost', $add_cost);
+ $ui->assign('bills', $bills);
$ui->assign('plan', $plan);
$ui->display('user-selectGateway.tpl');
break;
diff --git a/system/lan/english.json b/system/lan/english.json
index e1361675..127a960d 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -678,5 +678,6 @@
"Logout_Admin_if_not_Available_Online_a_period_of_time": "Logout Admin if not Available\/Online a period of time",
"Timeout_Duration": "Timeout Duration",
"Enter_the_session_timeout_duration__minutes_": "Enter the session timeout duration (minutes)",
- "Idle_Timeout__Logout_Admin_if_Idle_for_xx_minutes": "Idle Timeout, Logout Admin if Idle for xx minutes"
+ "Idle_Timeout__Logout_Admin_if_Idle_for_xx_minutes": "Idle Timeout, Logout Admin if Idle for xx minutes",
+ "Failed_to_create_transaction__please_tell_seller_": "Failed to create transaction, please tell seller."
}
\ No newline at end of file
diff --git a/ui/ui/user-selectGateway.tpl b/ui/ui/user-selectGateway.tpl
index 77456951..6fd37475 100644
--- a/ui/ui/user-selectGateway.tpl
+++ b/ui/ui/user-selectGateway.tpl
@@ -11,8 +11,8 @@
@@ -25,44 +25,82 @@
{Lang::T('Plan Name')} {$plan['name_plan']}
{if $plan['is_radius'] or $plan['routers']}
-
- {Lang::T('Location')} {if
- $plan['is_radius']}Radius{else}{$plan['routers']}{/if}
+
+ {Lang::T('Location')} {if
+ $plan['is_radius']}Radius{else}{$plan['routers']}
+ {/if}
{/if}
{Lang::T('Type')} {if $plan['prepaid'] eq
- 'yes'}Prepaid{else}Postpaid{/if}
+ 'yes'}Prepaid{else}Postpaid
+ {/if}
{$plan['type']}
{Lang::T('Plan Price')} {if $using eq
- 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if}
+ 'zero'}{Lang::moneyFormat(0)}
+ {else}
+ {Lang::moneyFormat($plan['price'])}
+ {/if}
{if $plan['validity']}
-
- {Lang::T('Plan Validity')} {$plan['validity']}
- {$plan['validity_unit']}
-
+
+ {Lang::T('Plan Validity')} {$plan['validity']}
+ {$plan['validity_unit']}
+
{/if}
{Lang::T('Summary')}
{if $tax}
- -
- {Lang::T('Tax')} {Lang::moneyFormat($tax)}
-
- -
- {Lang::T('Total')} ({Lang::T('Plan Price')} + {Lang::T('Tax')}){Lang::moneyFormat($plan['price']+$tax)}
-
+ -
+ {Lang::T('Tax')} {Lang::moneyFormat($tax)}
+
+ {if $add_cost>0}
+ {foreach $bills as $k => $v}
+ -
+ {$k} {Lang::moneyFormat($v)}
+
+ {/foreach}
+ -
+ {Lang::T('Additional Cost')} {Lang::moneyFormat($add_cost)}
+
+ -
+ {Lang::T('Total')} ({Lang::T('Plan Price')}
+ +{Lang::T('Additional Cost')}){Lang::moneyFormat($plan['price']+$add_cost+$tax)}
+
+ {else}
+ -
+ {Lang::T('Total')} ({Lang::T('Plan Price')} + {Lang::T('Tax')}){Lang::moneyFormat($plan['price']+$tax)}
+
+ {/if}
{else}
- -
- {Lang::T('Total')}
- {Lang::moneyFormat($plan['price'])}
-
+ {if $add_cost>0}
+ {foreach $bills as $k => $v}
+ -
+ {$k} {Lang::moneyFormat($v)}
+
+ {/foreach}
+ -
+ {Lang::T('Additional Cost')} {Lang::moneyFormat($add_cost)}
+
+ -
+ {Lang::T('Total')} ({Lang::T('Plan Price')}
+ +{Lang::T('Additional Cost')}){Lang::moneyFormat($plan['price']+$add_cost)}
+
+ {else}
+ -
+ {Lang::T('Total')} {Lang::moneyFormat($plan['price'])}
+
+ {/if}
{/if}