|
|
|
@ -26,7 +26,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
<?= $this->lang->line('config_agent').' - '.$this->lang->line('config_ilink_agent_remove_cash'); ?>
|
|
|
|
|
</h1>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($alert == "ok") {
|
|
|
|
|
|
|
|
|
@ -63,71 +63,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</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_customer_remove_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_wallet_cash_international) {
|
|
|
|
|
foreach ($plr_customer_wallet_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_customer_remove_cash_national'); ?></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_wallet_cash_national) {
|
|
|
|
|
foreach ($plr_customer_wallet_cash_national->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>
|
|
|
|
|
<div class="callout callout-info">
|
|
|
|
|
<p>Note</p>
|
|
|
|
|
<h4><?= $this->lang->line('note_config_wallet_agent_remove_cash') ?></h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-6 col-xs-12">
|
|
|
|
@ -270,100 +208,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<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_customer_remove_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="customer_wallet_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_wallet_cash_international) {
|
|
|
|
|
foreach ($plr_customer_wallet_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">
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<label for="nom"
|
|
|
|
|
class="col-form-label"><?= $this->lang->line('rate_com_customer_remove_cash_national'); ?></label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-sm-4">
|
|
|
|
|
<button type="button" class="btn btn-info add-new new7"><i
|
|
|
|
|
class="fa fa-plus"></i> <?= $this->lang->line('new_level'); ?>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table id="customer_wallet_cash_national" 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_wallet_cash_national) {
|
|
|
|
|
foreach ($plr_customer_wallet_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 add7" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
|
|
|
|
<a class="edit edit7" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
|
|
|
|
<a class="delete delete7" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-lg-6">
|
|
|
|
|
<div class="form-group" style="overflow-x:auto;">
|
|
|
|
@ -603,11 +447,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
// Paliers
|
|
|
|
|
let plr_agent_wallet_cash_national = getPaliersTable('agent_wallet_cash_national');
|
|
|
|
|
let plr_sup_wallet_cash_national = getPaliersTable('sup_wallet_cash_national');
|
|
|
|
|
let plr_customer_wallet_cash_national = getPaliersTable('customer_wallet_cash_national');
|
|
|
|
|
|
|
|
|
|
let plr_agent_wallet_cash_international = getPaliersTable('agent_wallet_cash_international');
|
|
|
|
|
let plr_sup_wallet_cash_international = getPaliersTable('sup_wallet_cash_international');
|
|
|
|
|
let plr_customer_wallet_cash_international = getPaliersTable('customer_wallet_cash_international');
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '<?= base_url('Gestion/config_wallet/update')?>',
|
|
|
|
@ -619,10 +461,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
"network_id": network_id, "id_config": id_config,
|
|
|
|
|
"plr_agent_wallet_cash_national": plr_agent_wallet_cash_national,
|
|
|
|
|
"plr_sup_wallet_cash_national": plr_sup_wallet_cash_national,
|
|
|
|
|
"plr_customer_wallet_cash_national": plr_customer_wallet_cash_national,
|
|
|
|
|
"plr_agent_wallet_cash_international": plr_agent_wallet_cash_international,
|
|
|
|
|
"plr_sup_wallet_cash_international": plr_sup_wallet_cash_international,
|
|
|
|
|
"plr_customer_wallet_cash_international": plr_customer_wallet_cash_international,
|
|
|
|
|
},
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data == '200') {
|
|
|
|
@ -836,93 +676,6 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Paliers nationaux
|
|
|
|
|
|
|
|
|
|
// Table 7
|
|
|
|
|
var actions7 = $("#customer_wallet_cash_national td:last-child").html();
|
|
|
|
|
// Append table with add row form on add new button click
|
|
|
|
|
$(".new7").click(function () {
|
|
|
|
|
if (!actions7) {
|
|
|
|
|
actions7 = '<a class="add add7" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
|
|
|
|
' <a class="edit edit7" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
|
|
|
|
' <a class="delete delete7" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
|
|
|
|
}
|
|
|
|
|
$(this).attr("disabled", "disabled");
|
|
|
|
|
var index = $("#customer_wallet_cash_national 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> ' + actions7 + '</td>' +
|
|
|
|
|
'</tr>';
|
|
|
|
|
$("#customer_wallet_cash_national").append(row);
|
|
|
|
|
$("#customer_wallet_cash_national tbody tr").eq(index + 1).find(".add7, .edit7").toggle();
|
|
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
|
|
|
});
|
|
|
|
|
// Add row on add button click
|
|
|
|
|
$(document).on("click", ".add7", 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(".add7, .edit7").toggle();
|
|
|
|
|
$(".new7").removeAttr("disabled");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// Edit row on edit button click
|
|
|
|
|
$(document).on("click", ".edit7", 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();
|
|
|
|
|
$(".new7").attr("disabled", "disabled");
|
|
|
|
|
});
|
|
|
|
|
// Delete row on delete button click
|
|
|
|
|
$(document).on("click", ".delete7", function () {
|
|
|
|
|
$(this).parents("tr").remove();
|
|
|
|
|
$(".new7").removeAttr("disabled");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* INTERNATIONAUX
|
|
|
|
|
*/
|
|
|
|
@ -1099,94 +852,5 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
|
|
|
|
$(this).parents("tr").remove();
|
|
|
|
|
$(".new12").removeAttr("disabled");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Paliers nationaux
|
|
|
|
|
|
|
|
|
|
// Table 7
|
|
|
|
|
var actions72 = $("#customer_wallet_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 = $("#customer_wallet_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>';
|
|
|
|
|
$("#customer_wallet_cash_international").append(row);
|
|
|
|
|
$("#customer_wallet_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>
|
|
|
|
|