Bugzilla – Attachment 2575 Details for
Bug 5173
Allow the discount to be editable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
First patch - UI changes only
0001-Bug-5173-allow-the-discount-to-be-editing-on-acq-ord.patch (text/plain), 3.91 KB, created by
Robin Sheat
on 2010-08-26 05:36:48 UTC
(
hide
)
Description:
First patch - UI changes only
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2010-08-26 05:36:48 UTC
Size:
3.91 KB
patch
obsolete
>From 32ce6d39a01ef4378d35d5e43da4fb370d76bd61 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >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(); > <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" /> > <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /> > <input type="hidden" name="biblioitemnumber" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" /> >- <input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" /> > <input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" /> > <input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" /> > <input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" /> >@@ -292,15 +291,27 @@ ff.submit(); > <input type="text" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /> (adjusted for <!-- TMPL_VAR NAME="cur_active" -->) > <!--/TMPL_IF--> > </li> >+ >+ >+ > <li> >- <!-- TMPL_IF name="close" --> >+ <!-- TMPL_IF NAME="close" --> >+ <span class="label">Discount: </span> >+ <input type="hidden" size="20" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" /><!-- TMPL_VAR NAME="discount" -->" >+ <!-- TMPL_ELSE --> >+ <label for="discount">Discount: </label> >+ <input type="text" size="20" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" onchange="calcNeworderTotal()"/> >+ <!-- /TMPL_IF --> >+ </li> >+ <li> >+ <!-- TMPL_IF name="close" --> > <label for="ecost">Budgeted cost: </label> > <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" readonly="readonly" /> > <!-- TMPL_ELSE --> > <label for="ecost">Budgeted cost: </label> > <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" /> > <!--/TMPL_IF--> >- <!-- TMPL_IF name="discount_2dp" --> (adjusted for <!-- TMPL_VAR name="discount_2dp" -->% discount) <!--/TMPL_IF--> >+ <!-- TMPL_IF name="discount_2dp" --> (adjusted for <span id="discount_value"><!-- TMPL_VAR name="discount_2dp" --></span>% discount) <!--/TMPL_IF--> > > </li> > <!-- TMPL_IF NAME="GST"--> >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5173
:
2575
|
2576
|
2583