+ Update historiques des transactions
This commit is contained in:
parent
89e9f5d503
commit
eae6ee845a
|
@ -2020,5 +2020,44 @@ class Gestion extends CI_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function cancelIlinkTransation()
|
||||||
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
if (isset($_POST)) {
|
||||||
|
$id_transacton = $_POST['id_transaction'];
|
||||||
|
|
||||||
|
/* API URL */
|
||||||
|
$url = $this->db->wallet_service_url . '/transactions/ilink/' . $id_transacton;
|
||||||
|
|
||||||
|
/* Init cURL resource */
|
||||||
|
$ch = curl_init($url);
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
|
||||||
|
|
||||||
|
/* set the content type json */
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||||
|
'Content-Type:application/json',
|
||||||
|
'Authorization: yhSTSSqIO1uSE1icu09edPOeSFGxIDjo'
|
||||||
|
));
|
||||||
|
|
||||||
|
/* set return type json */
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
|
/* execute request */
|
||||||
|
$result = curl_exec($ch);
|
||||||
|
|
||||||
|
/* close cURL resource */
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
if ($result) {
|
||||||
|
echo json_encode("200");
|
||||||
|
} else {
|
||||||
|
echo json_encode("500");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -519,7 +519,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
||||||
class="col-form-label"><?php echo $this->lang->line('rate_com_agent_depot_autre_wallet_national'); ?></label>
|
class="col-form-label"><?php echo $this->lang->line('rate_com_agent_depot_autre_wallet_national'); ?></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<button type="button" class="btn btn-info add-new new10"><i
|
<button type="button" class="btn btn-info add-new new99"><i
|
||||||
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
|
class="fa fa-plus"></i> <?php echo $this->lang->line('new_level'); ?>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -543,9 +543,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
||||||
<td>" . $row->max . "</td>
|
<td>" . $row->max . "</td>
|
||||||
<td>" . $row->taux . "</td>" . '
|
<td>" . $row->taux . "</td>" . '
|
||||||
<td>
|
<td>
|
||||||
<a class="add add10" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="add add99" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
<a class="edit edit10" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="edit edit99" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
<a class="delete delete10" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
<a class="delete delete99" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
@ -1229,14 +1229,14 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
||||||
$(".new9").removeAttr("disabled");
|
$(".new9").removeAttr("disabled");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Table 10
|
// Table 99
|
||||||
var actions10 = $("#agent_depot_autre_wallet_national td:last-child").html();
|
var actions99 = $("#agent_depot_autre_wallet_national td:last-child").html();
|
||||||
// Append table with add row form on add new button click
|
// Append table with add row form on add new button click
|
||||||
$(".new10").click(function () {
|
$(".new99").click(function () {
|
||||||
if (!actions10) {
|
if (!actions99) {
|
||||||
actions10 = '<a class="add add10" title="Add" data-toggle="tooltip"><i class="material-icons">󠄋</i></a>\n' +
|
actions99 = '<a class="add add99" title="Add" data-toggle="tooltip"><i class="material-icons">󠦛</i></a>\n' +
|
||||||
' <a class="edit edit10" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
' <a class="edit edit99" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||||
' <a class="delete delete10" title="Delete" data-toggle="tooltip"><i class="material-icons">�</i></a>';
|
' <a class="delete delete99" title="Delete" data-toggle="tooltip"><i class="material-icons">�</i></a>';
|
||||||
}
|
}
|
||||||
$(this).attr("disabled", "disabled");
|
$(this).attr("disabled", "disabled");
|
||||||
var index = $("#agent_depot_autre_wallet_national tbody tr:last-child").index();
|
var index = $("#agent_depot_autre_wallet_national tbody tr:last-child").index();
|
||||||
|
@ -1244,14 +1244,14 @@ $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> ' + actions10 + '</td>' +
|
'<td> ' + actions99 + '</td>' +
|
||||||
'</tr>';
|
'</tr>';
|
||||||
$("#agent_depot_autre_wallet_national").append(row);
|
$("#agent_depot_autre_wallet_national").append(row);
|
||||||
$("#agent_depot_autre_wallet_national tbody tr").eq(index + 1).find(".add, .edit").toggle();
|
$("#agent_depot_autre_wallet_national tbody tr").eq(index + 1).find(".add, .edit").toggle();
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
});
|
});
|
||||||
// Add row on add button click
|
// Add row on add button click
|
||||||
$(document).on("click", ".add10", function () {
|
$(document).on("click", ".add99", function () {
|
||||||
var empty = false;
|
var empty = false;
|
||||||
var input = $(this).parents("tr").find('input[type="number"]');
|
var input = $(this).parents("tr").find('input[type="number"]');
|
||||||
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
var min = parseFloat($(this).parents("tr").find('input[id="min"]').first().val());
|
||||||
|
@ -1290,11 +1290,11 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
||||||
$(this).parent("td").html($(this).val());
|
$(this).parent("td").html($(this).val());
|
||||||
});
|
});
|
||||||
$(this).parents("tr").find(".add, .edit").toggle();
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
$(".new10").removeAttr("disabled");
|
$(".new99").removeAttr("disabled");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Edit row on edit button click
|
// Edit row on edit button click
|
||||||
$(document).on("click", ".edit10", function () {
|
$(document).on("click", ".edit99", function () {
|
||||||
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
$(this).parents("tr").find("td:not(:last-child)").each(function (index) {
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
$(this).html('<input type="number" required class="form-control" min="0" id="min" value="' + $(this).text() + '">');
|
||||||
|
@ -1304,14 +1304,15 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
|
||||||
$(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() + '">');
|
||||||
});
|
});
|
||||||
$(this).parents("tr").find(".add, .edit").toggle();
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
$(".new10").attr("disabled", "disabled");
|
$(".new99").attr("disabled", "disabled");
|
||||||
});
|
});
|
||||||
// Delete row on delete button click
|
// Delete row on delete button click
|
||||||
$(document).on("click", ".delete10", function () {
|
$(document).on("click", ".delete99", function () {
|
||||||
$(this).parents("tr").remove();
|
$(this).parents("tr").remove();
|
||||||
$(".new10").removeAttr("disabled");
|
$(".new99").removeAttr("disabled");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Table 11
|
// Table 11
|
||||||
var actions11 = $("#agent_cash_cash_national td:last-child").html();
|
var actions11 = $("#agent_cash_cash_national td:last-child").html();
|
||||||
// Append table with add row form on add new button click
|
// Append table with add row form on add new button click
|
||||||
|
|
|
@ -194,11 +194,12 @@ use Brick\Money\Money;
|
||||||
<td>".toLocateDate($row->date,$this->session->userdata('timezone'))."</td>";
|
<td>".toLocateDate($row->date,$this->session->userdata('timezone'))."</td>";
|
||||||
?>
|
?>
|
||||||
<?php if ($this->session->userdata('category') != 'super') { ?>
|
<?php if ($this->session->userdata('category') != 'super') { ?>
|
||||||
<td>
|
<td>
|
||||||
<button data-id-transaction="<?= $row->id ?>" id="cancel" class="btn btn-danger btn-block" <?php if($row->canceled) echo "disabled"?> >
|
<button data-id-transaction="<?= $row->id_transaction ?>" id="cancel"
|
||||||
<b><?php echo $this->lang->line('cancel')?></b>
|
class="btn btn-danger btn-block" <?php if ($row->canceled) echo "disabled" ?> >
|
||||||
|
<b><?php echo $this->lang->line('cancel') ?></b>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue