Bugzilla – Attachment 107513 Details for
Bug 26012
Date in 'Paid for' information not formatted to Time/DateFormat system preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26012: Correctly format "paid for" info on the item details view
Bug-26012-Correctly-format-paid-for-info-on-the-it.patch (text/plain), 3.17 KB, created by
Jonathan Druart
on 2020-07-29 14:51:35 UTC
(
hide
)
Description:
Bug 26012: Correctly format "paid for" info on the item details view
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-07-29 14:51:35 UTC
Size:
3.17 KB
patch
obsolete
>From b7b12c2c9ce566c928fcadc957c737367532c30e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 29 Jul 2020 16:49:14 +0200 >Subject: [PATCH] Bug 26012: Correctly format "paid for" info on the item > details view > >The string is built controller side, which does not let the template >format the info nicely. >We want to display patron's info using patron-title.inc and the date >with the KohaDates plugin > >Test plan: >- Make sure there is a replacement cost in the item >- check it out >- Mark it lost >- Pay the lost item fee >- Go to the detail page and look on the items tab for the item >- It will show an entry with "Paid for?" label >The patron's info and date must be correctly formatted >--- > catalogue/moredetail.pl | 6 +----- > .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 2 +- > 2 files changed, 2 insertions(+), 6 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index a736c30c8c..aca129468a 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -211,11 +211,7 @@ foreach my $item (@items){ > if ($payment_offsets->count) { > my $patron = $accountline->patron; > my $payment_offset = $payment_offsets->next; >- $item->{paidfor} = >- $patron->firstname . " " >- . $patron->surname . " " >- . $patron->cardnumber . " " >- . $payment_offset->created_on; >+ $item->{paidfor} = { patron => $patron, created_on => $payment_offset->created_on }; > } > } > } >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 12dc7ea7a2..c6a5a7390c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -254,7 +254,7 @@ > [% IF ( ITEM_DAT.card0 ) %]<li><span class="label">Last borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 | uri %]">[% ITEM_DAT.card0 | html %]</a> </li>[% END %] > [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 | uri %]">[% ITEM_DAT.card1 | html %]</a> </li>[% END %] > [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 | uri %]">[% ITEM_DAT.card2 | html %]</a> </li>[% END %] >- [% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor | html %] </li>[% END %] >+ [% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% INCLUDE 'patron-title.inc' patron=ITEM_DAT.paidfor.patron hide_patron_infos_if_needed=1 %] on [% ITEM_DAT.paidfor.created_on | $KohaDates %]</li>[% END %] > > [% IF ( ITEM_DAT.enumchron ) %]<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron | html %] </li>[% END %] > >-- >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 26012
:
107513
|
107646
|
108058