Remove national levels from card's ilink wallet commissions configuration
This commit is contained in:
parent
8fa2a897b1
commit
c9800f8bce
|
@ -411,9 +411,6 @@ class Admin_dash extends CI_Controller
|
|||
$data['plr_user_wallet_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("user_wallet_cart_national", $data['idConfig']);
|
||||
$data['plr_hyp_user_wallet_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_wallet_cart_national", $data['idConfig']);
|
||||
$data['plr_bank_user_wallet_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_wallet_cart_national", $data['idConfig']);
|
||||
$data['plr_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("user_wallet_cart_international", $data['idConfig']);
|
||||
$data['plr_hyp_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_wallet_cart_international", $data['idConfig']);
|
||||
$data['plr_bank_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_wallet_cart_international", $data['idConfig']);
|
||||
$this->load->view('header', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/user_wallet_carte');
|
||||
break;
|
||||
|
@ -425,16 +422,12 @@ class Admin_dash extends CI_Controller
|
|||
break;
|
||||
case 'user_carte_wallet':
|
||||
$data['plr_user_cart_wallet_national'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_wallet_national", $data['idConfig']);
|
||||
$data['plr_user_cart_wallet_international'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_wallet_international", $data['idConfig']);
|
||||
|
||||
$data['plr_user_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_hyp_user_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_hyp_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_bank_user_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_bank_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$this->load->view('header', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/user_carte_wallet');
|
||||
|
@ -454,38 +447,28 @@ class Admin_dash extends CI_Controller
|
|||
break;
|
||||
case 'agent_remove_carte_cash':
|
||||
$data['plr_customer_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("customer_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_customer_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("customer_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_agent_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("agent_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_agent_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("agent_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_sup_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("sup_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_sup_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("sup_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_hyp_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_hyp_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_bank_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_bank_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$this->load->view('header', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/agent_remove_carte_cash');
|
||||
break;
|
||||
case 'agent_send_cash_carte':
|
||||
$data['plr_customer_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("customer_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_customer_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("customer_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_agent_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("agent_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_agent_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("agent_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_sup_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("sup_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_sup_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("sup_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_hyp_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_hyp_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_international", $data['idConfig']);
|
||||
$data['plr_hyp_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_national", $data['idConfig']);$data['plr_hyp_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_bank_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_bank_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$this->load->view('header', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/agent_send_cash_carte');
|
||||
|
|
|
@ -1553,15 +1553,15 @@ class Gestion extends CI_Controller
|
|||
$plr_user_wallet_cart_national = $_POST['plr_user_wallet_cart_national'] ?? null;
|
||||
$plr_hyp_user_wallet_cart_national = $_POST['plr_hyp_user_wallet_cart_national'] ?? null;
|
||||
$plr_bank_user_wallet_cart_national = $_POST['plr_bank_user_wallet_cart_national'] ?? null;
|
||||
$plr_user_wallet_cart_international = $_POST['plr_user_wallet_cart_international'] ?? null;
|
||||
$plr_hyp_user_wallet_cart_international = $_POST['plr_hyp_user_wallet_cart_international'] ?? null;
|
||||
$plr_bank_user_wallet_cart_international = $_POST['plr_bank_user_wallet_cart_international'] ?? null;
|
||||
// $plr_user_wallet_cart_international = $_POST['plr_user_wallet_cart_international'] ?? null;
|
||||
// $plr_hyp_user_wallet_cart_international = $_POST['plr_hyp_user_wallet_cart_international'] ?? null;
|
||||
// $plr_bank_user_wallet_cart_international = $_POST['plr_bank_user_wallet_cart_international'] ?? null;
|
||||
$this->insertPalier($plr_user_wallet_cart_national, "user_wallet_cart_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_user_wallet_cart_national, "hyp_user_wallet_cart_national", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_user_wallet_cart_national, "bank_user_wallet_cart_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_user_wallet_cart_international, "user_wallet_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_user_wallet_cart_international, "hyp_user_wallet_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_user_wallet_cart_international, "bank_user_wallet_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_user_wallet_cart_international, "user_wallet_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_hyp_user_wallet_cart_international, "hyp_user_wallet_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_bank_user_wallet_cart_international, "bank_user_wallet_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
break;
|
||||
case 'user_wallet_cash':
|
||||
$plr_user_wallet_cash = $_POST['plr_user_wallet_cash'] ?? null;
|
||||
|
@ -1570,22 +1570,22 @@ class Gestion extends CI_Controller
|
|||
$this->insertPalier($plr_user_wallet_cash_national, "user_wallet_cash_national", $idConfig);
|
||||
break;
|
||||
case 'user_carte_wallet':
|
||||
$plr_user_cart_wallet_international = $_POST['plr_user_cart_wallet_international'] ?? null;
|
||||
// $plr_user_cart_wallet_international = $_POST['plr_user_cart_wallet_international'] ?? null;
|
||||
$plr_user_cart_wallet_national = $_POST['plr_user_cart_wallet_national'] ?? null;
|
||||
$plr_user_cart_cash_international = $_POST['plr_user_cart_cash_international'] ?? null;
|
||||
// $plr_user_cart_cash_international = $_POST['plr_user_cart_cash_international'] ?? null;
|
||||
$plr_user_cart_cash_national = $_POST['plr_user_cart_cash_national'] ?? null;
|
||||
$plr_hyp_user_cart_cash_international = $_POST['plr_hyp_user_cart_cash_international'] ?? null;
|
||||
// $plr_hyp_user_cart_cash_international = $_POST['plr_hyp_user_cart_cash_international'] ?? null;
|
||||
$plr_hyp_user_cart_cash_national = $_POST['plr_hyp_user_cart_cash_national'] ?? null;
|
||||
$plr_bank_user_cart_cash_international = $_POST['plr_bank_user_cart_cash_international'] ?? null;
|
||||
// $plr_bank_user_cart_cash_international = $_POST['plr_bank_user_cart_cash_international'] ?? null;
|
||||
$plr_bank_user_cart_cash_national = $_POST['plr_bank_user_cart_cash_national'] ?? null;
|
||||
|
||||
$this->insertPalier($plr_user_cart_wallet_international, "user_cart_wallet_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_user_cart_wallet_international, "user_cart_wallet_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_user_cart_wallet_national, "user_cart_wallet_national", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_user_cart_cash_international, "user_cart_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_user_cart_cash_international, "user_cart_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_user_cart_cash_national, "user_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_user_cart_cash_international, "hyp_user_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_hyp_user_cart_cash_international, "hyp_user_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_user_cart_cash_national, "hyp_user_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_user_cart_cash_international, "bank_user_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_bank_user_cart_cash_international, "bank_user_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_user_cart_cash_national, "bank_user_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
|
||||
break;
|
||||
|
@ -1604,49 +1604,49 @@ class Gestion extends CI_Controller
|
|||
$this->insertPalier($plr_customer_wallet_cash_international, "customer_wallet_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
break;
|
||||
case 'agent_remove_carte_cash':
|
||||
$plr_customer_cart_cash_international = $_POST['plr_customer_cart_cash_international'] ?? null;
|
||||
// $plr_customer_cart_cash_international = $_POST['plr_customer_cart_cash_international'] ?? null;
|
||||
$plr_customer_cart_cash_national = $_POST['plr_customer_cart_cash_national'] ?? null;
|
||||
$plr_agent_cart_cash_international = $_POST['plr_agent_cart_cash_international'] ?? null;
|
||||
// $plr_agent_cart_cash_international = $_POST['plr_agent_cart_cash_international'] ?? null;
|
||||
$plr_agent_cart_cash_national = $_POST['plr_agent_cart_cash_national'] ?? null;
|
||||
$plr_sup_cart_cash_international = $_POST['plr_sup_cart_cash_international'] ?? null;
|
||||
// $plr_sup_cart_cash_international = $_POST['plr_sup_cart_cash_international'] ?? null;
|
||||
$plr_sup_cart_cash_national = $_POST['plr_sup_cart_cash_national'] ?? null;
|
||||
$plr_hyp_cart_cash_international = $_POST['plr_hyp_cart_cash_international'] ?? null;
|
||||
// $plr_hyp_cart_cash_international = $_POST['plr_hyp_cart_cash_international'] ?? null;
|
||||
$plr_hyp_cart_cash_national = $_POST['plr_hyp_cart_cash_national'] ?? null;
|
||||
$plr_bank_cart_cash_international = $_POST['plr_bank_cart_cash_international'] ?? null;
|
||||
// $plr_bank_cart_cash_international = $_POST['plr_bank_cart_cash_international'] ?? null;
|
||||
$plr_bank_cart_cash_national = $_POST['plr_bank_cart_cash_national'] ?? null;
|
||||
|
||||
$this->insertPalier($plr_customer_cart_cash_international, "customer_cart_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_customer_cart_cash_international, "customer_cart_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_customer_cart_cash_national, "customer_cart_cash_national", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_agent_cart_cash_international, "agent_cart_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_agent_cart_cash_international, "agent_cart_cash_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_agent_cart_cash_national, "agent_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_sup_cart_cash_international, "sup_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_sup_cart_cash_international, "sup_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_sup_cart_cash_national, "sup_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_cart_cash_international, "hyp_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_hyp_cart_cash_international, "hyp_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_cart_cash_national, "hyp_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_cart_cash_international, "bank_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_bank_cart_cash_international, "bank_cart_cash_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_cart_cash_national, "bank_cart_cash_national", $idConfig,'paliers_commissions_wallet');
|
||||
break;
|
||||
case 'agent_send_cash_carte':
|
||||
$plr_customer_cash_cart_international = $_POST['plr_customer_cash_cart_international'] ?? null;
|
||||
// $plr_customer_cash_cart_international = $_POST['plr_customer_cash_cart_international'] ?? null;
|
||||
$plr_customer_cash_cart_national = $_POST['plr_customer_cash_cart_national'] ?? null;
|
||||
$plr_agent_cash_cart_international = $_POST['plr_agent_cash_cart_international'] ?? null;
|
||||
// $plr_agent_cash_cart_international = $_POST['plr_agent_cash_cart_international'] ?? null;
|
||||
$plr_agent_cash_cart_national = $_POST['plr_agent_cash_cart_national'] ?? null;
|
||||
$plr_sup_cash_cart_international = $_POST['plr_sup_cash_cart_international'] ?? null;
|
||||
// $plr_sup_cash_cart_international = $_POST['plr_sup_cash_cart_international'] ?? null;
|
||||
$plr_sup_cash_cart_national = $_POST['plr_sup_cash_cart_national'] ?? null;
|
||||
$plr_hyp_cash_cart_international = $_POST['plr_hyp_cash_cart_international'] ?? null;
|
||||
// $plr_hyp_cash_cart_international = $_POST['plr_hyp_cash_cart_international'] ?? null;
|
||||
$plr_hyp_cash_cart_national = $_POST['plr_hyp_cash_cart_national'] ?? null;
|
||||
$plr_bank_cash_cart_international = $_POST['plr_bank_cash_cart_international'] ?? null;
|
||||
// $plr_bank_cash_cart_international = $_POST['plr_bank_cash_cart_international'] ?? null;
|
||||
$plr_bank_cash_cart_national = $_POST['plr_bank_cash_cart_national'] ?? null;
|
||||
|
||||
$this->insertPalier($plr_customer_cash_cart_international, "customer_cash_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_customer_cash_cart_international, "customer_cash_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_customer_cash_cart_national, "customer_cash_cart_national", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_agent_cash_cart_international, "agent_cash_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_agent_cash_cart_international, "agent_cash_cart_international", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_agent_cash_cart_national, "agent_cash_cart_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_sup_cash_cart_international, "sup_cash_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_sup_cash_cart_international, "sup_cash_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_sup_cash_cart_national, "sup_cash_cart_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_cash_cart_international, "hyp_cash_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_hyp_cash_cart_international, "hyp_cash_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_hyp_cash_cart_national, "hyp_cash_cart_national", $idConfig,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_cash_cart_international, "bank_cash_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
// $this->insertPalier($plr_bank_cash_cart_international, "bank_cash_cart_international", $idConfig ,'paliers_commissions_wallet');
|
||||
$this->insertPalier($plr_bank_cash_cart_national, "bank_cash_cart_national", $idConfig,'paliers_commissions_wallet');
|
||||
break;
|
||||
case 'agent_send_cash_canal':
|
||||
|
|
|
@ -35,7 +35,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['member_code'] = $this->session->userdata('member_code');
|
||||
$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['count_geo'] = $this->user_model->countUserGeoForHyp($this->session->userdata('member_code'));
|
||||
$data['count_sup'] = $this->user_model->countUser("super", 'all', $this->session->userdata('member_code'));
|
||||
|
@ -72,7 +72,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['network'] = $this->session->userdata('network');
|
||||
$data['network_id'] = $this->session->userdata('network_id');
|
||||
$data['town_id'] = isset($town) ? $town->id : null;
|
||||
|
||||
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['alert'] = "";
|
||||
|
@ -132,7 +132,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$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['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['alert'] = "";
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
|
@ -175,7 +175,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$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['tab_fastDemande'] = $this->user_model->getRangeASCDemandesByNetwork($debut, $fin, $this->session->userdata('member_code'), $this->session->userdata('current_demande_ville'));
|
||||
$data['tab_slowDemande'] = $this->user_model->getRangeDESCDemandesByNetwork($debut, $fin, $this->session->userdata('member_code'), $this->session->userdata('current_demande_ville'));
|
||||
$data['list'] = $this->user_model->getDemandesBySuper($debut, $fin, $this->session->userdata('member_code'));
|
||||
|
@ -367,7 +367,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['temp_moyen'] = $this->user_model->getTempsMoyenAd($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['list'] = $this->user_model->getDemandesAdForSuper($debut, $fin, $this->session->userdata('member_code'));
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['networks'] = $this->user_model->getNetworkByHyp($this->session->userdata('member_code'));
|
||||
$data['type'] = $this->lang->line('Adhésion');
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
|
@ -595,7 +595,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
|
||||
$data['active'] = "wallet_wallet";
|
||||
$data['alert'] = "";
|
||||
|
||||
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
@ -802,8 +802,8 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['alert'] = "";
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
|
||||
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
$data['network_id'] = $this->session->userdata('network_id');
|
||||
|
@ -1004,8 +1004,8 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['alert'] = "";
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
|
||||
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['idConfig'] = $data['hasWallet']->first_row()->id;
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
|
@ -1344,10 +1344,10 @@ class Hyperviseur_dash extends CI_Controller
|
|||
// $data['configWallet'] = $this->wallet_model->getConfigWallet($network_id);
|
||||
$data['active'] = "wallet_wallet";
|
||||
$data['alert'] = "";
|
||||
|
||||
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
|
@ -1415,9 +1415,9 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['plr_user_wallet_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("user_wallet_cart_national", $data['idConfig']);
|
||||
$data['plr_hyp_user_wallet_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_wallet_cart_national", $data['idConfig']);
|
||||
$data['plr_bank_user_wallet_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_wallet_cart_national", $data['idConfig']);
|
||||
$data['plr_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("user_wallet_cart_international", $data['idConfig']);
|
||||
$data['plr_hyp_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_wallet_cart_international", $data['idConfig']);
|
||||
$data['plr_bank_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_wallet_cart_international", $data['idConfig']);
|
||||
// $data['plr_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("user_wallet_cart_international", $data['idConfig']);
|
||||
// $data['plr_hyp_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_wallet_cart_international", $data['idConfig']);
|
||||
// $data['plr_bank_user_wallet_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_wallet_cart_international", $data['idConfig']);
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/user_wallet_carte');
|
||||
break;
|
||||
|
@ -1429,16 +1429,16 @@ class Hyperviseur_dash extends CI_Controller
|
|||
break;
|
||||
case 'user_carte_wallet':
|
||||
$data['plr_user_cart_wallet_national'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_wallet_national", $data['idConfig']);
|
||||
$data['plr_user_cart_wallet_international'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_wallet_international", $data['idConfig']);
|
||||
// $data['plr_user_cart_wallet_international'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_wallet_international", $data['idConfig']);
|
||||
|
||||
$data['plr_user_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("user_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_hyp_user_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_hyp_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_hyp_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_user_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_bank_user_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_bank_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_bank_user_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_user_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/user_carte_wallet');
|
||||
|
@ -1458,38 +1458,38 @@ class Hyperviseur_dash extends CI_Controller
|
|||
break;
|
||||
case 'agent_remove_carte_cash':
|
||||
$data['plr_customer_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("customer_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_customer_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("customer_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_customer_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("customer_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_agent_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("agent_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_agent_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("agent_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_agent_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("agent_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_sup_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("sup_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_sup_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("sup_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_sup_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("sup_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_hyp_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_hyp_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_hyp_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$data['plr_bank_cart_cash_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_cart_cash_national", $data['idConfig']);
|
||||
$data['plr_bank_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_cart_cash_international", $data['idConfig']);
|
||||
// $data['plr_bank_cart_cash_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_cart_cash_international", $data['idConfig']);
|
||||
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/agent_remove_carte_cash');
|
||||
break;
|
||||
case 'agent_send_cash_carte':
|
||||
$data['plr_customer_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("customer_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_customer_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("customer_cash_cart_international", $data['idConfig']);
|
||||
// $data['plr_customer_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("customer_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_agent_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("agent_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_agent_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("agent_cash_cart_international", $data['idConfig']);
|
||||
// $data['plr_agent_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("agent_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_sup_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("sup_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_sup_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("sup_cash_cart_international", $data['idConfig']);
|
||||
// $data['plr_sup_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("sup_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_hyp_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_hyp_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_international", $data['idConfig']);
|
||||
// $data['plr_hyp_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("hyp_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$data['plr_bank_cash_cart_national'] = $this->wallet_model->getPalierCommissionsWallet("bank_cash_cart_national", $data['idConfig']);
|
||||
$data['plr_bank_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_cash_cart_international", $data['idConfig']);
|
||||
// $data['plr_bank_cash_cart_international'] = $this->wallet_model->getPalierCommissionsWallet("bank_cash_cart_international", $data['idConfig']);
|
||||
|
||||
$this->load->view('header_hyp', $data);
|
||||
$this->load->view('config_wallet_ilink_hyp/agent_send_cash_carte');
|
||||
|
@ -1526,10 +1526,10 @@ class Hyperviseur_dash extends CI_Controller
|
|||
|
||||
$data['active'] = "wallet_wallet";
|
||||
$data['alert'] = "";
|
||||
|
||||
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
//
|
||||
//
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
|
@ -1646,11 +1646,11 @@ class Hyperviseur_dash extends CI_Controller
|
|||
}
|
||||
$data['active'] = "nano_credit";
|
||||
$data['alert'] = "";
|
||||
|
||||
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
$data['hasWallet'] = $data['configWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
$data['country'] = $this->session->userdata('current_pays');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
|
@ -1749,10 +1749,10 @@ class Hyperviseur_dash extends CI_Controller
|
|||
{
|
||||
$data['active'] = "nano_credit";
|
||||
$data['alert'] = "";
|
||||
|
||||
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
|
@ -1815,7 +1815,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['alert'] = "";
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
|
||||
|
@ -1882,7 +1882,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['alert'] = "";
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||
|
@ -1934,7 +1934,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$data['alert'] = "";
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network_id'] = $this->session->userdata('network_id');
|
||||
|
@ -2079,7 +2079,7 @@ class Hyperviseur_dash extends CI_Controller
|
|||
|
||||
$data['network'] = $this->session->userdata('network');
|
||||
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||
|
||||
|
||||
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||
$data['category'] = $this->session->userdata('category');
|
||||
$data['network_id'] = $this->session->userdata('network_id');
|
||||
|
|
|
@ -26,7 +26,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<?= $this->lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_remove_carte_cash'); ?>
|
||||
</h1>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($alert == "ok") {
|
||||
|
||||
|
@ -65,37 +65,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row" style="display:flex; justify-content: center">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_cart_cash_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_customer_cart_cash_international) {
|
||||
foreach ($plr_customer_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_cart_cash_national'); ?></h3>
|
||||
|
@ -131,37 +100,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_remove_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_agent_cart_cash_international) {
|
||||
foreach ($plr_agent_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_remove_cart_national'); ?></h3>
|
||||
|
@ -195,37 +133,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_sup_remove_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_sup_cart_cash_international) {
|
||||
foreach ($plr_sup_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_sup_remove_cart_national'); ?></h3>
|
||||
|
@ -261,37 +168,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row" style="margin-top: 30px">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_remove_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_hyp_cart_cash_international) {
|
||||
foreach ($plr_hyp_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_remove_cart_national'); ?></h3>
|
||||
|
@ -325,37 +201,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_remove_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_bank_cart_cash_international) {
|
||||
foreach ($plr_bank_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_remove_cart_national'); ?></h3>
|
||||
|
@ -402,51 +247,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<form id="walletForm">
|
||||
<div class="row" style="display:flex; justify-content: center">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_agent_cart_cash_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new32"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="customer_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_customer_cart_cash_international) {
|
||||
foreach ($plr_customer_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" .(isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add32" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit32" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete32" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -496,51 +296,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_agent_remove_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new12"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="agent_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_agent_cart_cash_international) {
|
||||
foreach ($plr_agent_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -588,51 +343,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_sup_remove_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new72"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="sup_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_sup_cart_cash_international) {
|
||||
foreach ($plr_sup_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -682,51 +392,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_hyp_remove_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new42"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="hyp_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_hyp_cart_cash_international) {
|
||||
foreach ($plr_hyp_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -774,51 +439,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_bq_remove_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new52"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="bank_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_bank_cart_cash_international) {
|
||||
foreach ($plr_bank_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add52" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit52" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete52" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -917,20 +537,20 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
|
||||
if ($('#walletForm')[0].checkValidity()) {
|
||||
// Paliers
|
||||
let plr_hyp_cart_cash_international = getPaliersTable('hyp_cart_cash_international');
|
||||
// let plr_hyp_cart_cash_international = getPaliersTable('hyp_cart_cash_international');
|
||||
let plr_hyp_cart_cash_national = getPaliersTable('hyp_cart_cash_national');
|
||||
|
||||
let plr_sup_cart_cash_international = getPaliersTable('sup_cart_cash_international');
|
||||
// let plr_sup_cart_cash_international = getPaliersTable('sup_cart_cash_international');
|
||||
let plr_sup_cart_cash_national = getPaliersTable('sup_cart_cash_national');
|
||||
|
||||
let plr_agent_cart_cash_international = getPaliersTable('agent_cart_cash_international');
|
||||
// let plr_agent_cart_cash_international = getPaliersTable('agent_cart_cash_international');
|
||||
let plr_agent_cart_cash_national = getPaliersTable('agent_cart_cash_national');
|
||||
|
||||
let plr_bank_cart_cash_international = getPaliersTable('bank_cart_cash_international');
|
||||
// let plr_bank_cart_cash_international = getPaliersTable('bank_cart_cash_international');
|
||||
let plr_bank_cart_cash_national = getPaliersTable('bank_cart_cash_national');
|
||||
|
||||
let plr_customer_cart_cash_national = getPaliersTable('customer_cart_cash_national');
|
||||
let plr_customer_cart_cash_international = getPaliersTable('customer_cart_cash_international');
|
||||
// let plr_customer_cart_cash_international = getPaliersTable('customer_cart_cash_international');
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url('Gestion/config_wallet/update')?>',
|
||||
|
@ -940,16 +560,11 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
"type": "ilink",
|
||||
"config": "agent_remove_carte_cash",
|
||||
"network_id": network_id, "id_config": id_config,
|
||||
"plr_hyp_cart_cash_international": plr_hyp_cart_cash_international,
|
||||
"plr_hyp_cart_cash_national": plr_hyp_cart_cash_national,
|
||||
"plr_sup_cart_cash_international": plr_sup_cart_cash_international,
|
||||
"plr_sup_cart_cash_national": plr_sup_cart_cash_national,
|
||||
"plr_agent_cart_cash_national": plr_agent_cart_cash_national,
|
||||
"plr_agent_cart_cash_international": plr_agent_cart_cash_international,
|
||||
"plr_bank_cart_cash_international": plr_bank_cart_cash_international,
|
||||
"plr_bank_cart_cash_national" : plr_bank_cart_cash_national,
|
||||
"plr_customer_cart_cash_national" : plr_customer_cart_cash_national,
|
||||
"plr_customer_cart_cash_international" : plr_customer_cart_cash_international
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == '200') {
|
||||
|
@ -1421,440 +1036,5 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
$(this).parents("tr").remove();
|
||||
$(".new7").removeAttr("disabled");
|
||||
});
|
||||
|
||||
/**
|
||||
* INTERNATIONAUX
|
||||
*/
|
||||
|
||||
// Table 3
|
||||
var actions32 = $("#customer_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new32").click(function () {
|
||||
if (!actions32) {
|
||||
actions32 = '<a class="add add32" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit32" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete32" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#customer_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions32 + '</td>' +
|
||||
'</tr>';
|
||||
$("#customer_cart_cash_international").append(row);
|
||||
$("#customer_cart_cash_international tbody tr").eq(index + 1).find(".add32, .edit32").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add32", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add32, .edit32").toggle();
|
||||
$(".new32").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit32", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add32, .edit32").toggle();
|
||||
$(".new32").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete32", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new32").removeAttr("disabled");
|
||||
});
|
||||
|
||||
// Table 4
|
||||
var actions42 = $("#hyp_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new42").click(function () {
|
||||
if (!actions42) {
|
||||
actions42 = '<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#hyp_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions42 + '</td>' +
|
||||
'</tr>';
|
||||
$("#hyp_cart_cash_international").append(row);
|
||||
$("#hyp_cart_cash_international tbody tr").eq(index + 1).find(".add42, .edit42").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add42", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit42", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete42", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new42").removeAttr("disabled");
|
||||
});
|
||||
|
||||
var actions52 = $("#bank_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new52").click(function () {
|
||||
if (!actions52) {
|
||||
actions52 = '<a class="add add52" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit52" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete52" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#bank_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions52 + '</td>' +
|
||||
'</tr>';
|
||||
$("#bank_cart_cash_international").append(row);
|
||||
$("#bank_cart_cash_international tbody tr").eq(index + 1).find(".add52, .edit52").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add52", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add52, .edit52").toggle();
|
||||
$(".new52").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit52", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add52, .edit52").toggle();
|
||||
$(".new52").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete52", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new52").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
//Table 1
|
||||
var actions12 = $("#agent_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new12").click(function () {
|
||||
if (!actions12) {
|
||||
actions12 = '<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#agent_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required class="form-control" min="0" step="any" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions12 + '</td>' +
|
||||
'</tr>';
|
||||
$("#agent_cart_cash_international").append(row);
|
||||
$("#agent_cart_cash_international tbody tr").eq(index + 1).find(".add12, .edit12").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add12", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit12", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete12", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new12").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
// Table 7
|
||||
var actions72 = $("#sup_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new72").click(function () {
|
||||
if (!actions72) {
|
||||
actions72 = '<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#sup_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions72 + '</td>' +
|
||||
'</tr>';
|
||||
$("#sup_cart_cash_international").append(row);
|
||||
$("#sup_cart_cash_international tbody tr").eq(index + 1).find(".add72, .edit72").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add72", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add72, .edit72").toggle();
|
||||
$(".new72").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit72", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add7, .edit7").toggle();
|
||||
$(".new72").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete72", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new72").removeAttr("disabled");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -27,7 +27,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<?= $this->lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_send_cash_carte'); ?>
|
||||
</h1>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($alert == "ok") {
|
||||
|
||||
|
@ -67,37 +67,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
|
||||
<div class="row" style="display:flex; justify-content: center">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_depot_cash_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_customer_cash_cart_international) {
|
||||
foreach ($plr_customer_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_depot_cash_cart_national'); ?></h3>
|
||||
|
@ -133,37 +102,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_depot_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_agent_cash_cart_international) {
|
||||
foreach ($plr_agent_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_agent_depot_cart_national'); ?></h3>
|
||||
|
@ -197,37 +135,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_sup_depot_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_sup_cash_cart_international) {
|
||||
foreach ($plr_sup_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_sup_depot_cart_national'); ?></h3>
|
||||
|
@ -263,37 +170,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row" style="margin-top: 30px">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_depot_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_hyp_cash_cart_international) {
|
||||
foreach ($plr_hyp_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_depot_cart_national'); ?></h3>
|
||||
|
@ -327,37 +203,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_depot_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_bank_cash_cart_international) {
|
||||
foreach ($plr_bank_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_depot_cart_national'); ?></h3>
|
||||
|
@ -405,51 +250,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<form id="walletForm">
|
||||
<div class="row" style="display:flex; justify-content: center">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_agent_depot_cash_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new32"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="customer_cash_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_customer_cash_cart_international) {
|
||||
foreach ($plr_customer_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" .(isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add32" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit32" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete32" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -499,51 +299,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_agent_depot_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new12"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="agent_cash_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_agent_cash_cart_international) {
|
||||
foreach ($plr_agent_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -591,51 +346,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_sup_depot_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new72"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="sup_cash_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_sup_cash_cart_international) {
|
||||
foreach ($plr_sup_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -685,51 +395,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_hyp_depot_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new42"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="hyp_cash_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_hyp_cash_cart_international) {
|
||||
foreach ($plr_hyp_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -777,51 +442,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_bq_depot_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new52"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="bank_cash_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_bank_cash_cart_international) {
|
||||
foreach ($plr_bank_cash_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add52" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit52" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete52" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -920,20 +540,20 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
|
||||
if ($('#walletForm')[0].checkValidity()) {
|
||||
// Paliers
|
||||
let plr_hyp_cash_cart_international = getPaliersTable('hyp_cash_cart_international');
|
||||
// let plr_hyp_cash_cart_international = getPaliersTable('hyp_cash_cart_international');
|
||||
let plr_hyp_cash_cart_national = getPaliersTable('hyp_cash_cart_national');
|
||||
|
||||
let plr_sup_cash_cart_international = getPaliersTable('sup_cash_cart_international');
|
||||
// let plr_sup_cash_cart_international = getPaliersTable('sup_cash_cart_international');
|
||||
let plr_sup_cash_cart_national = getPaliersTable('sup_cash_cart_national');
|
||||
|
||||
let plr_agent_cash_cart_international = getPaliersTable('agent_cash_cart_international');
|
||||
// let plr_agent_cash_cart_international = getPaliersTable('agent_cash_cart_international');
|
||||
let plr_agent_cash_cart_national = getPaliersTable('agent_cash_cart_national');
|
||||
|
||||
let plr_bank_cash_cart_international = getPaliersTable('bank_cash_cart_international');
|
||||
// let plr_bank_cash_cart_international = getPaliersTable('bank_cash_cart_international');
|
||||
let plr_bank_cash_cart_national = getPaliersTable('bank_cash_cart_national');
|
||||
|
||||
let plr_customer_cash_cart_national = getPaliersTable('customer_cash_cart_national');
|
||||
let plr_customer_cash_cart_international = getPaliersTable('customer_cash_cart_international');
|
||||
// let plr_customer_cash_cart_international = getPaliersTable('customer_cash_cart_international');
|
||||
|
||||
|
||||
$.ajax({
|
||||
|
@ -944,16 +564,11 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
"type": "ilink",
|
||||
"config": "agent_send_cash_carte",
|
||||
"network_id": network_id, "id_config": id_config,
|
||||
"plr_hyp_cash_cart_international": plr_hyp_cash_cart_international,
|
||||
"plr_hyp_cash_cart_national": plr_hyp_cash_cart_national,
|
||||
"plr_sup_cash_cart_international": plr_sup_cash_cart_international,
|
||||
"plr_sup_cash_cart_national": plr_sup_cash_cart_national,
|
||||
"plr_agent_cash_cart_national": plr_agent_cash_cart_national,
|
||||
"plr_agent_cash_cart_international": plr_agent_cash_cart_international,
|
||||
"plr_bank_cash_cart_international": plr_bank_cash_cart_international,
|
||||
"plr_bank_cash_cart_national" : plr_bank_cash_cart_national,
|
||||
"plr_customer_cash_cart_national" : plr_customer_cash_cart_national,
|
||||
"plr_customer_cash_cart_international" : plr_customer_cash_cart_international
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == '200') {
|
||||
|
@ -1425,440 +1040,5 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
$(this).parents("tr").remove();
|
||||
$(".new7").removeAttr("disabled");
|
||||
});
|
||||
|
||||
/**
|
||||
* INTERNATIONAUX
|
||||
*/
|
||||
|
||||
// Table 3
|
||||
var actions32 = $("#customer_cash_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new32").click(function () {
|
||||
if (!actions32) {
|
||||
actions32 = '<a class="add add32" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit32" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete32" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#customer_cash_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions32 + '</td>' +
|
||||
'</tr>';
|
||||
$("#customer_cash_cart_international").append(row);
|
||||
$("#customer_cash_cart_international tbody tr").eq(index + 1).find(".add32, .edit32").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add32", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add32, .edit32").toggle();
|
||||
$(".new32").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit32", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add32, .edit32").toggle();
|
||||
$(".new32").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete32", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new32").removeAttr("disabled");
|
||||
});
|
||||
|
||||
// Table 4
|
||||
var actions42 = $("#hyp_cash_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new42").click(function () {
|
||||
if (!actions42) {
|
||||
actions42 = '<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#hyp_cash_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions42 + '</td>' +
|
||||
'</tr>';
|
||||
$("#hyp_cash_cart_international").append(row);
|
||||
$("#hyp_cash_cart_international tbody tr").eq(index + 1).find(".add42, .edit42").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add42", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit42", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete42", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new42").removeAttr("disabled");
|
||||
});
|
||||
|
||||
var actions52 = $("#bank_cash_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new52").click(function () {
|
||||
if (!actions52) {
|
||||
actions52 = '<a class="add add52" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit52" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete52" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#bank_cash_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions52 + '</td>' +
|
||||
'</tr>';
|
||||
$("#bank_cash_cart_international").append(row);
|
||||
$("#bank_cash_cart_international tbody tr").eq(index + 1).find(".add52, .edit52").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add52", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add52, .edit52").toggle();
|
||||
$(".new52").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit52", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add52, .edit52").toggle();
|
||||
$(".new52").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete52", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new52").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
//Table 1
|
||||
var actions12 = $("#agent_cash_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new12").click(function () {
|
||||
if (!actions12) {
|
||||
actions12 = '<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#agent_cash_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required class="form-control" min="0" step="any" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions12 + '</td>' +
|
||||
'</tr>';
|
||||
$("#agent_cash_cart_international").append(row);
|
||||
$("#agent_cash_cart_international tbody tr").eq(index + 1).find(".add12, .edit12").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add12", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit12", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete12", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new12").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
// Table 7
|
||||
var actions72 = $("#sup_cash_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new72").click(function () {
|
||||
if (!actions72) {
|
||||
actions72 = '<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#sup_cash_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions72 + '</td>' +
|
||||
'</tr>';
|
||||
$("#sup_cash_cart_international").append(row);
|
||||
$("#sup_cash_cart_international tbody tr").eq(index + 1).find(".add72, .edit72").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add72", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add72, .edit72").toggle();
|
||||
$(".new72").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit72", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add7, .edit7").toggle();
|
||||
$(".new72").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete72", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new72").removeAttr("disabled");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -26,7 +26,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<?= $this->lang->line('config_user').' - '.$this->lang->line('config_ilink_user_carte_wallet'); ?>
|
||||
</h1>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($alert == "ok") {
|
||||
|
||||
|
@ -65,37 +65,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_user_cart_wallet_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_user_cart_wallet_international) {
|
||||
foreach ($plr_user_cart_wallet_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_user_cart_wallet_national'); ?></h3>
|
||||
|
@ -129,37 +98,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_user_cart_cash_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_user_cart_cash_international) {
|
||||
foreach ($plr_user_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_user_cart_cash_national'); ?></h3>
|
||||
|
@ -195,37 +133,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row" style="margin-top: 20px">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_remove_cart_ilink_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_hyp_user_cart_cash_international) {
|
||||
foreach ($plr_hyp_user_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_remove_cart_ilink_national'); ?></h3>
|
||||
|
@ -259,37 +166,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_remove_cart_ilink_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_bank_user_cart_cash_international) {
|
||||
foreach ($plr_bank_user_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_remove_cart_ilink_national'); ?></h3>
|
||||
|
@ -337,51 +213,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<form id="walletForm">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_user_cart_wallet_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new12"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="user_cart_wallet_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_user_cart_wallet_international) {
|
||||
foreach ($plr_user_cart_wallet_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -429,51 +260,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_user_cart_cash_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new72"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="user_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_user_cart_cash_international) {
|
||||
foreach ($plr_user_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -523,51 +309,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_hyp_remove_cart_ilink_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new42"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="hyp_user_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_hyp_user_cart_cash_international) {
|
||||
foreach ($plr_hyp_user_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -615,51 +356,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_bq_remove_cart_ilink_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new52"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="bank_user_cart_cash_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_bank_user_cart_cash_international) {
|
||||
foreach ($plr_bank_user_cart_cash_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add52" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit52" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete52" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -758,16 +454,16 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
|
||||
if ($('#walletForm')[0].checkValidity()) {
|
||||
// Paliers
|
||||
let plr_hyp_user_cart_cash_international = getPaliersTable('hyp_user_cart_cash_international');
|
||||
// let plr_hyp_user_cart_cash_international = getPaliersTable('hyp_user_cart_cash_international');
|
||||
let plr_hyp_user_cart_cash_national = getPaliersTable('hyp_user_cart_cash_national');
|
||||
|
||||
let plr_user_cart_cash_international = getPaliersTable('user_cart_cash_international');
|
||||
// let plr_user_cart_cash_international = getPaliersTable('user_cart_cash_international');
|
||||
let plr_user_cart_cash_national = getPaliersTable('user_cart_cash_national');
|
||||
|
||||
let plr_user_cart_wallet_international = getPaliersTable('user_cart_wallet_international');
|
||||
// let plr_user_cart_wallet_international = getPaliersTable('user_cart_wallet_international');
|
||||
let plr_user_cart_wallet_national = getPaliersTable('user_cart_wallet_national');
|
||||
|
||||
let plr_bank_user_cart_cash_international = getPaliersTable('bank_user_cart_cash_international');
|
||||
// let plr_bank_user_cart_cash_international = getPaliersTable('bank_user_cart_cash_international');
|
||||
let plr_bank_user_cart_cash_national = getPaliersTable('bank_user_cart_cash_national');
|
||||
|
||||
|
||||
|
@ -779,13 +475,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
"type": "ilink",
|
||||
"config": "user_carte_wallet",
|
||||
"network_id": network_id, "id_config": id_config,
|
||||
"plr_hyp_user_cart_cash_international": plr_hyp_user_cart_cash_international,
|
||||
"plr_hyp_user_cart_cash_national": plr_hyp_user_cart_cash_national,
|
||||
"plr_user_cart_cash_international": plr_user_cart_cash_international,
|
||||
"plr_user_cart_cash_national": plr_user_cart_cash_national,
|
||||
"plr_user_cart_wallet_national": plr_user_cart_wallet_national,
|
||||
"plr_user_cart_wallet_international": plr_user_cart_wallet_international,
|
||||
"plr_bank_user_cart_cash_international": plr_bank_user_cart_cash_international,
|
||||
"plr_bank_user_cart_cash_national" : plr_bank_user_cart_cash_national
|
||||
},
|
||||
success: function (data) {
|
||||
|
@ -1172,356 +864,5 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
$(this).parents("tr").remove();
|
||||
$(".new7").removeAttr("disabled");
|
||||
});
|
||||
|
||||
/**
|
||||
* INTERNATIONAUX
|
||||
*/
|
||||
|
||||
// Table 4
|
||||
var actions42 = $("#hyp_user_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new42").click(function () {
|
||||
if (!actions42) {
|
||||
actions42 = '<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#hyp_user_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions42 + '</td>' +
|
||||
'</tr>';
|
||||
$("#hyp_user_cart_cash_international").append(row);
|
||||
$("#hyp_user_cart_cash_international tbody tr").eq(index + 1).find(".add42, .edit42").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add42", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit42", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete42", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new42").removeAttr("disabled");
|
||||
});
|
||||
|
||||
var actions52 = $("#bank_user_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new52").click(function () {
|
||||
if (!actions52) {
|
||||
actions52 = '<a class="add add52" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit52" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete52" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#bank_user_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions52 + '</td>' +
|
||||
'</tr>';
|
||||
$("#bank_user_cart_cash_international").append(row);
|
||||
$("#bank_user_cart_cash_international tbody tr").eq(index + 1).find(".add52, .edit52").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add52", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add52, .edit52").toggle();
|
||||
$(".new52").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit52", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add52, .edit52").toggle();
|
||||
$(".new52").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete52", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new52").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
//Table 1
|
||||
var actions12 = $("#user_cart_wallet_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new12").click(function () {
|
||||
if (!actions12) {
|
||||
actions12 = '<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#user_cart_wallet_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required class="form-control" min="0" step="any" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions12 + '</td>' +
|
||||
'</tr>';
|
||||
$("#user_cart_wallet_international").append(row);
|
||||
$("#user_cart_wallet_international tbody tr").eq(index + 1).find(".add12, .edit12").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add12", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit12", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete12", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new12").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
// Paliers nationaux
|
||||
|
||||
// Table 7
|
||||
var actions72 = $("#user_cart_cash_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new72").click(function () {
|
||||
if (!actions72) {
|
||||
actions72 = '<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#user_cart_cash_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions72 + '</td>' +
|
||||
'</tr>';
|
||||
$("#user_cart_cash_international").append(row);
|
||||
$("#user_cart_cash_international tbody tr").eq(index + 1).find(".add72, .edit72").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add72", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add72, .edit72").toggle();
|
||||
$(".new72").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit72", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add7, .edit7").toggle();
|
||||
$(".new72").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete72", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new72").removeAttr("disabled");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -26,7 +26,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<?= $this->lang->line('config_user').' - '.$this->lang->line('config_ilink_user_wallet_carte'); ?>
|
||||
</h1>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if ($alert == "ok") {
|
||||
|
||||
|
@ -65,37 +65,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row" style="display:flex; justify-content: center">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_user_wallet_cart_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_user_wallet_cart_international) {
|
||||
foreach ($plr_user_wallet_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_user_wallet_cart_national'); ?></h3>
|
||||
|
@ -131,37 +100,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row centered">
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_send_wallet_cart_ilink_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_hyp_user_wallet_cart_international) {
|
||||
foreach ($plr_hyp_user_wallet_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_hyp_send_wallet_cart_ilink_national'); ?></h3>
|
||||
|
@ -195,37 +133,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_send_wallet_cart_ilink_international'); ?></h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body table-responsive" style="overflow-x:auto;">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th>Taux (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if ($plr_bank_user_wallet_cart_international) {
|
||||
foreach ($plr_bank_user_wallet_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $fmt->format($row->min) . "</td>
|
||||
<td>" . $fmt->format($row->max) . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><?= $this->lang->line('rate_com_bq_send_wallet_cart_ilink_national'); ?></h3>
|
||||
|
@ -272,51 +179,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
<form id="walletForm">
|
||||
<div class="row" style="display:flex; justify-content: center">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_user_wallet_cart_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new42"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="user_wallet_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_user_wallet_cart_international) {
|
||||
foreach ($plr_user_wallet_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -366,51 +228,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_hyp_send_wallet_cart_ilink_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new12"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="hyp_wallet_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_hyp_user_wallet_cart_international) {
|
||||
foreach ($plr_hyp_user_wallet_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -458,51 +275,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<label for="nom"
|
||||
class="col-form-label"><?= $this->lang->line('rate_com_bq_send_wallet_cart_ilink_international'); ?></label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" class="btn btn-info add-new new72"><i
|
||||
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="bank_wallet_cart_international" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Min</th>
|
||||
<th>Max</th>
|
||||
<th><?= $this->lang->line('rate'); ?> (%)</th>
|
||||
<th><?= $this->lang->line('ceiling')?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ($plr_bank_user_wallet_cart_international) {
|
||||
foreach ($plr_bank_user_wallet_cart_international->result() as $row) {
|
||||
echo "<tr>
|
||||
<td>" . $row->min . "</td>
|
||||
<td>" . $row->max . "</td>
|
||||
<td>" . $row->taux . "</td>
|
||||
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
|
||||
<td>
|
||||
<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group" style="overflow-x:auto;">
|
||||
<div class="table-title">
|
||||
<div class="row">
|
||||
|
@ -607,9 +379,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
let plr_hyp_user_wallet_cart_national = getPaliersTable('hyp_wallet_cart_national');
|
||||
let plr_bank_user_wallet_cart_national = getPaliersTable('bank_wallet_cart_national');
|
||||
|
||||
let plr_user_wallet_cart_international = getPaliersTable('user_wallet_cart_international');
|
||||
let plr_hyp_user_wallet_cart_international = getPaliersTable('hyp_wallet_cart_international');
|
||||
let plr_bank_user_wallet_cart_international = getPaliersTable('bank_wallet_cart_international');
|
||||
// let plr_user_wallet_cart_international = getPaliersTable('user_wallet_cart_international');
|
||||
// let plr_hyp_user_wallet_cart_international = getPaliersTable('hyp_wallet_cart_international');
|
||||
// let plr_bank_user_wallet_cart_international = getPaliersTable('bank_wallet_cart_international');
|
||||
|
||||
$.ajax({
|
||||
url: '<?= base_url('Gestion/config_wallet/update')?>',
|
||||
|
@ -622,9 +394,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
"plr_user_wallet_cart_national": plr_user_wallet_cart_national,
|
||||
"plr_hyp_user_wallet_cart_national": plr_hyp_user_wallet_cart_national,
|
||||
"plr_bank_user_wallet_cart_national": plr_bank_user_wallet_cart_national,
|
||||
"plr_user_wallet_cart_international": plr_user_wallet_cart_international,
|
||||
"plr_hyp_user_wallet_cart_international": plr_hyp_user_wallet_cart_international,
|
||||
"plr_bank_user_wallet_cart_international": plr_bank_user_wallet_cart_international,
|
||||
},
|
||||
success: function (data) {
|
||||
if (data === '200') {
|
||||
|
@ -749,8 +518,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
$(this).parents("tr").remove();
|
||||
$(".new4").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
//Table 1
|
||||
var actions1 = $("#hyp_wallet_cart_national td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
|
@ -925,271 +694,5 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|||
$(this).parents("tr").remove();
|
||||
$(".new7").removeAttr("disabled");
|
||||
});
|
||||
|
||||
/**
|
||||
* INTERNATIONAUX
|
||||
*/
|
||||
|
||||
// Table 4
|
||||
var actions42 = $("#user_wallet_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new42").click(function () {
|
||||
if (!actions42) {
|
||||
actions42 = '<a class="add add42" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit42" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete42" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#user_wallet_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions42 + '</td>' +
|
||||
'</tr>';
|
||||
$("#user_wallet_cart_international").append(row);
|
||||
$("#user_wallet_cart_international tbody tr").eq(index + 1).find(".add42, .edit42").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add42", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit42", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add42, .edit42").toggle();
|
||||
$(".new42").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete42", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new42").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
//Table 1
|
||||
var actions12 = $("#hyp_wallet_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new12").click(function () {
|
||||
if (!actions12) {
|
||||
actions12 = '<a class="add add12" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit12" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete12" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#hyp_wallet_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required class="form-control" min="0" step="any" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions12 + '</td>' +
|
||||
'</tr>';
|
||||
$("#hyp_wallet_cart_international").append(row);
|
||||
$("#hyp_wallet_cart_international tbody tr").eq(index + 1).find(".add12, .edit12").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add12", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit12", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add12, .edit12").toggle();
|
||||
$(".new12").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete12", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new12").removeAttr("disabled");
|
||||
});
|
||||
|
||||
|
||||
// Paliers nationaux
|
||||
|
||||
// Table 7
|
||||
var actions72 = $("#bank_wallet_cart_international td:last-child").html();
|
||||
// Append table with add row form on add new button click
|
||||
$(".new72").click(function () {
|
||||
if (!actions72) {
|
||||
actions72 = '<a class="add add72" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="edit edit72" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||
' <a class="delete delete72" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||
}
|
||||
$(this).attr("disabled", "disabled");
|
||||
var index = $("#bank_wallet_cart_international tbody tr:last-child").index();
|
||||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' +
|
||||
'<td><input type="number" required class="form-control" name="max" id="max"></td>' +
|
||||
'<td><input type="number" required step="any" class="form-control" name="taux" id="taux"></td>' +
|
||||
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
|
||||
'<td> ' + actions72 + '</td>' +
|
||||
'</tr>';
|
||||
$("#bank_wallet_cart_international").append(row);
|
||||
$("#bank_wallet_cart_international tbody tr").eq(index + 1).find(".add72, .edit72").toggle();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
// Add row on add button click
|
||||
$(document).on("click", ".add72", function () {
|
||||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||
var max = parseFloat($(this).parents("tr").find('input[id="max"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('id') == 'min') {
|
||||
if (min >= max) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else if ($(this).attr('id') == 'max') {
|
||||
if (max <= min) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
} else {
|
||||
if (!$(this)[0].checkValidity()) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
} else {
|
||||
$(this).removeClass("error");
|
||||
}
|
||||
}
|
||||
});
|
||||
$(this).parents("tr").find(".error").first().focus();
|
||||
if (!empty) {
|
||||
input.each(function () {
|
||||
$(this).parent("td").html($(this).val());
|
||||
});
|
||||
$(this).parents("tr").find(".add72, .edit72").toggle();
|
||||
$(".new72").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
// Edit row on edit button click
|
||||
$(document).on("click", ".edit72", function () {
|
||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||
if (index == 0)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" step="any" min="0" value="' + $(this).text() + '">');
|
||||
if (index == 3)
|
||||
$(this).html('<input type="number" class="form-control" min="1" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add7, .edit7").toggle();
|
||||
$(".new72").attr("disabled", "disabled");
|
||||
});
|
||||
// Delete row on delete button click
|
||||
$(document).on("click", ".delete72", function () {
|
||||
$(this).parents("tr").remove();
|
||||
$(".new72").removeAttr("disabled");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue