From f192e88b16ff3cfa910fd5b1dc59e9c15219b0ac Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 24 Nov 2020 00:44:47 +0100 Subject: [PATCH] bug 5263 Add update button for total on supplier invoice entry when tax is changed. Fixed. --- purchasing/includes/ui/invoice_ui.inc | 18 +++++++++--------- purchasing/supplier_invoice.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index 4630ca55..e682cdca 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -169,24 +169,24 @@ function invoice_totals(&$supp_trans) copy_to_trans($supp_trans); - $dim = get_company_pref('use_dimension'); - $colspan = ($dim == 2 ? 7 : ($dim == 1 ? 6 : 5)); + $colspan = 2; div_start('tax_table'); start_table(TABLESTYLE, "width='95%'"); - label_row(_("Sub-total:"), price_format( $supp_trans->ov_amount), "colspan=$colspan align=right", "align=right"); + label_row(_("Sub-total:"), price_format( $supp_trans->ov_amount), "width=80% colspan=$colspan align=right", "width=10% align=right", 2); $taxes = $supp_trans->get_taxes($supp_trans->tax_group_id); $tax_total = display_edit_tax_items($taxes, $colspan, $supp_trans->tax_included, 0, true); $display_total = price_format($supp_trans->ov_amount + $tax_total); - + start_row(); if ($supp_trans->trans_type == ST_SUPPINVOICE) - label_row(_("Invoice Total:"), - $display_total, "colspan=$colspan align=right style='font-weight:bold;'", "align=right style='font-weight:bold;'"); + label_cells(_("Invoice Total:"), + $display_total, "colspan=$colspan width=80% align=right style='font-weight:bold;'", "width=10% align=right style='font-weight:bold;'"); else - label_row(_("Credit Note Total"), - $display_total, "colspan=$colspan align=right style='font-weight:bold;color:red;'", "nowrap align=right style='font-weight:bold;color:red;'"); - + label_cells(_("Credit Note Total"), + $display_total, "colspan=$colspan width=80% align=right style='font-weight:bold;color:red;'", "width=10% nowrap align=right style='font-weight:bold;color:red;'"); + submit_cells('update', _("Update"), "width=10% colspan=2 align='right'", _("Refresh"), true); + end_row(); end_table(1); start_table(TABLESTYLE2); textarea_row(_("Memo:"), "Comments", null, 50, 3); diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index 0dc1a77a..6b21c935 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -401,7 +401,7 @@ if ($id != -1 || $id2 != -1) $Ajax->activate('inv_tot'); } -if (get_post('AddGLCodeToTrans')) +if (get_post('AddGLCodeToTrans') || get_post('update')) $Ajax->activate('inv_tot'); br(); -- 2.30.2