From a973c5f13b4ef96a1a9749d92af36c1d61375959 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Mon, 25 Jan 2021 17:28:58 +0100 Subject: [PATCH] + Update Comission transfers history --- application/controllers/Hyperviseur_dash.php | 2 +- application/models/Wallet_model.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 9974adb0..0224188e 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -534,7 +534,7 @@ class Hyperviseur_dash extends CI_Controller }else if ($type == 'deleted_transactions') $data['transactions'] = $this->user_model->getDeletedTransactions($startDate, $endDate, $this->session->userdata('network_id')); else if ($type == 'commission_transfer') - $data['transactions'] = $this->wallet_model->getCommissionTransfers($startDate, $endDate, $this->session->userdata('member_code')); + $data['transactions'] = $this->wallet_model->getCommissionTransfersByNetwork($startDate, $endDate, $this->session->userdata('network_id')); else if ($type == 'balance_statement') $data['wallets'] = $this->user_model->getInfosWalletAgentForHyper($this->session->userdata('network_id')); else if ($type == 'refund_history') diff --git a/application/models/Wallet_model.php b/application/models/Wallet_model.php index 05536eb5..decf0f4e 100644 --- a/application/models/Wallet_model.php +++ b/application/models/Wallet_model.php @@ -760,6 +760,18 @@ class Wallet_model extends CI_Model } } + public function getCommissionTransfersByNetwork($debut , $fin , $id_network){ + $chain = $debut ? " AND date BETWEEN '".$debut."' AND '".$fin."'" : ""; + $query = $this->db->query("SELECT * + FROM infos_transferts_commission + WHERE `network_id`='".$id_network."'".$chain); + if($query->num_rows()>0){ + return $query; + }else{ + return false; + } + } + public function getIlinkTransactionsSup($debut , $fin , $codeMembre){ $chain = $debut ? " AND date BETWEEN '".$debut."' AND '".$fin."'" : ""; $query = $this->db->query("SELECT *