From deb596a210fb48e579cd790b33abbca72b305dac Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 13 Aug 2019 11:16:25 +0100 Subject: [PATCH] Bug 23354: Add ability to remove items This patch adds the ability to remove items from a transactions on the new Point of Sale pay page. Test plan: 1) Populate a transaction with at least one item. 2) Note the new button to 'Remove item' on the items table. 3) Click the button and confirm the item is removed 4) Signoff Sponsored-by: PTFS Europe Sponsored-by: Cheshire Libraries Shared Services Signed-off-by: Kyle M Hall Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt index 1946646c94..163d64f05f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt @@ -39,6 +39,7 @@ Cost Quantity Total + Action @@ -47,6 +48,7 @@ Total payable: + @@ -183,7 +185,8 @@ invoiceTitle, invoicePrice, 1, - null + null, + '' ] ); } @@ -263,7 +266,7 @@ "bSortable": false, "bSearchable": false, }, { - "aTargets": [-1], + "aTargets": [-2], "mRender": function ( data, type, full ) { var price = Number.parseFloat(data).toFixed(2); return '£'+price; @@ -303,6 +306,10 @@ } })); + $("#sale").on("click", "button.drop", function(){ + sale_table.DataTable().row($(this).parents('tr')).remove().draw(false); + }); + var items_table = $("#invoices").dataTable($.extend(true,{}, dataTablesDefaults, { "aoColumnDefs": [ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable":false }, -- 2.39.5