Add ceiling (plafond) to ilink paliers config wallets

This commit is contained in:
Djery-Tom 2022-04-14 19:27:49 +01:00
parent 165ab3d689
commit 9b0644b116
7 changed files with 335 additions and 218 deletions

View File

@ -1489,7 +1489,9 @@ class Gestion extends CI_Controller
if ($this->isLogged()) { if ($this->isLogged()) {
if (isset($_POST)) { if (isset($_POST)) {
$type = $_POST['type']; $type = $_POST['type'];
$res = false;
$this->db->trans_begin();
if ($method == 'create') { if ($method == 'create') {
$country_id = $_POST['country_id']; $country_id = $_POST['country_id'];
$network_id = $_POST['network_id']; $network_id = $_POST['network_id'];
@ -1592,18 +1594,21 @@ class Gestion extends CI_Controller
break; break;
} }
$res = true;
} else if ($type == 'ilink_sante') { } else if ($type == 'ilink_sante') {
unset($_POST['id_config'], $_POST['type']); unset($_POST['id_config'], $_POST['type']);
$this->nano_health_model->updateConfig($idConfig, $_POST); $this->nano_health_model->updateConfig($idConfig, $_POST);
$res = true;
} }
} }
if ($res != false) {
echo json_encode("200"); if ($this->db->trans_status() === FALSE) {
} else { $this->db->trans_rollback();
echo json_encode("500"); echo json_encode("500");
} else {
$this->db->trans_commit();
echo json_encode("200");
} }
} }
} }
@ -1629,22 +1634,24 @@ class Gestion extends CI_Controller
} }
} }
private function insertPalier($palier, $name, $idConfig) private function insertPalier($palier, $type, $idConfig)
{ {
$this->db->delete('paliersConfigWallet',['type' => $type , 'idConfig' => $idConfig]);
$exist = $this->wallet_model->getPalierConfigWallet($name, $idConfig);
if ($exist) {
$this->wallet_model->deletePalierConfigWallet($name, $idConfig);
}
if ($palier) { if ($palier) {
$data = [];
foreach ($palier as $p) { foreach ($palier as $p) {
$array = json_decode(json_encode($p), true); $data[] = [
$row = []; 'type' => $type,
foreach ($array as $key => $value) { 'min' => $p[0],
$row[] = $value; 'max' => $p[1],
'taux' => $p[2],
'plafond' => !empty($p[3]) ? $p[3] : null,
'idConfig' => $idConfig
];
} }
$this->wallet_model->addPalierConfigWallet($name, $idConfig, $row[0], $row[1], $row[2]); if(sizeof($data) > 0){
$this->db->insert_batch('paliersConfigWallet',$data);
} }
} }
} }

View File

@ -912,4 +912,8 @@ $lang['issuer_agent'] = "Issuing agent";
$lang['CONSULTATION'] = "CONSULTATION"; $lang['CONSULTATION'] = "CONSULTATION";
$lang['EXAM_OR_OTHER'] = "EXAM OR OTHER"; $lang['EXAM_OR_OTHER'] = "EXAM OR OTHER";
$lang['consultation_cannot_have_unit_price'] = "A consultation cannot have a unit price"; $lang['consultation_cannot_have_unit_price'] = "A consultation cannot have a unit price";
$lang['EXPIRED'] = 'EXPIRED';
$lang['SUSPENDED'] = "SUSPENDED";
$lang['billed_quantity'] = "Billed quantity";
$lang['ceiling'] = "Ceiling";
?> ?>

View File

@ -922,5 +922,8 @@ $lang['issuer_agent'] = "Agent emetteur";
$lang['CONSULTATION'] = "CONSULTATION"; $lang['CONSULTATION'] = "CONSULTATION";
$lang['EXAM_OR_OTHER'] = "EXAMEN OU AUTRE"; $lang['EXAM_OR_OTHER'] = "EXAMEN OU AUTRE";
$lang['consultation_cannot_have_unit_price'] = "Une consultation ne peut pas avoir de prix unitaire"; $lang['consultation_cannot_have_unit_price'] = "Une consultation ne peut pas avoir de prix unitaire";
$lang['SUSPENDED'] = "SUSPENDU" $lang['SUSPENDED'] = "SUSPENDU";
$lang['EXPIRED'] = 'EXPIRÉE';
$lang['billed_quantity'] = "Quantité facturée";
$lang['ceiling'] = "Plafond";
?> ?>

View File

@ -120,6 +120,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_agent_depot_wallet_ilink != false) { if ($plr_agent_depot_wallet_ilink != false) {
@ -127,7 +128,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -149,6 +151,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_agent_depot_wallet_ilink_national != false) { if ($plr_agent_depot_wallet_ilink_national != false) {
@ -156,7 +159,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -180,6 +184,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_agent_depot_autre_wallet != false) { if ($plr_agent_depot_autre_wallet != false) {
@ -187,7 +192,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -209,6 +215,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_agent_depot_autre_wallet_national != false) { if ($plr_agent_depot_autre_wallet_national != false) {
@ -216,7 +223,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -242,6 +250,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_agent_cash_cash != false) { if ($plr_agent_cash_cash != false) {
@ -249,7 +258,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -271,6 +281,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_agent_cash_cash_national != false) { if ($plr_agent_cash_cash_national != false) {
@ -278,7 +289,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -302,7 +314,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form id="walletForm"> <form id="walletForm">
<div class="row"> <div class="row" style="display:flex; justify-content: center">
<div class="col-lg-4"> <div class="col-lg-4">
<div class="form-group"> <div class="form-group">
<label for="taux_ag_s_c" <label for="taux_ag_s_c"
@ -323,50 +335,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
name="taux_hyp_s_c" id="taux_hyp_s_c" value="<?= $taux_hyp_s_c ?>"> name="taux_hyp_s_c" id="taux_hyp_s_c" value="<?= $taux_hyp_s_c ?>">
</div> </div>
</div> </div>
<div class="col-lg-4"> </div>
<div class="form-group">
<div class="table-title">
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-lg-6">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('rate_com_agent_depot_wallet_national'); ?></label>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-info add-new new9"><i
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
</button>
</div>
</div>
</div>
<table id="agent_depot_wallet_national" class="table table-bordered">
<thead>
<tr>
<th>Min</th>
<th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if ($plr_agent_depot_wallet_ilink_national != false) {
foreach ($plr_agent_depot_wallet_ilink_national->result() as $row) {
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>
<a class="add add9" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit9" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
<a class="delete delete9" title="Delete" data-toggle="tooltip"><i class="material-icons">&#xE872;</i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
<div class="form-group" style="overflow-x:auto;"> <div class="form-group" style="overflow-x:auto;">
<div class="table-title"> <div class="table-title">
<div class="row"> <div class="row">
@ -387,6 +358,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -397,7 +369,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" .(isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td> <td>
<a class="add add3" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add3" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit3" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit3" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -410,6 +383,98 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="form-group">
<div class="table-title">
<div class="row">
<div class="col-sm-8">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('rate_com_agent_depot_wallet_national'); ?></label>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-info add-new new9"><i
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
</button>
</div>
</div>
</div>
<table id="agent_depot_wallet_national" class="table table-bordered">
<thead>
<tr>
<th>Min</th>
<th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if ($plr_agent_depot_wallet_ilink_national != false) {
foreach ($plr_agent_depot_wallet_ilink_national->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 add9" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit9" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
<a class="delete delete9" title="Delete" data-toggle="tooltip"><i class="material-icons">&#xE872;</i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</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"><?php echo $this->lang->line('rate_com_agent_depot_autre_wallet_international'); ?></label>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-info add-new new6"><i
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
</button>
</div>
</div>
</div>
<table id="agent_depot_autre_wallet" class="table table-bordered">
<thead>
<tr>
<th>Min</th>
<th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if ($plr_agent_depot_autre_wallet != false) {
foreach ($plr_agent_depot_autre_wallet->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 add6" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit6" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
<a class="delete delete6" title="Delete" data-toggle="tooltip"><i class="material-icons">&#xE872;</i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
<div class="form-group"> <div class="form-group">
<div class="table-title"> <div class="table-title">
<div class="row"> <div class="row">
@ -430,6 +495,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -440,7 +506,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td> <td>
<a class="add add99" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add99" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit99" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit99" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -453,94 +520,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</tbody> </tbody>
</table> </table>
</div> </div>
<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"><?php echo $this->lang->line('rate_com_agent_depot_autre_wallet_international'); ?></label>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-info add-new new6"><i
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
</button>
</div> </div>
</div> </div>
</div> <div class="row" style="display:flex; justify-content: center">
<table id="agent_depot_autre_wallet" class="table table-bordered"> <div class="col-lg-6">
<thead>
<tr>
<th>Min</th>
<th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if ($plr_agent_depot_autre_wallet != false) {
foreach ($plr_agent_depot_autre_wallet->result() as $row) {
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>
<a class="add add6" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit6" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
<a class="delete delete6" title="Delete" data-toggle="tooltip"><i class="material-icons">&#xE872;</i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<div class="table-title">
<div class="row">
<div class="col-sm-8">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('rate_com_agent_cash_cash_national'); ?></label>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-info add-new new11"><i
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
</button>
</div>
</div>
</div>
<table id="agent_cash_cash_national" class="table table-bordered">
<thead>
<tr>
<th>Min</th>
<th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if ($plr_agent_cash_cash_national != false) {
foreach ($plr_agent_cash_cash_national->result() as $row) {
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>
<a class="add add11" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit11" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
<a class="delete delete11" title="Delete" data-toggle="tooltip"><i class="material-icons">&#xE872;</i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
<div class="form-group" style="overflow-x:auto;"> <div class="form-group" style="overflow-x:auto;">
<div class="table-title"> <div class="table-title">
<div class="row"> <div class="row">
@ -561,6 +544,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -571,7 +555,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td> <td>
<a class="add add4" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add4" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit4" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit4" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -584,6 +569,51 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="form-group">
<div class="table-title">
<div class="row">
<div class="col-sm-8">
<label for="nom"
class="col-form-label"><?php echo $this->lang->line('rate_com_agent_cash_cash_national'); ?></label>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-info add-new new11"><i
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
</button>
</div>
</div>
</div>
<table id="agent_cash_cash_national" class="table table-bordered">
<thead>
<tr>
<th>Min</th>
<th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if ($plr_agent_cash_cash_national != false) {
foreach ($plr_agent_cash_cash_national->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 add11" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit11" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
<a class="delete delete11" title="Delete" data-toggle="tooltip"><i class="material-icons">&#xE872;</i></a>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</div> </div>
</div> </div>
</form> </form>
@ -695,24 +725,30 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#agent_depot_wallet tr').has('td').each(function () { $('#agent_depot_wallet tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_agent_depot_wallet_ilink.push(arrayItem); plr_agent_depot_wallet_ilink.push(arrayItem);
}); });
$('#agent_depot_autre_wallet tr').has('td').each(function () { $('#agent_depot_autre_wallet tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_agent_depot_autre_wallet.push(arrayItem); plr_agent_depot_autre_wallet.push(arrayItem);
}); });
$('#agent_cash_cash tr').has('td').each(function () { $('#agent_cash_cash tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_agent_cash_cash.push(arrayItem); plr_agent_cash_cash.push(arrayItem);
}); });
@ -721,24 +757,30 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#agent_depot_wallet_national tr').has('td').each(function () { $('#agent_depot_wallet_national tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_agent_depot_wallet_ilink_national.push(arrayItem); plr_agent_depot_wallet_ilink_national.push(arrayItem);
}); });
$('#agent_depot_autre_wallet_national tr').has('td').each(function () { $('#agent_depot_autre_wallet_national tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_agent_depot_autre_wallet_national.push(arrayItem); plr_agent_depot_autre_wallet_national.push(arrayItem);
}); });
$('#agent_cash_cash_national tr').has('td').each(function () { $('#agent_cash_cash_national tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_agent_cash_cash_national.push(arrayItem); plr_agent_cash_cash_national.push(arrayItem);
}); });
@ -809,6 +851,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions3 + '</td>' + '<td> ' + actions3 + '</td>' +
'</tr>'; '</tr>';
$("#agent_depot_wallet").append(row); $("#agent_depot_wallet").append(row);
@ -867,6 +910,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new3").attr("disabled", "disabled"); $(".new3").attr("disabled", "disabled");
@ -892,6 +937,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions4 + '</td>' + '<td> ' + actions4 + '</td>' +
'</tr>'; '</tr>';
$("#agent_cash_cash").append(row); $("#agent_cash_cash").append(row);
@ -950,6 +996,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new4").attr("disabled", "disabled"); $(".new4").attr("disabled", "disabled");
@ -975,6 +1023,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions6 + '</td>' + '<td> ' + actions6 + '</td>' +
'</tr>'; '</tr>';
$("#agent_depot_autre_wallet").append(row); $("#agent_depot_autre_wallet").append(row);
@ -1033,6 +1082,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new6").attr("disabled", "disabled"); $(".new6").attr("disabled", "disabled");
@ -1060,6 +1111,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions9 + '</td>' + '<td> ' + actions9 + '</td>' +
'</tr>'; '</tr>';
$("#agent_depot_wallet_national").append(row); $("#agent_depot_wallet_national").append(row);
@ -1118,6 +1170,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new9").attr("disabled", "disabled"); $(".new9").attr("disabled", "disabled");
@ -1143,6 +1197,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions99 + '</td>' + '<td> ' + actions99 + '</td>' +
'</tr>'; '</tr>';
$("#agent_depot_autre_wallet_national").append(row); $("#agent_depot_autre_wallet_national").append(row);
@ -1201,6 +1256,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new99").attr("disabled", "disabled"); $(".new99").attr("disabled", "disabled");
@ -1227,6 +1284,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions11 + '</td>' + '<td> ' + actions11 + '</td>' +
'</tr>'; '</tr>';
$("#agent_cash_cash_national").append(row); $("#agent_cash_cash_national").append(row);
@ -1285,6 +1343,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">');
if (index == 3)
$(this).html('<input type="number" class="form-control" min="0" value="' + $(this).text() + '">');
}); });
$(this).parents("tr").find(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new11").attr("disabled", "disabled"); $(".new11").attr("disabled", "disabled");

View File

@ -78,6 +78,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_user_wallet_cash != false) { if ($plr_user_wallet_cash != false) {
@ -85,7 +87,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -109,6 +112,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_user_wallet_cash_national != false) { if ($plr_user_wallet_cash_national != false) {
@ -116,7 +120,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -166,6 +171,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -176,7 +182,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : ''). "</td>" . '
<td> <td>
<a class="add add2" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add2" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit2" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit2" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -211,6 +218,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -221,7 +229,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" .(isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td> <td>
<a class="add add8" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add8" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit8" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit8" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -295,8 +304,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#user_wallet_cash tr').has('td').each(function () { $('#user_wallet_cash tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_user_wallet_cash.push(arrayItem); plr_user_wallet_cash.push(arrayItem);
}); });
@ -304,8 +315,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#user_wallet_cash_national tr').has('td').each(function () { $('#user_wallet_cash_national tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_user_wallet_cash_national.push(arrayItem); plr_user_wallet_cash_national.push(arrayItem);
}); });
@ -369,6 +382,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions2 + '</td>' + '<td> ' + actions2 + '</td>' +
'</tr>'; '</tr>';
$("#user_wallet_cash").append(row); $("#user_wallet_cash").append(row);
@ -427,6 +441,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new2").attr("disabled", "disabled"); $(".new2").attr("disabled", "disabled");
@ -453,6 +469,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions8 + '</td>' + '<td> ' + actions8 + '</td>' +
'</tr>'; '</tr>';
$("#user_wallet_cash_national").append(row); $("#user_wallet_cash_national").append(row);
@ -511,6 +528,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new8").attr("disabled", "disabled"); $(".new8").attr("disabled", "disabled");

View File

@ -77,6 +77,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_user_wallet_wallet != false) { if ($plr_user_wallet_wallet != false) {
@ -84,7 +85,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -108,6 +110,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th>Taux (%)</th> <th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr> </tr>
<?php <?php
if ($plr_user_wallet_wallet_national != false) { if ($plr_user_wallet_wallet_national != false) {
@ -115,7 +118,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $fmt->format($row->min) . "</td> <td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td> <td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
</tr>'; </tr>';
} }
} }
@ -164,6 +168,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -174,7 +179,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td> <td>
<a class="add add1" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add1" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit1" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit1" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -209,6 +215,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th> <th>Min</th>
<th>Max</th> <th>Max</th>
<th><?php echo $this->lang->line('rate'); ?> (%)</th> <th><?php echo $this->lang->line('rate'); ?> (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -219,7 +226,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr> echo "<tr>
<td>" . $row->min . "</td> <td>" . $row->min . "</td>
<td>" . $row->max . "</td> <td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . ' <td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td> <td>
<a class="add add7" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a> <a class="add add7" title="Add" data-toggle="tooltip"><i class="material-icons">&#xE03B;</i></a>
<a class="edit edit7" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a> <a class="edit edit7" title="Edit" data-toggle="tooltip"><i class="material-icons">&#xE254;</i></a>
@ -292,8 +300,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#user_wallet_wallet tr').has('td').each(function () { $('#user_wallet_wallet tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_user_wallet_wallet.push(arrayItem); plr_user_wallet_wallet.push(arrayItem);
}); });
@ -302,8 +312,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#user_wallet_wallet_national tr').has('td').each(function () { $('#user_wallet_wallet_national tr').has('td').each(function () {
var arrayItem = {}; var arrayItem = {};
$('td', $(this)).each(function (index, item) { $('td', $(this)).each(function (index, item) {
if (index < 3) if (index < 4){
arrayItem[index] = parseFloat($(item).html()); let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
}); });
plr_user_wallet_wallet_national.push(arrayItem); plr_user_wallet_wallet_national.push(arrayItem);
}); });
@ -366,6 +378,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" min="0" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" min="0" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions1 + '</td>' + '<td> ' + actions1 + '</td>' +
'</tr>'; '</tr>';
$("#user_wallet_wallet").append(row); $("#user_wallet_wallet").append(row);
@ -424,6 +437,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new1").attr("disabled", "disabled"); $(".new1").attr("disabled", "disabled");
@ -452,6 +467,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
'<td><input type="number" required min="0" class="form-control" name="min" id="min"></td>' + '<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" name="max" id="max"></td>' +
'<td><input type="number" required class="form-control" name="taux" id="taux"></td>' + '<td><input type="number" required class="form-control" name="taux" id="taux"></td>' +
'<td><input type="number" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions7 + '</td>' + '<td> ' + actions7 + '</td>' +
'</tr>'; '</tr>';
$("#user_wallet_wallet_national").append(row); $("#user_wallet_wallet_national").append(row);
@ -510,6 +526,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" id="max" value="' + $(this).text() + '">');
if (index == 2) if (index == 2)
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">'); $(this).html('<input type="number" required class="form-control" 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(".add, .edit").toggle(); $(this).parents("tr").find(".add, .edit").toggle();
$(".new7").attr("disabled", "disabled"); $(".new7").attr("disabled", "disabled");

View File

@ -361,6 +361,9 @@
<th><?= $this->lang->line('drugs_or_device'); ?></th> <th><?= $this->lang->line('drugs_or_device'); ?></th>
<th><?= $this->lang->line('dosage'); ?></th> <th><?= $this->lang->line('dosage'); ?></th>
<th><?= $this->lang->line('quantity'); ?></th> <th><?= $this->lang->line('quantity'); ?></th>
<?php if($health_care_sheet->type == 'CONSULTATION') { ?>
<th><?= $this->lang->line('billed_quantity'); ?></th>
<?php } ?>
<?php if($health_care_sheet->type == 'EXECUTION') { ?> <?php if($health_care_sheet->type == 'EXECUTION') { ?>
<th><?= $this->lang->line('UNIT_PRICE'); ?></th> <th><?= $this->lang->line('UNIT_PRICE'); ?></th>
<th><?= $this->lang->line('percentage_insured'); ?></th> <th><?= $this->lang->line('percentage_insured'); ?></th>
@ -383,6 +386,9 @@
<td>" . $row->drug_or_device_name . "</td> <td>" . $row->drug_or_device_name . "</td>
<td>" . $row->dosage . "</td> <td>" . $row->dosage . "</td>
<td>" . $row->quantity. "</td>"; <td>" . $row->quantity. "</td>";
if($health_care_sheet->type == 'CONSULTATION') { ?>
<td><?= $row->billed_quantity ?? 0 ?></td>
<?php }
if($health_care_sheet->type == 'EXECUTION') { ?> if($health_care_sheet->type == 'EXECUTION') { ?>
<td><?= $unit_price ?></td> <td><?= $unit_price ?></td>
<td><?= $insured_part ?></td> <td><?= $insured_part ?></td>