Bugzilla – Attachment 84888 Details for
Bug 22116
Add price formatting to rental charge and replacement price on items tab in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22116: Add price formatting to rental charge and replacement price on items tab in staff
Bug-22116-Add-price-formatting-to-rental-charge-an.patch (text/plain), 4.77 KB, created by
Martin Renvoize
on 2019-02-08 16:58:46 UTC
(
hide
)
Description:
Bug 22116: Add price formatting to rental charge and replacement price on items tab in staff
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2019-02-08 16:58:46 UTC
Size:
4.77 KB
patch
obsolete
>From b21a80d68120d867c57e7bbd1224f4aeb7d8cdd9 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 5 Jan 2019 06:45:05 +0000 >Subject: [PATCH] Bug 22116: Add price formatting to rental charge and > replacement price on items tab in staff > >Adds formatting to replacement price and rental charge on items >tab. > >To test: >- Add a rental charge to one or more of your item types >- Edit a record with some items, add replacement cost to some >- Find or create a record with your rental charged itemtype (MARC21:942$c) >- Go to the staff detail page of those records >- Check "Items" tab for > - Rental charge on top > - Replacement price for items >- Verify information is displayed correctly when toggling CurrencyFormat > system preference > >Signed-off-by: Jack Kelliher <jke0429@stacmail.net> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > catalogue/moredetail.pl | 4 ++-- > .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 5 +++-- > 2 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index ba599370e3..6adcca9008 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -128,7 +128,7 @@ my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_l > > $data->{'itemtypename'} = $itemtypes->{ $data->{'itemtype'} }->{'translated_description'} > if $data->{itemtype} && exists $itemtypes->{ $data->{itemtype} }; >-$data->{'rentalcharge'} = sprintf( "%.2f", $data->{'rentalcharge'} || 0); # Price formatting should be done template-side >+$data->{'rentalcharge'} = $data->{'rentalcharge'}; > foreach ( keys %{$data} ) { > $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' ); > } >@@ -138,7 +138,7 @@ foreach my $item (@items){ > $item->{object} = Koha::Items->find( $item->{itemnumber} ); > $item->{'collection'} = $ccodes->{ $item->{ccode} } if $ccodes && $item->{ccode} && exists $ccodes->{ $item->{ccode} }; > $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'translated_description'} if exists $itemtypes->{ $item->{'itype'} }; >- $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} || 0 ); # Price formatting should be done template-side >+ $item->{'replacementprice'} = $item->{'replacementprice'}; > if ( defined $item->{'copynumber'} ) { > $item->{'displaycopy'} = 1; > if ( defined $copynumbers->{ $item->{'copynumber'} } ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 4474432d93..dcf37b7357 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE Branches %] >+[% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Catalog › Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</title> >@@ -32,7 +33,7 @@ > [% UNLESS ( item_level_itypes ) %] > <li><span class="label">Item type:</span> [% itemtypename | html %] </li> > [% END %] >- [% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge | html %] </li>[% END %] >+ [% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge | $Price %] </li>[% END %] > <li><span class="label">ISBN:</span> [% isbn | html %] </li> > <li><span class="label">Publisher:</span>[% place | html %] [% publishercode | html %] [% publicationyear | html %] </li> > [% IF ( volumeddesc ) %]<li><span class="label">Volume:</span> [% volumeddesc | html %]</li>[% END %] >@@ -62,7 +63,7 @@ > [% IF ( ITEM_DAT.collection ) %]<li><span class="label">Collection:</span> [% ITEM_DAT.collection | html %]</li> [% END %] > <li><span class="label">Item callnumber:</span> [% ITEM_DAT.itemcallnumber | html %] </li> > [% IF ( ITEM_DAT.displaycopy ) %]<li><span class="label">Copy number:</span> [% ITEM_DAT.copyvol | html %] </li> [% END %] >- [% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice | html %] </li> [% END %] >+ [% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement price:</span> [% ITEM_DAT.replacementprice | $Price %] </li> [% END %] > [% IF ITEM_DAT.materials %]<li><span class="label">Materials specified:</span> [% ITEM_DAT.materials | html %] </li> [% END %] > </ol></div> > <div class="listgroup"><h4>Statuses [% IF ( ITEM_DAT.status_advisory ) %]( >-- >2.20.1
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 22116
:
83836
|
83922
| 84888