From 5c37da039cbc00443104e6872d6f903c578d5445 Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 5 Oct 2021 22:38:24 +0200 Subject: [PATCH] Use POST for delete supplier & customer (#3336) --- application/views/receivings/receiving.php | 13 +++++++++++-- application/views/sales/register.php | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index d67c05e5da..056a3a771e 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -276,8 +276,10 @@ ?> -  ' . $this->lang->line('common_remove').' '.$this->lang->line('suppliers_supplier'), - array('class'=>'btn btn-danger btn-sm', 'id'=>'remove_supplier_button', 'title'=>$this->lang->line('common_remove').' '.$this->lang->line('suppliers_supplier'))); ?> + + $(document).ready(function() { + $("#remove_supplier_button").click(function() { + $.post("", function() { + window.location.href = ""; + }); + + }); + $("#item").autocomplete( { source: '', diff --git a/application/views/sales/register.php b/application/views/sales/register.php index 1f3f97ee8c..10e1fe9a86 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -382,8 +382,10 @@ ?> -  ' . $this->lang->line('common_remove').' '.$this->lang->line('customers_customer'), - array('class'=>'btn btn-danger btn-sm', 'id'=>'remove_customer_button', 'title'=>$this->lang->line('common_remove').' '.$this->lang->line('customers_customer'))); ?> + + $(document).ready(function() { + $("#remove_customer_button").click(function() { + $.post("", function() { + window.location.href = ""; + }); + + }); + $("input[name='item_number']").change(function() { var item_id = $(this).parents('tr').find("input[name='item_id']").val(); var item_number = $(this).val();