diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php
index d0a60954..c00bf478 100755
--- a/application/controllers/Hyperviseur_dash.php
+++ b/application/controllers/Hyperviseur_dash.php
@@ -1030,6 +1030,7 @@ class Hyperviseur_dash extends CI_Controller
$result = $res->result();
foreach ($result as $network){
$res = $this->wallet_model->getSharingRate($network->id , $data['idConfig']);
+ $res2 = $this->wallet_model->getTransmittingNetwork($network->id , $data['idConfig']);
if($res){
$network->rate = $res->first_row()->taux_partage;
$network->url = $res->first_row()->url;
@@ -1037,6 +1038,7 @@ class Hyperviseur_dash extends CI_Controller
$network->rate = null;
$network->url = null;
}
+ $network->is_transmitting_network = $res2 ? true : false;
$data['networks'][] = $network;
}
}
@@ -1051,11 +1053,11 @@ class Hyperviseur_dash extends CI_Controller
$result = $res->result();
foreach ($result as $country){
$res = $this->wallet_model->countPayingNetworks($country->id, $data['idConfig']);
- if($res){
- $country->total = $res->first_row()->total;
- }else{
- $country->total = null;
- }
+ $res2 = $this->wallet_model->countTransmittiongNetworks($country->id, $data['idConfig']);
+
+ $country->total_paying = $res ? $res->first_row()->total : null ;
+ $country->total_transmitting = $res ? $res2->first_row()->total : null ;
+
$data['countries'][] = $country;
}
}
@@ -1605,6 +1607,46 @@ class Hyperviseur_dash extends CI_Controller
}
}
}
+
+ public function active_transmitting_network()
+ {
+ if ($this->isLogged()) {
+ if (isset($_POST)) {
+ $data = array(
+ 'id_configWallet' => $this->input->post('config_id'),
+ 'id_network' => $this->input->post('network_id')
+ );
+
+ $query = $this->db->insert('transmitting_networks', $data);
+
+ if ($query) {
+ echo json_encode("200");
+ } else {
+ echo json_encode("500");
+ }
+ }
+ }
+ }
+
+ public function deactive_transmitting_network()
+ {
+ if ($this->isLogged()) {
+ if (isset($_POST)) {
+ $data = array(
+ 'id_configWallet' => $this->input->post('config_id'),
+ 'id_network' => $this->input->post('network_id')
+ );
+
+ $query = $this->db->delete('transmitting_networks', $data);
+
+ if ($query) {
+ echo json_encode("200");
+ } else {
+ echo json_encode("500");
+ }
+ }
+ }
+ }
}
class Operation
diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php
index d19b1028..6b088b58 100755
--- a/application/language/english/message_lang.php
+++ b/application/language/english/message_lang.php
@@ -391,7 +391,7 @@ $lang['ilink_third_rule'] = 'The sum of the distribution of commission on cash d
$lang['ilink_fourth_rule'] = 'The sum of the distribution of commission on withdrawal operation in the card must be equal to 100%';
$lang['ilink_fifth_rule'] = 'The sum of the distribution of commission on withdrawal operation in the card for iLink user must be equal to 100%';
$lang['ilink_sixth_rule'] = 'The sum of the commission distributions on the operation of sending a wallet to the iLink user card must be equal to 100%';
-$lang['edit_paying_networks'] = 'Configuration of paying networks';
+$lang['edit_paying_and_transmitting_networks'] = 'Configuration of paying and issuing networks';
$lang['configure'] = 'Configure';
$lang['configure_share_rate'] = 'Configure the sharing rate';
$lang['share_rate'] = 'Sharing rate';
@@ -530,4 +530,8 @@ $lang['bank_deactivated'] = "The bank has been deactivated";
$lang['bank_deactivation'] = "Deactivation of the bank";
$lang['modify_bank'] = "Modify the bank";
$lang['assign_bank_to_country'] = "Assign a bank to a country";
+$lang['transmitting_networks'] = "Transmitting networks";
+$lang['transmitter_network_activated'] = "Transmitter network activated";
+$lang['transmitter_network_deactivated'] = "Transmitter network deactivated";
+$lang['paying_networks'] = 'Paying networks';
?>
diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php
index 9487e363..c7d9349e 100755
--- a/application/language/french/message_lang.php
+++ b/application/language/french/message_lang.php
@@ -403,7 +403,7 @@ $lang['ilink_third_rule'] = 'La somme des répartitions de commission sur opéra
$lang['ilink_fourth_rule'] = 'La somme des répartitions de commission sur opération de retrait dans la carte doit etre égale à 100 %';
$lang['ilink_fifth_rule'] = 'La somme des répartitions de commission sur opération de retrait dans la carte pour utilisateur iLink doit etre égale à 100 %';
$lang['ilink_sixth_rule'] = 'La somme des répartitions de commission sur opération d\'envoi de wallet vers la carte pour utilisateur iLink doit etre égale à 100 %';
-$lang['edit_paying_networks'] = 'Configuration des réseaux payeurs';
+$lang['edit_paying_and_transmitting_networks'] = 'Configuration des réseaux payeurs et emetteurs';
$lang['configure'] = 'Configurer';
$lang['configure_share_rate'] = 'Configurer le taux de partage';
$lang['share_rate'] = 'Taux de partage';
@@ -542,5 +542,9 @@ $lang['bank_deactivated'] = "La banque a été désactivée";
$lang['bank_deactivation'] = "Désactivation de la banque";
$lang['modify_bank'] = "Modifier la banque";
$lang['assign_bank_to_country'] = "Assigner une banque à un pays";
+$lang['transmitting_networks'] = "Réseaux émetteurs";
+$lang['transmitter_network_activated'] = "Réseau emetteur activé";
+$lang['transmitter_network_deactivated'] = "Réseau emetteur desactivé";
+$lang['paying_networks'] = 'Réseaux payeurs';
?>
diff --git a/application/models/Wallet_model.php b/application/models/Wallet_model.php
index e5a5f046..985fc669 100644
--- a/application/models/Wallet_model.php
+++ b/application/models/Wallet_model.php
@@ -904,4 +904,23 @@ LEFT JOIn networks_banks nb ON nb.id_bank_country = bc.id AND nb.id_network = n.
$query = $this->db->query($sql , array($id_network));
return $query->num_rows() > 0 ? $query : false ;
}
+
+ // Reseaux emetteurs
+ public function getTransmittingNetwork($id_network ,$idConfig){
+ $sql = "SELECT * FROM `transmitting_networks` WHERE `id_network` = ? AND id_configWallet = ? ;";
+ $query = $this->db->query($sql , array($id_network,$idConfig));
+ return $query->num_rows() > 0 ? $query : false ;
+ }
+
+ public function countTransmittiongNetworks($id_country ,$idConfig){
+ $sql = "SELECT count(id) as total FROM `transmitting_networks` WHERE `id_network` IN (SELECT distinct n.id FROM countries c INNER JOIN
+ networks n ON n.country_id = c.id WHERE n.status = 1 AND c.id = ?
+ ) AND id_configWallet = ? ;";
+ $query = $this->db->query($sql , array($id_country, $idConfig));
+ if($query->num_rows()>0){
+ return $query;
+ }else{
+ return false;
+ }
+ }
}
diff --git a/application/views/gestion_wallet_ilink_config_paying_network.php b/application/views/gestion_wallet_ilink_config_paying_network.php
index 76296c40..f250ca39 100755
--- a/application/views/gestion_wallet_ilink_config_paying_network.php
+++ b/application/views/gestion_wallet_ilink_config_paying_network.php
@@ -8,7 +8,7 @@
- lang->line('edit_paying_networks') . ' - ' . $country->name; ?>
+ lang->line('edit_paying_and_transmitting_networks') . ' - ' . $country->name; ?>
lang->line('Réseaux activés'); ?>
+ lang->line('paying_networks'); ?>
lang->line('transmitting_networks'); ?>
+
+
+
+
+ lang->line('Aucun réseau');
+ }
+ } else {
+ echo $this->lang->line('Aucun réseau');
+ }
+ ?>
+
+
+
+
+
+ N°
+ = $this->lang->line('Nom'); ?>
+ Wallet
+ lang->line('Statut'); ?>
+ Action
+ $num
+ $row->name
+ " . strtoupper($row->type) . " ";
+ ?>
+ is_transmitting_network){
+ ?>
+ = $this->lang->line('Actif'); ?>
+
+
+ = $this->lang->line('Inactif'); ?>
+
+
+
+
+
- lang->line('edit_paying_networks'); ?>
+ lang->line('edit_paying_and_transmitting_networks'); ?>
@@ -71,9 +72,20 @@
N°
- lang->line('Nom'); ?>
- Status
+ = $this->lang->line('Nom'); ?>
+ = $this->lang->line('paying_networks'); ?>
+ = $this->lang->line('transmitting_networks'); ?>
Action
$row->name ";
?>
total > 0){
+ if($row->total_paying){
?>
- = $row->total.' réseaux' ?>
+ = $row->total_paying.' '.$this->lang->line($row->total_paying > 1 ? 'Reseaux' : 'Reseau') ?>
+
+ lang->line('no_network'); ?>
+
+ total_transmitting){
+ ?>
+ = $row->total_transmitting.' '.$this->lang->line($row->total_paying > 1 ? 'Reseaux' : 'Reseau') ?>
@@ -107,48 +119,6 @@
-
-
-
-
-
-
-