From eae6ee845aa515a6774890807d94d5a9478e82b0 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Fri, 17 Jul 2020 14:46:50 +0100 Subject: [PATCH] + Update historiques des transactions --- application/controllers/Gestion.php | 39 +++++++++++++++++++ .../agent_send_cash_canal.php | 37 +++++++++--------- .../views/historique_transactions_ilink.php | 9 +++-- 3 files changed, 63 insertions(+), 22 deletions(-) diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index 6328edf0..4989bee8 100755 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -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"); + } + } + } + } + + } diff --git a/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php b/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php index 645af52a..eaf98416 100755 --- a/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php +++ b/application/views/config_wallet_ilink_hyp/agent_send_cash_canal.php @@ -519,7 +519,7 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); class="col-form-label">lang->line('rate_com_agent_depot_autre_wallet_national'); ?>
-
@@ -543,9 +543,9 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); " . $row->max . " " . $row->taux . "" . ' - - - + + + '; } @@ -1229,14 +1229,14 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); $(".new9").removeAttr("disabled"); }); - // Table 10 - var actions10 = $("#agent_depot_autre_wallet_national td:last-child").html(); + // Table 99 + var actions99 = $("#agent_depot_autre_wallet_national td:last-child").html(); // Append table with add row form on add new button click - $(".new10").click(function () { - if (!actions10) { - actions10 = '󠄋\n' + - ' \n' + - ' '; + $(".new99").click(function () { + if (!actions99) { + actions99 = '󠦛\n' + + ' \n' + + ' '; } $(this).attr("disabled", "disabled"); var index = $("#agent_depot_autre_wallet_national tbody tr:last-child").index(); @@ -1244,14 +1244,14 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); '' + '' + '' + - ' ' + actions10 + '' + + ' ' + actions99 + '' + ''; $("#agent_depot_autre_wallet_national").append(row); $("#agent_depot_autre_wallet_national tbody tr").eq(index + 1).find(".add, .edit").toggle(); $('[data-toggle="tooltip"]').tooltip(); }); // Add row on add button click - $(document).on("click", ".add10", function () { + $(document).on("click", ".add99", 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()); @@ -1290,11 +1290,11 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); $(this).parent("td").html($(this).val()); }); $(this).parents("tr").find(".add, .edit").toggle(); - $(".new10").removeAttr("disabled"); + $(".new99").removeAttr("disabled"); } }); // 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) { if (index == 0) $(this).html(''); @@ -1304,14 +1304,15 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); $(this).html(''); }); $(this).parents("tr").find(".add, .edit").toggle(); - $(".new10").attr("disabled", "disabled"); + $(".new99").attr("disabled", "disabled"); }); // Delete row on delete button click - $(document).on("click", ".delete10", function () { + $(document).on("click", ".delete99", function () { $(this).parents("tr").remove(); - $(".new10").removeAttr("disabled"); + $(".new99").removeAttr("disabled"); }); + // Table 11 var actions11 = $("#agent_cash_cash_national td:last-child").html(); // Append table with add row form on add new button click diff --git a/application/views/historique_transactions_ilink.php b/application/views/historique_transactions_ilink.php index 70b26bdf..764337db 100755 --- a/application/views/historique_transactions_ilink.php +++ b/application/views/historique_transactions_ilink.php @@ -194,11 +194,12 @@ use Brick\Money\Money; ".toLocateDate($row->date,$this->session->userdata('timezone')).""; ?> session->userdata('category') != 'super') { ?> - - - +