diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index d98b070f..2fb8ec89 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -734,7 +734,7 @@ class Hyperviseur_dash extends CI_Controller // $this->session->set_userdata('frais_retrait',$frais); $code = $this->random_string(); $data['message_code'] = ''.$code; - $this->user_model->insertSimulateur($frais,$montant-$frais-$taxe,$code); + $this->user_model->insertSimulateur($frais,$montant-$frais-$taxe,$code,$montant); break; case 4: //Envoi de wallet à banque // Non disponible @@ -756,7 +756,7 @@ class Hyperviseur_dash extends CI_Controller $this->session->set_userdata('com_hyp',$com_hyp); $code = $this->random_string(); $data['message_code'] = ''.$code; - $this->user_model->insertSimulateur($frais,$montant-$frais-$taxe,$code); + $this->user_model->insertSimulateur($frais,$montant-$frais-$taxe,$code,$montant); break; case 10: //Retrait de carte vers wallet $frais = $montant * $config->taux_com_user_carte_wallet / 100; @@ -773,7 +773,7 @@ class Hyperviseur_dash extends CI_Controller $this->session->set_userdata('com_hyp',$com_hyp);$this->session->set_userdata('com_bq',$com_bq); $code = $this->random_string(); $data['message_code'] = ''.$code; - $this->user_model->insertSimulateur($frais * $config->taux_com_hyp_retrait_carte_cash / 100,$montant-$frais-$taxe,$code); + $this->user_model->insertSimulateur($frais * $config->taux_com_hyp_retrait_carte_cash_ilink / 100,$montant-$frais-$taxe,$code,$montant); break; case 12: // Agent - Retrait en cash // empty @@ -786,13 +786,19 @@ class Hyperviseur_dash extends CI_Controller $com_ag += $part_ag; $com_sup += $part_sup ; $com_hyp -= ($part_ag + $part_sup); + $data['montant_retrait'] = $simulateur->first_row()->montant_retrait; + $data['frais_retrait'] = $simulateur->first_row()->com_hyp; + $data['montant_init'] = $simulateur->first_row()->montant; $this->session->set_userdata('com_ag',$com_ag);$this->session->set_userdata('com_sup',$com_sup); $this->session->set_userdata('com_hyp',$com_hyp); }else{ $data['error_simulateur'] = 'Code de retrait incorrect'; } + }else{ + $data['error_simulateur'] = 'Code de retrait incorrect'; } + break; case 13: // Agent - Retrait de la carte vers cash $frais = $montant * $config->taux_com_wallet_ag_carte_cash / 100; @@ -841,7 +847,7 @@ class Hyperviseur_dash extends CI_Controller $this->session->set_userdata('com_hyp',$com_hyp); $code = $this->random_string(); $data['message_code'] = ''.$code; - $this->user_model->insertSimulateur($frais,$montant-$frais-$taxe,$code); + $this->user_model->insertSimulateur($frais,$montant-$frais-$taxe,$code,$montant); break; case 18: // Agent - Envoi de cash vers banque // Indisponible @@ -857,6 +863,8 @@ class Hyperviseur_dash extends CI_Controller $data['operation'] = $operation; $data['init_country'] = $init_country; $data['final_country'] = $final_country; + $data['montant'] = $montant; + $data['com_ag'] = $com_ag; $data['com_sup'] = $com_sup; @@ -887,7 +895,7 @@ class Hyperviseur_dash extends CI_Controller // if (isset($_POST)) { // $data['montant'] = isset($_POST['montant']) ? $_POST['montant'] : 0 ; // } - $data['montant'] = $this->input->post('montant'); + $this->load->view('header_hyp', $data); $this->load->view('calculator'); $this->load->view('footer'); @@ -947,8 +955,8 @@ class Hyperviseur_dash extends CI_Controller public function random_string() { $character_set_array = array(); - $character_set_array[] = array('count' => 7, 'characters' => 'abcdefghjkmnpqrstuvwxyz'); - $character_set_array[] = array('count' => 1, 'characters' => '23456789'); + $character_set_array[] = array('count' => 12, 'characters' => 'abcdefghjkmnpqrstuvwxyz'); + $character_set_array[] = array('count' => 4, 'characters' => '23456789'); $temp_array = array(); foreach ($character_set_array as $character_set) { for ($i = 0; $i < $character_set['count']; $i++) { diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index ed86ff45..0fa6d0b7 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -336,6 +336,8 @@ $lang ['rate_com_hyp_remove_cart'] = 'Hypervisor commission rate on card withdra $lang ['rate_com_bq_remove_cart'] = 'Bank commission rate on card withdrawal operation'; $lang ['rate_com_agent_cart_cash'] = 'Geolocated agent commission rate on cash card withdrawal'; $lang ['rate_com_agent_cash_cart'] = 'Commission rate of the geolocated agent on cash deposit to card'; +$lang ['rate_com_hyp_remove_cart_ilink'] = 'Hypervisor commission rate on card withdrawal operation for iLink user'; +$lang ['rate_com_bq_remove_cart_ilink'] = 'Bank commission rate on card withdrawal operation for iLink user'; // Currency management $lang ['currency'] = 'Currency'; @@ -380,6 +382,10 @@ $lang ['op15'] = 'Agent - Sending cash to another wallet'; $lang ['op16'] = 'Agent - Sending cash to a visa card'; $lang ['op17'] = 'Agent - Sending cash to cash'; $lang ['op18'] = 'Agent - Sending cash to bank'; -$lang ['new_tax'] = 'New tax' - +$lang ['new_tax'] = 'New tax'; +$lang['ilink_first_rule'] = 'The sum of commission splits on sending money must be equal to 100%'; +$lang['ilink_second_rule'] = 'The sum of the commission distributions on the withdrawal operation must be equal to 100%'; +$lang['ilink_third_rule'] = 'The sum of the distribution of commission on cash deposit to card operation must be equal to 100%'; +$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%'; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 8849f168..d7f84544 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -348,8 +348,8 @@ $lang['rate_com_bq_remove_cart'] = 'Taux de commission de la banque sur operation de retrait dans carte '; $lang['rate_com_agent_cart_cash'] = 'Taux de commission de l\'agent géolocalisé sur retrait carte à cash '; $lang['rate_com_agent_cash_cart'] = 'Taux de commission de l\'agent géolocalisé sur depot cash vers carte '; - $lang['rate_com_hyp_remove_cart_ilink'] = 'Taux de commission hyperviseur sur operation de retrait dans carte pour utilisateur '; - $lang['rate_com_bq_remove_cart_ilink'] = 'Taux de commission hyperviseur sur operation de retrait dans carte '; + $lang['rate_com_hyp_remove_cart_ilink'] = 'Taux de commission hyperviseur sur operation de retrait dans carte pour utilisateur iLink '; + $lang['rate_com_bq_remove_cart_ilink'] = 'Taux de commission banque sur operation de retrait dans carte pour utilisateur iLink '; // Gestion de la monnaie $lang['currency'] = 'Monnaie'; diff --git a/application/models/User_model.php b/application/models/User_model.php index b1696c8b..8439be05 100755 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -2395,9 +2395,9 @@ class User_model extends CI_Model } } - public function insertSimulateur($frais , $montant ,$code){ - $sql = "INSERT INTO `simulateur` (`com_hyp` , `montant_retrait`, `code`) VALUES ( ?, ?, ?);"; - $query = $this->db->query($sql , array($frais,$montant,$code)); + public function insertSimulateur($frais , $montant ,$code , $montant_init){ + $sql = "INSERT INTO `simulateur` (`com_hyp` , `montant_retrait`, `code` ,`montant` ) VALUES ( ?, ?, ? , ?);"; + $query = $this->db->query($sql , array($frais,$montant,$code,$montant_init)); return $query; } diff --git a/application/views/calculator.php b/application/views/calculator.php index 91f76c48..a5b5abc8 100755 --- a/application/views/calculator.php +++ b/application/views/calculator.php @@ -378,7 +378,7 @@ $converter = new CurrencyConverter($provider); $f = reset($r3); ?>
lang->line('rate_com_sup_remove_cash') ?>
+lang->line('rate_com_hyp_remove_cash') ?>