+ Add more informations on Historic of transactions
This commit is contained in:
parent
a44199c016
commit
2aa98a8316
|
@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
| a PHP script and you can easily do that on your own.
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest';
|
||||
$config['base_url'] = 'https://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -77,7 +77,7 @@ $db['default'] = array(
|
|||
'dsn' => '',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'password' => 'vps@2017GA',
|
||||
'database' => 'iLink_test2',
|
||||
'dbdriver' => 'mysqli',
|
||||
'dbprefix' => '',
|
||||
|
|
|
@ -1546,55 +1546,70 @@ class Gestion extends CI_Controller
|
|||
} else {
|
||||
|
||||
if ($this->input->get('id')) {
|
||||
$network_id = $this->input->get('id');
|
||||
$taux = $this->user_model->getTaux($network_id);
|
||||
if ($taux != null) {
|
||||
$taux = $this->user_model->getTaux($network_id)->first_row();
|
||||
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
||||
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
||||
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
||||
$data['taux_ag_d'] = $taux->taux_com_ag_depot;
|
||||
$data['taux_sup_r'] = $taux->taux_com_sup_retrait;
|
||||
$data['taux_sup_d'] = $taux->taux_com_sup_depot;
|
||||
$data['taux_bq_d'] = $taux->part_banque_depot;
|
||||
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
||||
$data['frais_d'] = $taux->frais_min_banque_depot;
|
||||
$data['transactions'] = $this->user_model->getTransactions($network_id);
|
||||
$totalCommissionBanque = 0;
|
||||
if($data['transactions']){
|
||||
foreach ($data['transactions']->result() as $row) {
|
||||
$totalCommissionBanque += $row->commission_banque;
|
||||
}
|
||||
}
|
||||
$data['totalCommissionBanque'] = $totalCommissionBanque ;
|
||||
} else {
|
||||
|
||||
$data["taux_client_r"] = "N/A";
|
||||
$data["taux_client_d"] = "N/A";
|
||||
$data["taux_ag_r"] = "N/A";
|
||||
$data["taux_ag_d"] = "N/A";
|
||||
$data["taux_sup_r"] = "N/A";
|
||||
$data["taux_sup_d"] = "N/A";
|
||||
$data['taux_bq_d'] = "N/A";
|
||||
$data['taux_bq_r'] = "N/A";
|
||||
$data['frais_d'] = "N/A";
|
||||
$data['totalCommissionBanque'] = "N/A";
|
||||
$data["transactions"] = false;
|
||||
$network_id = $this->input->get('id');
|
||||
if($this->input->get('history')){
|
||||
if($this->input->get('d') & $this->input->get('f')){
|
||||
$this->historique($network_id,$this->input->get('d'),$this->input->get('f'));
|
||||
}else{
|
||||
$this->historique($network_id,null,null);
|
||||
}
|
||||
}else{
|
||||
$taux = $this->user_model->getTaux($network_id);
|
||||
if ($taux != null) {
|
||||
$taux = $this->user_model->getTaux($network_id)->first_row();
|
||||
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
||||
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
||||
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
||||
$data['taux_ag_d'] = $taux->taux_com_ag_depot;
|
||||
$data['taux_sup_r'] = $taux->taux_com_sup_retrait;
|
||||
$data['taux_sup_d'] = $taux->taux_com_sup_depot;
|
||||
$data['taux_bq_d'] = $taux->part_banque_depot;
|
||||
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
||||
$data['frais_d'] = $taux->frais_min_banque_depot;
|
||||
$data['transactions'] = $this->user_model->getTransactions($network_id);
|
||||
$totalCommissionBanque = 0;
|
||||
if($data['transactions']){
|
||||
foreach ($data['transactions']->result() as $row) {
|
||||
$totalCommissionBanque += $row->commission_banque;
|
||||
}
|
||||
}
|
||||
$data['totalCommissionBanque'] = $totalCommissionBanque ;
|
||||
} else {
|
||||
|
||||
$data["taux_client_r"] = "N/A";
|
||||
$data["taux_client_d"] = "N/A";
|
||||
$data["taux_ag_r"] = "N/A";
|
||||
$data["taux_ag_d"] = "N/A";
|
||||
$data["taux_sup_r"] = "N/A";
|
||||
$data["taux_sup_d"] = "N/A";
|
||||
$data['taux_bq_d'] = "N/A";
|
||||
$data['taux_bq_r'] = "N/A";
|
||||
$data['frais_d'] = "N/A";
|
||||
$data['totalCommissionBanque'] = "N/A";
|
||||
$data["transactions"] = false;
|
||||
}
|
||||
|
||||
$hyper = $this->user_model->getNetworkHyper($network_id)->first_row();
|
||||
$data['walletHyper'] = $this->user_model->getWallet($hyper->agent_id);
|
||||
$data['network_id'] = $network_id;
|
||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||
if($networkDetails){
|
||||
$data['network'] = $networkDetails->first_row()->network;
|
||||
$data['country'] = $networkDetails->first_row()->country;
|
||||
}
|
||||
// $data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($network_id);
|
||||
$data['active'] = "wallet";
|
||||
$data['alert'] = "";
|
||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||
|
||||
$this->load->view('header_gestion', $data);
|
||||
$this->load->view('gestion_wallet');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
$hyper = $this->user_model->getNetworkHyper($network_id)->first_row();
|
||||
$data['walletHyper'] = $this->user_model->getWallet($hyper->agent_id);
|
||||
$data['network_id'] = $network_id;
|
||||
$data['network'] = $this->user_model->getNetworkName($network_id);
|
||||
// $data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($network_id);
|
||||
$data['active'] = "wallet";
|
||||
$data['alert'] = "";
|
||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||
|
||||
$this->load->view('header_gestion', $data);
|
||||
$this->load->view('gestion_wallet');
|
||||
$this->load->view('footer');
|
||||
} else {
|
||||
|
||||
$data['active'] = "wallet";
|
||||
|
@ -1605,7 +1620,6 @@ class Gestion extends CI_Controller
|
|||
$this->load->view('gestion_wallets');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1701,4 +1715,39 @@ class Gestion extends CI_Controller
|
|||
|
||||
}
|
||||
|
||||
private function historique($network_id ,$startDate ,$endDate)
|
||||
{
|
||||
|
||||
$transactions = array();
|
||||
$res= $this->user_model->getTransactions($network_id);
|
||||
if($res)
|
||||
$transactions = $res->result();
|
||||
|
||||
if($startDate!=null & $endDate != null){
|
||||
if ($transactions){
|
||||
$transactions = array_filter($transactions, function ($trans) use ($endDate ,$startDate){
|
||||
$date = strtotime($trans->date_created);
|
||||
return $date >= strtotime($startDate) && $date <= strtotime($endDate) ;
|
||||
});
|
||||
}
|
||||
}
|
||||
$data['startDate'] = $startDate;
|
||||
$data['endDate'] = $endDate;
|
||||
$data['transactions'] = $transactions;
|
||||
$data['active'] = "wallet";
|
||||
$data['alert'] = "";
|
||||
$data['networks'] = $this->user_model->getAllActivatedNetworks();
|
||||
$data['game_pays'] = $this->user_model->getGameCountry();
|
||||
$data['networks'] = $this->user_model->getAllActivatedNetworks();
|
||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||
if($networkDetails){
|
||||
$data['network'] = $networkDetails->first_row()->network;
|
||||
$data['country'] = $networkDetails->first_row()->country;
|
||||
}
|
||||
$this->load->view('header_gestion', $data);
|
||||
$this->load->view('historique_transactions');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -187,36 +187,52 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['message'] = "Login first!";
|
||||
$this->load->view('login', $data);
|
||||
} else {
|
||||
if($this->input->post('super'))
|
||||
{
|
||||
//$this->session->set_userdata('current_demande_ville', $this->input->post('ville'));
|
||||
if($this->input->post('super') or $this->input->get("u") !== null)
|
||||
{
|
||||
$super = $this->input->post('super');
|
||||
$this->session->set_userdata("current_super_demande", $this->input->post('super'));
|
||||
if($this->input->post('super') == null){
|
||||
$super = $this->input->get("u");
|
||||
$this->session->set_userdata("current_super_demande", $super);
|
||||
}
|
||||
|
||||
$ville = $this->session->userdata('ville');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$this->input->post('super'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$this->input->post('super'));
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($this->session->userdata('member_code'),$this->input->post('super'));
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenByVille($this->session->userdata('member_code'),$this->input->post('super'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$debut ="";
|
||||
$fin = "";
|
||||
if($this->input->get("d") !== null){
|
||||
|
||||
$debut = $this->input->get("d");
|
||||
$fin = $this->input->get("f");
|
||||
}else{
|
||||
$fin = date('Y-m-d H:i:s');
|
||||
$debut = Date('Y-m-d H:i:s', strtotime("-3 days"));
|
||||
}
|
||||
|
||||
$ville = $this->session->userdata('ville');
|
||||
$data['active'] = "demandes";
|
||||
$data['type'] = $this->lang->line('crédits');
|
||||
$data['alert'] = "";
|
||||
$data['token'] = $this->session->userdata('token');
|
||||
$data['email'] = $this->session->userdata('email');
|
||||
$data['firstname'] = $this->session->userdata('firstname');
|
||||
$data['lastname'] = $this->session->userdata('lastname');
|
||||
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||
$data['phone'] = $this->session->userdata('phone');
|
||||
$data['adresse'] = $this->session->userdata('adresse');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'],$this->session->userdata('current_pays'));
|
||||
$data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||
$data['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($debut,$fin,$this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$super);
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($debut,$fin,$this->session->userdata('member_code'),$this->session->userdata('current_demande_ville'),$super);
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($debut,$fin,$this->session->userdata('member_code'),$super);
|
||||
$data['temp_moyen'] = $this->user_model->getTempsMoyenByVille($this->session->userdata('member_code'),$super,$this->session->userdata('network'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
$this->load->view('demande');
|
||||
$this->load->view('footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addvilles(){
|
||||
|
|
|
@ -231,4 +231,6 @@ $lang['Taux de commission agent géolocalisé sur dépot'] = 'Geolocated agent c
|
|||
$lang['Taux de commission superviseur sur retrait'] = 'Supervisor commission rate on withdrawal';
|
||||
$lang['Taux de commission superviseur sur dépot'] = 'Supervisor commission rate on deposit';
|
||||
$lang['Suppression du wallet'] = 'Removal of the wallet';
|
||||
|
||||
$lang['Aucune demande'] = 'No transactions';
|
||||
?>
|
||||
|
|
|
@ -254,4 +254,6 @@
|
|||
$lang['Commissions Hyperviseur'] = 'Commissions Hyperviseur';
|
||||
$lang['Commissions Superviseurs'] = 'Commissions Superviseurs';
|
||||
$lang['Commissions Agents']= 'Commissions Agents';
|
||||
|
||||
$lang['Aucune transaction'] = 'Aucune transaction';
|
||||
?>
|
||||
|
|
|
@ -515,32 +515,33 @@ class User_model extends CI_Model
|
|||
|
||||
}
|
||||
|
||||
public function getRangeASCDemandesByNetwork($codeParrain,$ville,$super){
|
||||
public function getRangeASCDemandesByNetwork($debut, $fin, $codeParrain, $ville, $super){
|
||||
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.ref_operateur AS ref_operateur, d.montant AS montant, d.montant_allowed AS montant_allowed,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
(SELECT TIMESTAMPDIFF(SECOND,dateAjout,dateModif)
|
||||
FROM demande_credit AS req_im
|
||||
WHERE req_im.statut=1 AND req_im.id=d.id) AS temps
|
||||
FROM demande_credit AS d
|
||||
WHERE statut=1 AND d.reseau='".$ville."'
|
||||
WHERE statut=1 AND d.reseau='".$ville."' AND date_creation BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.ref_operateur AS ref_operateur, d.montant AS montant, d.montant_allowed AS montant_allowed,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
}else{
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut=1 AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$super."'
|
||||
AND dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY temps
|
||||
LIMIT 5");
|
||||
}
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getRangeASCDemandesAd($codeParrain){
|
||||
|
||||
|
@ -616,32 +617,33 @@ class User_model extends CI_Model
|
|||
|
||||
}
|
||||
|
||||
public function getRangeDESCDemandesBynetwork($codeParrain,$ville,$super){
|
||||
public function getRangeDESCDemandesBynetwork($debut, $fin, $codeParrain, $ville, $super){
|
||||
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.ref_operateur AS ref_operateur, d.montant AS montant, d.montant_allowed AS montant_allowed,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
if($codeParrain=='all'){
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,
|
||||
(SELECT TIMESTAMPDIFF(SECOND,dateAjout,dateModif)
|
||||
FROM demande_credit AS req_im
|
||||
WHERE req_im.statut=1 AND req_im.id=d.id) AS temps
|
||||
FROM demande_credit AS d
|
||||
WHERE statut=1 AND d.reseau='".$ville."'
|
||||
WHERE statut=1 AND d.reseau='".$ville."' AND date_creation BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
}else{
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.ref_operateur AS ref_operateur, d.montant AS montant, d.montant_allowed AS montant_allowed,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
}else{
|
||||
$query = $this->db->query("SELECT d.codeMembre AS emetteur, d.codeParrain AS superviseur, d.montant AS montant,d.dateAjout AS dateA,d.dateModif AS dateM,d.temps AS temps
|
||||
FROM info_demandeCredits AS d
|
||||
WHERE statut=1 AND d.codeParrain='".$codeParrain."' AND d.codeMembre='".$super."'
|
||||
AND dateAjout BETWEEN '".$debut."' AND '".$fin."'
|
||||
ORDER BY temps DESC
|
||||
LIMIT 5");
|
||||
}
|
||||
}
|
||||
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if($query->num_rows()>0){
|
||||
return $query;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function getRangeDESCDemandesAd($codeParrain){
|
||||
|
||||
|
@ -1837,19 +1839,17 @@ class User_model extends CI_Model
|
|||
}
|
||||
}
|
||||
|
||||
public function getNetworkName($id_network){
|
||||
$query = $this->db->query("SELECT networks.name
|
||||
FROM networks
|
||||
WHERE `id`=".$id_network);
|
||||
public function getNetworkDetails($id_network){
|
||||
$query = $this->db->query("SELECT n.name AS network , c.name AS country FROM networks n INNER JOIN countries c ON n.country_id = c.id WHERE n.id = ".$id_network);
|
||||
if($query->num_rows()>0){
|
||||
return $query->row()->name;
|
||||
return $query;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getTransactions($id_network){
|
||||
$query = $this->db->query("SELECT id,type_transac , commission_banque
|
||||
$query = $this->db->query("SELECT *
|
||||
FROM infos_transaction
|
||||
WHERE `network_id`=".$id_network);
|
||||
if($query->num_rows()>0){
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -139,7 +139,7 @@ if ($transactions != false) {
|
|||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
Gestion des wallets <?php echo $network; ?>
|
||||
Gestion des wallets <?php echo $network .' - '.$country; ?>
|
||||
</h1>
|
||||
<?php
|
||||
$site_url = base_url();
|
||||
|
@ -305,7 +305,7 @@ if ($transactions != false) {
|
|||
<h3 class="box-title">Retraits et dépots des 12 derniers
|
||||
mois<?php //echo $this->lang->line('Souscription des 12 derniers mois'); ?></h3>
|
||||
<div class="box-tools">
|
||||
<a class="btn btn-primary" href=""> Historique </a>
|
||||
<a class="btn btn-primary" href="<?php echo current_url().($network_id ? '?id='.$network_id . '&history=true' : '')?>"> Historique </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
|
|
@ -212,7 +212,6 @@
|
|||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#unvalidated').DataTable();
|
||||
$('#validated').DataTable();
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
<!-- DataTables -->
|
||||
<link rel="stylesheet"
|
||||
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
|
||||
<h1>
|
||||
<?php echo $this->lang->line('Gestion des wallets') . ' '.$network.' - '.$country; ?>
|
||||
<!-- <input type="button" class="btn btn-primary pull-right" id="Bactiver"-->
|
||||
<!-- value="Activer/Désactiver le(s) réseau(x)" />-->
|
||||
</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">×</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-md-4 col-sm-6 col-xs-12">
|
||||
<div class="info-box">
|
||||
<!-- <span id="change-periode" style="cursor: pointer;" class="info-box-icon bg-aqua"><i class="ion ion-android-arrow-right"></i></span>-->
|
||||
<span class="info-box-icon bg-aqua"><i class="ion ion-android-arrow-down"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Période </span>
|
||||
<span class="info-box-number">
|
||||
<input
|
||||
style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%"
|
||||
type="text" name="daterange"
|
||||
value="<?php echo ($startDate!=null & $endDate != null) ? $startDate. ' - '.$endDate : ''?>"/>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Historique des transactions</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<?php
|
||||
$numrows = sizeof($transactions);
|
||||
$num = 0;
|
||||
if ($numrows > 0) {
|
||||
$fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
|
||||
?>
|
||||
|
||||
<table id="transactions" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align='center'>ID</th>
|
||||
<th align='center'> Type</th>
|
||||
<th> Montant</th>
|
||||
<th>Commission de la banque</th>
|
||||
<th>Commission de l'hyperviseur</th>
|
||||
<th>Commission du superviseur</th>
|
||||
<th>Commission de l'agent</th>
|
||||
<th align='center'>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($transactions as $row) {
|
||||
$num++;
|
||||
echo "<tr>
|
||||
<td align='center' >$row->id</td>
|
||||
<td>".strtoupper($row->type_transac)."</td>
|
||||
<td>".$fmt->format($row->montant)."</td>
|
||||
<td>".$fmt->format( $row->commission_banque)."</td>
|
||||
<td>".$fmt->format( $row->commission_hyp)."</td>
|
||||
<td>".$fmt->format( $row->commission_sup)."</td>
|
||||
<td>".$fmt->format( $row->commission_ag)."</td>
|
||||
<td> $row->date_created</td>
|
||||
</tr>";
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
echo $this->lang->line('Aucune transaction');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</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 type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#transactions').DataTable();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var startDate;
|
||||
var endDate;
|
||||
|
||||
$(function () {
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
opens: 'left',
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'DD-MM-YYYY',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
}, function (start, end, label) {
|
||||
const debut = start.format('DD-MM-YYYY');
|
||||
const fin = end.format('DD-MM-YYYY');
|
||||
window.location = "<?php echo current_url()?>" + "?id=118&history=true" + "&d=" + debut + "&f=" + fin;
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue