From 58c88baf08f4c3d9c229a9398f871aabf232f252 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 26 Apr 2015 23:08:42 +0200 Subject: [PATCH] Purchases/Direct Invoice: added Update button for refreshing tax summary on demand. --- purchasing/includes/ui/po_ui.inc | 3 ++- purchasing/po_entry_items.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index ae063b6e..9a9b716c 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -274,7 +274,8 @@ function display_po_items(&$order, $editable=true) start_row(); label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'"); - $order->order_no ? submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true) + $order->trans_type == ST_SUPPINVOICE + ? submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true) : label_cell('', "colspan=2"); end_row(); diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index 3a898d3d..4a5c42fc 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -429,6 +429,11 @@ function handle_commit_order() } } //--------------------------------------------------------------------------------------------------- +if (isset($_POST['update'])) { + copy_to_cart(); + $Ajax->activate('items_table'); +} + $id = find_submit('Delete'); if ($id != -1) handle_delete_item($id); -- 2.30.2