From 32ce6d39a01ef4378d35d5e43da4fb370d76bd61 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Thu, 26 Aug 2010 16:31:21 +1200 Subject: [PATCH 1/2] Bug 5173 - allow the discount to be editing on acq order This allows the discount to be edited on the ACQ order page. If the discount is edited, the other fields will update as appropriate. Note that if you re-visit the order later, the discount will be set to 0.00%. Saving it requires a database change, and so will be included in another commit. --- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 5 +++++ .../prog/en/modules/acqui/neworderempty.tmpl | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 4b65f82..d8fe386 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/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; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index 603d517..a564fb0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/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)
  • -- 1.7.0.4