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 (isset($_POST)) {
$type = $_POST['type'];
$res = false;
$this->db->trans_begin();
if ($method == 'create') {
$country_id = $_POST['country_id'];
$network_id = $_POST['network_id'];
@ -1592,18 +1594,21 @@ class Gestion extends CI_Controller
break;
}
$res = true;
} else if ($type == 'ilink_sante') {
unset($_POST['id_config'], $_POST['type']);
$this->nano_health_model->updateConfig($idConfig, $_POST);
$res = true;
}
}
if ($res != false) {
echo json_encode("200");
} else {
if ($this->db->trans_status() === FALSE) {
$this->db->trans_rollback();
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)
{
$exist = $this->wallet_model->getPalierConfigWallet($name, $idConfig);
if ($exist) {
$this->wallet_model->deletePalierConfigWallet($name, $idConfig);
}
$this->db->delete('paliersConfigWallet',['type' => $type , 'idConfig' => $idConfig]);
if ($palier) {
$data = [];
foreach ($palier as $p) {
$array = json_decode(json_encode($p), true);
$row = [];
foreach ($array as $key => $value) {
$row[] = $value;
}
$this->wallet_model->addPalierConfigWallet($name, $idConfig, $row[0], $row[1], $row[2]);
$data[] = [
'type' => $type,
'min' => $p[0],
'max' => $p[1],
'taux' => $p[2],
'plafond' => !empty($p[3]) ? $p[3] : null,
'idConfig' => $idConfig
];
}
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['EXAM_OR_OTHER'] = "EXAM OR OTHER";
$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['EXAM_OR_OTHER'] = "EXAMEN OU AUTRE";
$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,15 +120,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_agent_depot_wallet_ilink != false) {
foreach ($plr_agent_depot_wallet_ilink->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -149,15 +151,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_agent_depot_wallet_ilink_national != false) {
foreach ($plr_agent_depot_wallet_ilink_national->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -180,15 +184,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_agent_depot_autre_wallet != false) {
foreach ($plr_agent_depot_autre_wallet->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -209,15 +215,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_agent_depot_autre_wallet_national != false) {
foreach ($plr_agent_depot_autre_wallet_national->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -242,15 +250,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_agent_cash_cash != false) {
foreach ($plr_agent_cash_cash->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -271,15 +281,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_agent_cash_cash_national != false) {
foreach ($plr_agent_cash_cash_national->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -302,7 +314,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</div>
<div class="modal-body">
<form id="walletForm">
<div class="row">
<div class="row" style="display:flex; justify-content: center">
<div class="col-lg-4">
<div class="form-group">
<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 ?>">
</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_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>
<div class="row">
<div class="col-lg-6">
<div class="form-group" style="overflow-x:auto;">
<div class="table-title">
<div class="row">
@ -387,6 +358,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -397,7 +369,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" .(isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td>
<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>
@ -410,6 +383,98 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</tbody>
</table>
</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="table-title">
<div class="row">
@ -430,6 +495,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -440,7 +506,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td>
<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>
@ -453,94 +520,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</tbody>
</table>
</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>
<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>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>
<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">
@ -561,6 +544,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -571,7 +555,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td>
<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>
@ -584,6 +569,51 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
</tbody>
</table>
</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>
</form>
@ -695,24 +725,30 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#agent_depot_wallet tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
plr_agent_depot_wallet_ilink.push(arrayItem);
});
$('#agent_depot_autre_wallet tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
plr_agent_depot_autre_wallet.push(arrayItem);
});
$('#agent_cash_cash tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
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 () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
plr_agent_depot_wallet_ilink_national.push(arrayItem);
});
$('#agent_depot_autre_wallet_national tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
plr_agent_depot_autre_wallet_national.push(arrayItem);
});
$('#agent_cash_cash_national tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions3 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions4 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions6 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions9 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions99 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions11 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".new11").attr("disabled", "disabled");

View File

@ -78,15 +78,18 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_user_wallet_cash != false) {
foreach ($plr_user_wallet_cash->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -109,15 +112,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_user_wallet_cash_national != false) {
foreach ($plr_user_wallet_cash_national->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -166,6 +171,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -176,7 +182,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : ''). "</td>" . '
<td>
<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>
@ -211,6 +218,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -221,7 +229,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" .(isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td>
<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>
@ -295,8 +304,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#user_wallet_cash tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
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 () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions2 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions8 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".new8").attr("disabled", "disabled");

View File

@ -77,15 +77,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_user_wallet_wallet != false) {
foreach ($plr_user_wallet_wallet->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -108,15 +110,17 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<th>Min</th>
<th>Max</th>
<th>Taux (%)</th>
<th><?= $this->lang->line('ceiling')?></th>
</tr>
<?php
if ($plr_user_wallet_wallet_national != false) {
foreach ($plr_user_wallet_wallet_national->result() as $row) {
echo "<tr>
<td>" . $fmt->format($row->min) . "</td>
<td>" . $fmt->format($row->max) . "</td>
<td>" . $row->taux . "</td>" . '
</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>';
}
}
?>
@ -164,6 +168,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -174,7 +179,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td>
<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>
@ -209,6 +215,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
<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>
@ -219,7 +226,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo "<tr>
<td>" . $row->min . "</td>
<td>" . $row->max . "</td>
<td>" . $row->taux . "</td>" . '
<td>" . $row->taux . "</td>
<td>" . (isset($row->plafond) ? floatval($row->plafond) : '') . "</td>" . '
<td>
<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>
@ -292,8 +300,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#user_wallet_wallet tr').has('td').each(function () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
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 () {
var arrayItem = {};
$('td', $(this)).each(function (index, item) {
if (index < 3)
arrayItem[index] = parseFloat($(item).html());
if (index < 4){
let val = parseFloat($(item).html())
arrayItem[index] = !isNaN(val) ? val : null;
}
});
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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions1 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".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 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" min="1" class="form-control" name="plafond" id="plafond"></td>' +
'<td> ' + actions7 + '</td>' +
'</tr>';
$("#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() + '">');
if (index == 2)
$(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();
$(".new7").attr("disabled", "disabled");

View File

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