@@ -, +, @@ --- acqui/neworderempty.pl | 3 ++- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 5 +++++ .../prog/en/modules/acqui/neworderempty.tmpl | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) --- a/acqui/neworderempty.pl +++ a/acqui/neworderempty.pl @@ -329,7 +329,8 @@ $template->param( authorisedbyname => $borrower->{'firstname'} . " " . $borrower->{'surname'}, biblioitemnumber => $data->{'biblioitemnumber'}, discount_2dp => sprintf( "%.2f", $bookseller->{'discount'}) , # for display - discount => $bookseller->{'discount'}, + discount => defined($data->{'discount'}) ? + $data->{'discount'} : $bookseller->{'discount'}, listincgst => $bookseller->{'listincgst'}, invoiceincgst => $bookseller->{'invoiceincgst'}, name => $bookseller->{'name'}, --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -676,6 +676,11 @@ function calcNeworderTotal(){ if (f.GST) { f.GST.value=GST; } + + // In case the discount changed, we should update the message + var discount_2dp = discount.toFixed(2); + $('#discount_value').html(discount_2dp); + return true; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -125,7 +125,6 @@ ff.submit(); " /> " /> " /> - " /> " /> " /> " /> @@ -292,15 +291,27 @@ ff.submit(); " /> (adjusted for ) + + +
  • - + + Discount: + " />" + + + " onchange="calcNeworderTotal()"/> + +
  • +
  • + " readonly="readonly" /> " /> - (adjusted for % discount) + (adjusted for % discount)
  • --