Purchases/Direct Invoice: added Update button for refreshing tax summary on demand.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 26 Apr 2015 21:08:42 +0000 (23:08 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 5 May 2015 08:02:12 +0000 (10:02 +0200)
purchasing/includes/ui/po_ui.inc
purchasing/po_entry_items.php

index ae063b6ec4977e510b1d9dbb40db7b10db2fda62..9a9b716c7c876813e4f815c0d42817573b9217a9 100644 (file)
@@ -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();
 
index 3a898d3da38432d8a78d570318f0ca2120f96cf1..4a5c42fca71d90341746203f283882011eaf71b3 100644 (file)
@@ -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);