backoffice/application/views/nano_credit/gestion_nano_credit_admin.php

341 lines
12 KiB
PHP
Raw Normal View History

2020-08-10 18:11:05 +00:00
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
<link rel="stylesheet"
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
<link rel="stylesheet"
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
<?php
use Brick\Money\Money;
$context = new \Brick\Money\Context\AutoContext();
?>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<?php echo $this->lang->line('nano_credit_management') . ' ' . $network . ' - ' . $country; ?>
</h1>
<?php
$site_url = base_url();
if ($alert == "ok") {
if (!$success == "ok") {
?>
<div class='alert alert-danger alert-dismissible col-xs-6'>
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
<h4><i class='icon fa fa-ban'></i> Erreur!</h4>
<?php echo $message; ?>
</div>
<?php
} else {
?>
<div class="alert alert-success alert-dismissible col-xs-6">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4><i class="icon fa fa-check"></i> Success!</h4>
<?php echo $message; ?>
</div>
<?php
}
}
?>
</section>
<section class="content">
<div class="row">
<div class="col-lg-4 col-xs-6">
<div class="small-box bg-green-active">
<div class="inner">
<h3><?php echo Money::of(round($configWallet->limite_credit_min, 2), $currency_code, $context)->formatTo('fr_FR') ?></h3>
<p><?php echo $this->lang->line('minimum_credit_limit') ?></p>
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
</div>
</div>
<div class="col-lg-4 col-xs-6">
<div class="small-box bg-red-active">
<div class="inner">
<h3><?php echo Money::of(round($configWallet->limite_credit_max, 2), $currency_code, $context)->formatTo('fr_FR'); ?></h3>
<p><?php echo $this->lang->line('maximum_credit_limit') ?></p>
</div>
<div class="icon">
<i class="ion ion-cash"></i>
</div>
</div>
</div>
</div>
2020-08-10 18:11:05 +00:00
<div class="row centered"
">
<div class="col-lg-3 col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php echo $this->lang->line('nano_credit_interest_rates'); ?></h3>
</div>
<div class="box-body table-responsive" style="overflow-x:auto;">
<table class="table table-hover">
<thead>
<tr>
<th><?php echo $this->lang->line('interest_rates_period'); ?> </th>
<th><?php echo $this->lang->line('rate') . ' (%)'; ?> </th>
</tr>
</thead>
<tbody>
<?php
if ($rates_nano_credit != false) {
foreach ($rates_nano_credit->result() as $row) {
echo "<tr>
<td>" . $row->duree_mois . "</td>
<td>" . $row->taux . "</td>" . '
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-3 col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php echo $this->lang->line('transaction_nano_credit'); ?></h3>
</div>
<div class="box-body table-responsive" style="overflow-x:auto;">
<table class="table table-hover">
<thead>
<tr>
<th><?php echo $this->lang->line('Nom'); ?> </th>
<th>Type</th>
<th>Valeur</th>
</tr>
</thead>
<tbody>
<?php
if ($taxes_nano_credit != false) {
foreach ($taxes_nano_credit->result() as $row) {
echo "<tr>
<td>" . $row->nom . "</td>
<td>" . $row->type . "</td>
<td>" . $row->valeur . "</td>" . '
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div>
2020-08-10 18:11:05 +00:00
</div>
<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>
</div>
<div class="box-body table-responsive" style="overflow-x:auto;">
<table class="table table-hover">
<thead>
<tr>
<th><?php echo $this->lang->line('interest_rates_period'); ?> </th>
<th><?php echo $this->lang->line('rate') . ' (%)'; ?> </th>
</tr>
</thead>
<tbody>
<?php
if ($rates_epargne != false) {
foreach ($rates_epargne->result() as $row) {
echo "<tr>
<td>" . $row->duree_mois . "</td>
<td>" . $row->taux . "</td>" . '
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<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_tax'); ?></h3>
</div>
<div class="box-body table-responsive" style="overflow-x:auto;">
<table class="table table-hover">
<thead>
<tr>
<th><?php echo $this->lang->line('Nom'); ?> </th>
<th>Type</th>
<th>Valeur</th>
</tr>
</thead>
<tbody>
<?php
if ($taxes_epargne != false) {
foreach ($taxes_epargne->result() as $row) {
echo "<tr>
<td>" . $row->nom . "</td>
<td>" . $row->type . "</td>
<td>" . $row->valeur . "</td>" . '
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<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'); ?>
</a>
</div>
</div>
<div class="box-body" style="overflow-x:auto;">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<?php
echo "<th>" . $this->lang->line('group_code') . "</th>
2020-08-10 18:11:05 +00:00
<th>" . $this->lang->line('Nom') . "</th>
<th>" . $this->lang->line('creator') . "</th>
<th>" . $this->lang->line('credit_limit') . "</th>
<th> Status</th>
<th>" . $this->lang->line('number_of_users') . "</th>
<th>" . $this->lang->line('created_date') . "</th>
<th> Action </th>";
?>
</tr>
2020-08-10 18:11:05 +00:00
</thead>
<tbody>
<?php
if ($groups != false) {
foreach ($groups->result() as $row) {
echo "<tr>
2020-08-10 18:11:05 +00:00
<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>
";
?>
<?php
if ($row->actif) {
2020-08-10 18:11:05 +00:00
?>
<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>
2020-08-10 18:11:05 +00:00
<?php
}
?>
<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>
2020-08-10 18:11:05 +00:00
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- jQuery 3 -->
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
<!-- Bootstrap 3.3.7 -->
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
<!-- DataTables -->
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
<!-- Slimscroll -->
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
<!-- FastClick -->
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
<!-- AdminLTE App -->
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
<script src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
<!-- ChartJS -->
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
<script src="<?php echo base_url('bower_components/toastr/toastr.js') ?>"></script>
<script src="<?php echo base_url('dist/js/sweetalert2.js') ?>"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment-with-locales.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.20/dataRender/datetime.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.print.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.colVis.min.js"></script>
<script>
$(function () {
const lang = "<?php echo $this->session->userdata('site_lang') ?>";
const format = lang === 'french' ? 'fr' : 'en';
moment.updateLocale(moment.locale(format), {invalidDate: ""});
$('#example1').DataTable({
"aaSorting": [[6, "desc"]],
2020-08-10 18:11:05 +00:00
"columnDefs": [{
targets: 6,
2020-08-10 18:11:05 +00:00
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
}]
});
})
</script>
<!-- Page script -->
<!--<script src="--><?php //echo base_url('dist/js/custom.js') ?><!--"></script>-->