+ Update nano credit interface for administrator
This commit is contained in:
parent
c06baa8011
commit
1ef09b3298
|
@ -1924,6 +1924,7 @@ class Gestion extends CI_Controller
|
|||
$data['currency_name_en'] = $networkDetails->first_row()->currency_name_en;
|
||||
$data['currency_code'] = $networkDetails->first_row()->currency_code;
|
||||
}
|
||||
$data['id_network'] = $network_id;
|
||||
$this->load->view('header_gestion', $data);
|
||||
if ($type == 'transaction')
|
||||
$this->load->view('historique_transactions');
|
||||
|
@ -2081,6 +2082,8 @@ class Gestion extends CI_Controller
|
|||
|
||||
if ($this->input->get('history')) {
|
||||
$this->historique_nano_credit($data['network_id'], $this->input->get('d'), $this->input->get('f'), $this->input->get('history'));
|
||||
} elseif ($this->input->get('group')) {
|
||||
$this->users_group_details($data['network_id'],$this->input->get('group'));
|
||||
} else {
|
||||
$data['groups'] = $this->nano_credit_model->getUsersGroups($data['network_id']);
|
||||
$data['configWallet'] = $this->wallet_model->getConfigWallet($data['network_id'])->first_row();
|
||||
|
@ -2122,12 +2125,13 @@ class Gestion extends CI_Controller
|
|||
if ($type == 'nano_credit') {
|
||||
$data['transactions'] = $this->nano_credit_model->getUserDemandesCredit($startDate, $endDate, $network_id);
|
||||
} else if ($type == 'savings') {
|
||||
$data['transactions'] = $this->wallet_model->getIlinkTransactions($startDate, $endDate, $network_id);
|
||||
$data['transactions'] = $this->nano_credit_model->getUsersSavings($startDate, $endDate, $network_id);
|
||||
}
|
||||
$data['active'] = "nano_credit";
|
||||
$data['alert'] = "";
|
||||
$data['networks'] = $this->wallet_model->getAllActivatedNetworks();
|
||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||
$data['id_network'] = $network_id;
|
||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||
if ($networkDetails) {
|
||||
$data['network'] = $networkDetails->first_row()->network;
|
||||
|
@ -2137,13 +2141,51 @@ class Gestion extends CI_Controller
|
|||
$data['currency_code'] = $networkDetails->first_row()->currency_code;
|
||||
}
|
||||
$this->load->view('header_gestion', $data);
|
||||
if ($type == 'epargne')
|
||||
if ($type == 'savings')
|
||||
$this->load->view('nano_credit/historique_savings');
|
||||
else
|
||||
$this->load->view('nano_credit/historique_nano_credit');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
private function users_group_details($network_id , $group_code)
|
||||
{
|
||||
$data['active'] = "nano_credit";
|
||||
$data['alert'] = "";
|
||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||
|
||||
|
||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||
if ($networkDetails) {
|
||||
$data['network'] = $networkDetails->first_row()->network;
|
||||
$data['country'] = $networkDetails->first_row()->country;
|
||||
$data['currency_code'] = $networkDetails->first_row()->currency_code;
|
||||
}
|
||||
|
||||
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['members'] = $this->nano_credit_model->getGroupMembers($group_code);
|
||||
$data['group'] = $this->nano_credit_model->getGroup($group_code);
|
||||
|
||||
//Calcul de la capacite d'emprunt
|
||||
$CE = 0;
|
||||
if($data['members']){
|
||||
$sommeCredits = 0;
|
||||
$sommeEpargnes = 0;
|
||||
foreach ($data['members']->result() as $user){
|
||||
$sommeCredits += $user->balance_credit;
|
||||
$sommeEpargnes += $user->balance_epargne;
|
||||
}
|
||||
$CE = $sommeEpargnes - $sommeCredits;
|
||||
}
|
||||
|
||||
$data['CE'] = $CE;
|
||||
$data['group_code'] = $group_code;
|
||||
$this->load->view('header_gestion', $data);
|
||||
$this->load->view('nano_credit/users_group_detail');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
public function activate_nano_credit()
|
||||
{
|
||||
if ($this->isLogged()) {
|
||||
|
|
|
@ -463,6 +463,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['id_network'] = $network_id;
|
||||
|
||||
$this->load->view('header_hyp', $data);
|
||||
if ($type == 'transaction')
|
||||
|
|
|
@ -501,5 +501,6 @@ $lang['max_amount_per_month'] = "Maximum amount per month";
|
|||
$lang['define_the_limits'] = "Define the limits";
|
||||
$lang['regulations_updated'] = 'Regulatory limits updated';
|
||||
$lang['refunded_amount'] = "Amount refunded";
|
||||
$lang['remains_to_be_reimbursed'] = "Remainder to reimburse"
|
||||
$lang['remains_to_be_reimbursed'] = "Remainder to reimburse";
|
||||
$lang['end_date'] = "End date";
|
||||
?>
|
||||
|
|
|
@ -513,5 +513,6 @@ $lang['max_amount_per_month'] = "Montant maximum par mois";
|
|||
$lang['define_the_limits'] = "Definir les limites";
|
||||
$lang['regulations_updated'] = 'Limites réglementaires mis à jour';
|
||||
$lang['refunded_amount'] = "Montant remboursé";
|
||||
$lang['remains_to_be_reimbursed'] = "Reste à rembourser"
|
||||
$lang['remains_to_be_reimbursed'] = "Reste à rembourser";
|
||||
$lang['end_date'] = "Date de fin";
|
||||
?>
|
||||
|
|
|
@ -8,14 +8,12 @@
|
|||
<?php
|
||||
|
||||
use Brick\Money\Context\AutoContext;
|
||||
use Brick\Money\Context\CustomContext;
|
||||
use Carbon\Carbon;
|
||||
use Brick\Money\CurrencyConverter;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Math\RoundingMode;
|
||||
use Brick\Money\Money;
|
||||
use Carbon\Carbon;
|
||||
|
||||
function toLocateDate($date, $timezone)
|
||||
{
|
||||
|
@ -276,17 +274,17 @@
|
|||
|
||||
sheet.childNodes[0].childNodes[1].innerHTML = r1 + r2+ sheet.childNodes[0].childNodes[1].innerHTML;
|
||||
},
|
||||
title: 'Etat des soldes - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss")
|
||||
title: "<?= $this->lang->line('balance_statement') ?>"+' - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss")
|
||||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: 'Etat des soldes - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss")
|
||||
title: "<?= $this->lang->line('balance_statement') ?>"+' - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss")
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'portrait',
|
||||
pageSize: 'LEGAL',
|
||||
title: 'Etat des soldes - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss")
|
||||
title: "<?= $this->lang->line('balance_statement') ?>"+' - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss")
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
<div class="content-wrapper">
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
function toLocateDate($date , $timezone){
|
||||
if($date){
|
||||
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||
|
@ -171,6 +173,7 @@
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
|
@ -184,7 +187,7 @@
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=recharge" + "&d=" + debut + "&f=" + fin;
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=recharge" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=recharge" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -194,7 +197,7 @@
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=recharge";
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=recharge";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=recharge";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,14 +6,13 @@
|
|||
<div class="content-wrapper">
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Brick\Money\Context\AutoContext;
|
||||
use Brick\Money\CurrencyConverter;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Math\RoundingMode;
|
||||
use Brick\Money\Money;
|
||||
use Carbon\Carbon;
|
||||
|
||||
// set to whatever your rates are relative to
|
||||
$baseCurrency = 'USD';
|
||||
|
@ -214,6 +213,7 @@
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
|
@ -227,7 +227,7 @@
|
|||
if (category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=refund_history" + "&d=" + debut + "&f=" + fin;
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=refund_history" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=refund_history" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -237,7 +237,7 @@
|
|||
if (category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=refund_history";
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=refund_history";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=refund_history";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
<div class="content-wrapper">
|
||||
<?php
|
||||
use Carbon\Carbon;
|
||||
function toLocateDate($date , $timezone){
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
function toLocateDate($date , $timezone){
|
||||
if($date){
|
||||
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||
$carbon->setTimezone($timezone);
|
||||
|
@ -219,6 +221,7 @@
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
|
@ -232,7 +235,7 @@
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=transaction" + "&d=" + debut + "&f=" + fin;
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=transaction" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=transaction" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -242,7 +245,7 @@
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=transaction";
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=transaction";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=transaction";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ function toLocateDate($date , $timezone){
|
|||
'pageLength',
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'Histrotique des transactions',
|
||||
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
||||
},
|
||||
|
@ -303,7 +303,7 @@ function toLocateDate($date , $timezone){
|
|||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: 'Histrotique des transactions',
|
||||
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
||||
},
|
||||
|
@ -313,7 +313,7 @@ function toLocateDate($date , $timezone){
|
|||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LEGAL',
|
||||
title: 'Histrotique des transactions',
|
||||
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
||||
},
|
||||
|
@ -335,7 +335,8 @@ function toLocateDate($date , $timezone){
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
|
@ -348,7 +349,7 @@ function toLocateDate($date , $timezone){
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=transaction_ilink" + "&d=" + debut + "&f=" + fin;
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=transaction_ilink" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=transaction_ilink" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -358,7 +359,7 @@ function toLocateDate($date , $timezone){
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=transaction_ilink";
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=transaction_ilink";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=transaction_ilink";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,16 +8,14 @@
|
|||
<?php
|
||||
|
||||
use Brick\Money\Context\AutoContext;
|
||||
use Brick\Money\Context\CustomContext;
|
||||
use Carbon\Carbon;
|
||||
use Brick\Money\CurrencyConverter;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Math\RoundingMode;
|
||||
use Brick\Money\Money;
|
||||
use Carbon\Carbon;
|
||||
|
||||
function toLocateDate($date , $timezone){
|
||||
function toLocateDate($date , $timezone){
|
||||
if($date){
|
||||
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', $date, 'UTC');
|
||||
$carbon->setTimezone($timezone);
|
||||
|
@ -217,17 +215,17 @@ use Brick\Money\Money;
|
|||
'pageLength',
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'Histrotique des transferts de commission'
|
||||
title: "<?= $this->lang->line('commission_transfer_historic')?>",
|
||||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: 'Histrotique des transferts de commission'
|
||||
title: "<?= $this->lang->line('commission_transfer_historic')?>",
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LEGAL',
|
||||
title: 'Histrotique des transferts de commission'
|
||||
title: "<?= $this->lang->line('commission_transfer_historic')?>",
|
||||
}
|
||||
]
|
||||
});
|
||||
|
@ -244,6 +242,7 @@ use Brick\Money\Money;
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
|
@ -257,7 +256,7 @@ use Brick\Money\Money;
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=commission_transfer" + "&d=" + debut + "&f=" + fin;
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=commission_transfer" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=commission_transfer" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -267,7 +266,7 @@ use Brick\Money\Money;
|
|||
if(category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=commission_transfer";
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=commission_transfer";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=commission_transfer";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ $context = new \Brick\Money\Context\AutoContext();
|
|||
<div class="col-lg-3 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?php echo $this->lang->line('savings_interest_rates'); ?></h3>
|
||||
<h3 class="box-title"><?php echo $this->lang->line('savings_tax'); ?></h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
|
@ -211,6 +211,10 @@ $context = new \Brick\Money\Context\AutoContext();
|
|||
<h3 class="box-title">
|
||||
<?php echo $this->lang->line('users_groups') ?></h3>
|
||||
<div class="box-tools">
|
||||
<a class="btn btn-success" href="
|
||||
<?php echo current_url() . ($network_id ? '?id=' . $network_id . '&history=savings' : '') ?>">
|
||||
<?php echo $this->lang->line('savings_history'); ?>
|
||||
</a>
|
||||
<a class="btn btn-primary"
|
||||
href="<?php echo current_url() . ($network_id ? '?id=' . $network_id . '&history=nano_credit' : '') ?>">
|
||||
<?php echo $this->lang->line('nano_credit_history'); ?>
|
||||
|
@ -226,96 +230,60 @@ $context = new \Brick\Money\Context\AutoContext();
|
|||
<th>" . $this->lang->line('Nom') . "</th>
|
||||
<th>" . $this->lang->line('creator') . "</th>
|
||||
<th>" . $this->lang->line('credit_limit') . "</th>
|
||||
<th> Sponsor 1</th>
|
||||
<th> Sponsor 2</th>
|
||||
<th> Sponsor 3</th>
|
||||
<th> Status</th>
|
||||
<th>" . $this->lang->line('created_date') . "</th>";
|
||||
?>
|
||||
</tr>
|
||||
<th>" . $this->lang->line('number_of_users') . "</th>
|
||||
<th>" . $this->lang->line('created_date') . "</th>
|
||||
<th> Action </th>";
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($groups != false) {
|
||||
foreach ($groups->result() as $row) {
|
||||
echo "<tr>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($groups != false) {
|
||||
foreach ($groups->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->code_groupe . "</td>
|
||||
<td>" . $row->nom . "</td>
|
||||
<td>" . $row->createur . "</td>
|
||||
<td>" . Money::of(round($row->limite_credit, 2), $row->currency_code, $context)->formatTo('fr_FR') . "</td>
|
||||
<td>" . $row->sponsor1 . "</td>
|
||||
<td>" . $row->sponsor2 . "</td>
|
||||
<td>" . $row->sponsor3 . "</td>";
|
||||
?>
|
||||
<?php
|
||||
if ($row->actif) {
|
||||
?>
|
||||
<td>
|
||||
<span class="label label-success"><?php echo $this->lang->line('Actif') ?></span>
|
||||
</td>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<td>
|
||||
<span class="label label-danger"><?php echo $this->lang->line('Inactif') ?></span>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td> <?= $row->date_creation ?> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
";
|
||||
?>
|
||||
<?php
|
||||
if ($row->actif) {
|
||||
?>
|
||||
<td>
|
||||
<span class="label label-success"><?php echo $this->lang->line('Actif') ?></span>
|
||||
</td>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<td>
|
||||
<span class="label label-danger"><?php echo $this->lang->line('Inactif') ?></span>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<td> <?= $row->nombre_utilisateurs?> </td>
|
||||
|
||||
<td> <?= $row->date_creation ?> </td>
|
||||
<td>
|
||||
<a href="<?php echo current_url().('?id='.$network_id.'&group='.$row->code_groupe)?>" class="btn btn-primary btn-block" <?php if(!$row->id_network) echo "disabled"?> >
|
||||
<b><?php echo $this->lang->line('Voir plus...'); ?></b>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal-limit">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h3 class="modal-title"><?php echo $this->lang->line('set_credit_limit'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="limitForm">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label for="limit_min"
|
||||
class="col-form-label"><?php echo $this->lang->line('minimum_credit_limit'); ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
id="limit_min" name="limit_min"
|
||||
value="<?= $configWallet->limite_credit_min ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="limit_max"
|
||||
class="col-form-label"><?php echo $this->lang->line('maximum_credit_limit'); ?></label>
|
||||
<input type="number" min="0" step=".01" required class="form-control"
|
||||
name="limit_max" id="limit_max"
|
||||
value="<?= $configWallet->limite_credit_max ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left"
|
||||
data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||
<button type="button" id="saveLimit" data-network-id="<?= $network_id ?>"
|
||||
class="btn btn-primary"><?php echo $this->lang->line('Continuer'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<!-- jQuery 3 -->
|
||||
|
@ -360,106 +328,13 @@ $context = new \Brick\Money\Context\AutoContext();
|
|||
moment.updateLocale(moment.locale(format), {invalidDate: ""});
|
||||
|
||||
$('#example1').DataTable({
|
||||
"aaSorting": [[8, "desc"]],
|
||||
"aaSorting": [[6, "desc"]],
|
||||
"columnDefs": [{
|
||||
targets: 8,
|
||||
targets: 6,
|
||||
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
|
||||
}]
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<script>
|
||||
var areaChartData = {
|
||||
labels: <?php echo json_encode($label_months) ?>,
|
||||
datasets: [
|
||||
{
|
||||
label: 'Electronics',
|
||||
fillColor: 'rgba(255, 162, 0, 1)',
|
||||
strokeColor: 'rgba(255, 162, 0, 1)',
|
||||
pointColor: 'rgba(255, 162, 0, 1)',
|
||||
pointStrokeColor: '#ffa200',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data: <?php echo json_encode($depots_data) ?>
|
||||
},
|
||||
{
|
||||
label: 'Digital Goods',
|
||||
fillColor: 'rgba(0, 187, 255, 1)',
|
||||
strokeColor: 'rgba(0, 187, 255, 1)',
|
||||
pointColor: '#00bbff',
|
||||
pointStrokeColor: 'rgba(0, 187, 255, 1)',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||
data: <?php echo json_encode($retraits_data) ?>
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||
if (Pie === '[]') {
|
||||
var select = document.getElementById('chart2');
|
||||
$(select.children).hide();
|
||||
$(select).append("<p>Aucune transaction</p>");
|
||||
} else {
|
||||
Pie = JSON.parse(Pie);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
toastr.options.closeButton = true;
|
||||
toastr.options.closeMethod = 'fadeOut';
|
||||
toastr.options.closeDuration = 5000;
|
||||
toastr.options.closeEasing = 'swing';
|
||||
|
||||
|
||||
$('#saveLimit').click(function () {
|
||||
const limit_min = parseFloat($('#limit_min').val());
|
||||
const limit_max = parseFloat($('#limit_max').val());
|
||||
const network_id = $(this).data('network-id');
|
||||
|
||||
if (limit_max > limit_min) {
|
||||
if ($('#limitForm')[0].checkValidity()) {
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo base_url('index.php/Hyperviseur_dash/saveCreditLimit')?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
"limit_min": limit_min,
|
||||
"limit_max": limit_max,
|
||||
"id_network": network_id,
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == '200') {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: "<?php echo $this->lang->line('activate_nano_credit')?>",
|
||||
text: "<?php echo $this->lang->line('informations_updated')?>",
|
||||
timer: 3000
|
||||
}).then(() => {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
} else {
|
||||
toastr.error("<?php echo $this->lang->line('error_message')?>", "<?php echo $this->lang->line('request_error')?>");
|
||||
}
|
||||
},
|
||||
|
||||
error: function (resultat, statut, error) {
|
||||
console.log(resultat + " " + error);
|
||||
toastr.error("<?php echo $this->lang->line('error_message')?>", "<?php echo $this->lang->line('request_error')?>");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
$('#limitForm')[0].reportValidity();
|
||||
}
|
||||
} else {
|
||||
toastr.error("<?php echo $this->lang->line('credit_limit_rule')?>", "<?php echo $this->lang->line('request_error')?>");
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- Page script -->
|
||||
<!--<script src="--><?php //echo base_url('dist/js/custom.js') ?><!--"></script>-->
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<th>Retrait en cash</th>
|
||||
<th>Date de la demande</th>
|
||||
<th>Date de remboursement</th>
|
||||
<th align='center'>Date</th>
|
||||
<th align='center'><?php echo $this->lang->line('created_date') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -246,12 +246,12 @@
|
|||
'pageLength',
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'Histrotique des demandes de credit',
|
||||
title: "<?= $this->lang->line('nano_credit_history') ?>",
|
||||
customizeData: function (data) {
|
||||
for (var i = 0; i < data.body.length; i++) {
|
||||
for (var j = 0; j < data.body[i].length; j++) {
|
||||
// data.body[i][j] = '\u200C' + data.body[i][j];
|
||||
if ([4, 5, 6].includes(j)) {
|
||||
if ([4, 5, 6, 7].includes(j)) {
|
||||
// Get the value and strip the non numeric characters
|
||||
// var value = $(this).text();
|
||||
value = data.body[i][j].replace(',', ".")
|
||||
|
@ -264,14 +264,14 @@
|
|||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: 'Histrotique des demandes de credit',
|
||||
title: "<?= $this->lang->line('nano_credit_history') ?>",
|
||||
trim: false
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LEGAL',
|
||||
title: 'Histrotique des demandes de credit',
|
||||
title: "<?= $this->lang->line('nano_credit_history') ?>",
|
||||
trim: false
|
||||
},
|
||||
// 'colvis'
|
||||
|
@ -290,6 +290,7 @@
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
|
@ -308,7 +309,7 @@
|
|||
|
||||
}
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=nano_credit" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=nano_credit" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -322,7 +323,7 @@
|
|||
window.location = "<?php echo current_url()?>" + "?history=nano_credit";
|
||||
}
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=nano_credit";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=nano_credit";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
<?php
|
||||
|
||||
use Brick\Money\Context\AutoContext;
|
||||
use Carbon\Carbon;
|
||||
use Brick\Money\CurrencyConverter;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
||||
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||
use Brick\Math\RoundingMode;
|
||||
use Brick\Money\Money;
|
||||
use Carbon\Carbon;
|
||||
|
||||
function toLocateDate($date, $timezone)
|
||||
{
|
||||
|
@ -133,9 +132,9 @@
|
|||
<th><?php echo $this->lang->line('interest') ?></th>
|
||||
<th><?php echo $this->lang->line('tax') ?></th>
|
||||
<th><?php echo $this->lang->line('issuer_id') ?></th>
|
||||
<th>Date de creation</th>
|
||||
<th><?php echo $this->lang->line('created_date') ?></th>
|
||||
<th><?php echo $this->lang->line('cassation_date') ?></th>
|
||||
<th align='center'>Date de fin</th>
|
||||
<th align='center'><?php echo $this->lang->line('end_date') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -235,7 +234,7 @@
|
|||
'pageLength',
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'Historique des épargnes',
|
||||
title: "<?= $this->lang->line('savings_history') ?>",
|
||||
customizeData: function (data) {
|
||||
for (var i = 0; i < data.body.length; i++) {
|
||||
for (var j = 0; j < data.body[i].length; j++) {
|
||||
|
@ -253,14 +252,14 @@
|
|||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: 'Historique des épargnes',
|
||||
title: "<?= $this->lang->line('savings_history') ?>",
|
||||
trim: false
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
orientation: 'landscape',
|
||||
pageSize: 'LEGAL',
|
||||
title: 'Historique des épargnes',
|
||||
title: "<?= $this->lang->line('savings_history') ?>",
|
||||
trim: false
|
||||
},
|
||||
// 'colvis'
|
||||
|
@ -279,6 +278,7 @@
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const category = $('#picker').data('category');
|
||||
const id_network = "<?= $id_network?>";
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
|
@ -292,7 +292,7 @@
|
|||
if (category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=savings" + "&d=" + debut + "&f=" + fin;
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=savings" + "&d=" + debut + "&f=" + fin;
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=savings" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
|
||||
|
@ -302,7 +302,7 @@
|
|||
if (category)
|
||||
window.location = "<?php echo current_url()?>" + "?history=savings";
|
||||
else
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=savings";
|
||||
window.location = "<?php echo current_url()?>" + "?id="+id_network+"&history=savings";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue