Bugzilla – Attachment 43181 Details for
Bug 12768
Replacement cost and processing fee management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12768: Use the Price TT plugin to display prices
Bug-12768-Use-the-Price-TT-plugin-to-display-price.patch (text/plain), 4.06 KB, created by
Eivin Giske Skaaren
on 2015-10-06 21:18:26 UTC
(
hide
)
Description:
Bug 12768: Use the Price TT plugin to display prices
Filename:
MIME Type:
Creator:
Eivin Giske Skaaren
Created:
2015-10-06 21:18:26 UTC
Size:
4.06 KB
patch
obsolete
>From d385caa16bfc0bed476bf0fb8326fbd8eb5d6231 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 1 Sep 2015 14:43:28 +0100 >Subject: [PATCH] Bug 12768: Use the Price TT plugin to display prices > >Retested also with item-level_itypes set to biblio and made sure to delete relevant rows from accountlines table when using same item and patron: > >Scenario 1 works >Scenario 2 works > >I have also manually tested the sql in C4::Circulation::LostItem and it seems to work from what I can see. >Adding a test for that in t/db_dependent/Circulation/Chargelostitem.t was not trivial. >I am not a test developer but if it really is needed someone with more experience developing mockups with the db should probably be able to do it. > >Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com> >--- > admin/itemtypes.pl | 5 +---- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 11 ++++++----- > 2 files changed, 7 insertions(+), 9 deletions(-) > >diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl >index aff6b09..f5defb9 100755 >--- a/admin/itemtypes.pl >+++ b/admin/itemtypes.pl >@@ -235,7 +235,7 @@ elsif ( $op eq 'delete_confirm' ) { > $template->param( > itemtype => $itemtype, > description => $data->{description}, >- rentalcharge => sprintf( "%.2f", $data->{rentalcharge} ), >+ rentalcharge => $data->{rentalcharge}, > imageurl => $data->{imageurl}, > total => $total > ); >@@ -261,9 +261,6 @@ if ( $op eq 'list' ) { > my @loop; > foreach my $itemtype ( @{$results} ) { > $itemtype->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtype->{imageurl} ); >- $itemtype->{rentalcharge} = sprintf( '%.2f', $itemtype->{rentalcharge} ); >- $itemtype->{defaultreplacecost} = sprintf( '%.2f', $itemtype->{defaultreplacecost} ); >- $itemtype->{processfee} = sprintf( '%.2f', $itemtype->{processfee} ); > push( @loop, $itemtype ); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >index d5a7e3c..36065d0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >@@ -1,4 +1,5 @@ > [% USE AuthorisedValues %] >+[% USE Price %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Item types [% IF ( add_form ) %]› > [% IF ( itemtype ) %] >@@ -190,7 +191,7 @@ Item types administration > </li> > <li> > <label for="rentalcharge">Rental charge: </label> >- <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" /> >+ <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" /> > </li> > <li> > <label for="defaultreplacecost">Default replacement cost: </label> >@@ -263,7 +264,7 @@ Item types administration > > <tr><th scope="row">Description</th><td>[% description %]</td></tr> > <tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr> >-<tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table> >+<tr><th scope="row">Rental charge</th><td>[% Pricerentalcharge | $Price %]</td></tr></table> > <form action="[% script_name %]" method="post"> > <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %] > </form> >@@ -303,11 +304,11 @@ Item types administration > <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %] [% END %]</td> > <td> > [% UNLESS ( loo.notforloan ) %] >- [% loo.rentalcharge %] >+ [% loo.rentalcharge | $Price %] > [% END %] > </td> >- <td>[% loo.defaultreplacecost %]</td> >- <td>[% loo.processfee %]</td> >+ <td>[% loo.defaultreplacecost | $Price %]</td> >+ <td>[% loo.processfee | $Price %]</td> > <td>[% loo.checkinmsg | html_line_break %]</td> > <td> > <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a> >-- >1.7.10.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 12768
:
34333
|
34334
|
36350
|
36505
|
36506
|
36552
|
36553
|
36554
|
36555
|
38365
|
38367
|
38368
|
38375
|
39298
|
39299
|
39300
|
39999
|
40000
|
40001
|
40002
|
42157
|
42158
|
43181
|
43546
|
64775
|
64776
|
66760
|
66761
|
67875
|
67876
|
67877
|
67878
|
67891
|
67892
|
67893
|
67894
|
67895
|
67896
|
67897
|
68035
|
68036
|
68037
|
68038
|
68039
|
68040
|
68041
|
68042
|
68076
|
68264
|
68265
|
68266
|
68267
|
68268
|
68269
|
68270
|
68271
|
68272
|
68273
|
68274
|
68332
|
68415
|
68416
|
68417
|
68426
|
68427