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 Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commited4fc58894) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commitf16934384e) Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
This commit is contained in:
parent
9b21b01670
commit
1c1c97d7ca
|
|
@ -203,11 +203,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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,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 %]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue