Bugzilla – Attachment 139039 Details for
Bug 12285
Allow easy printing of patron's fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12285: Use accountlines date if issue is not found
0003-Bug-12285-Use-accountlines-date-if-issue-is-not-foun.patch (text/plain), 1.51 KB, created by
Emmi Takkinen
on 2022-08-12 06:06:54 UTC
(
hide
)
Description:
Bug 12285: Use accountlines date if issue is not found
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2022-08-12 06:06:54 UTC
Size:
1.51 KB
patch
obsolete
>From 9c4796b3503f8a866bf7ed29d2bd99ac0b96d6f7 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Fri, 28 Jan 2022 14:59:02 +0200 >Subject: [PATCH 3/6] Bug 12285: Use accountlines date if issue is not found > >Printing fines slip would raise error if patron has >manually created invoice. In these cases use accountlines >date instead of issues date_due. Also silence error: >"Argument "" isn't numeric in numeric comparison (<=>)" > >Sponsored-by: Koha-Suomi Oy > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Members.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 32c0d449b8..f8180d7fe4 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -708,7 +708,7 @@ sub FineSlip { > $item = $item ? $item->unblessed : undef; > my $issue = Koha::Checkouts->find({issue_id => $line->issue_id}) > || Koha::Old::Checkouts->find({issue_id => $line->issue_id}); >- my $dt = dt_from_string( $issue->date_due ); >+ my $dt = $issue ? dt_from_string( $issue->date_due ) : dt_from_string( $line->date ); > > $item->{'date_due'} = output_pref({ dt => $dt, dateonly => 1 }); > $item->{'amount'} = sprintf('%.2f', $line->amount); >@@ -718,7 +718,7 @@ sub FineSlip { > > push @issueslist, $item; > } >- my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @issueslist; >+ my @issues = sort { $b->{'timestamp'} cmp $a->{'timestamp'} } @issueslist; > > my %repeat = ( > 'fines' => [ map { >-- >2.25.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 12285
:
28327
|
29144
|
29692
|
123202
|
123203
|
123243
|
129723
|
129724
|
129922
|
129923
|
129937
|
129943
|
129944
|
129945
|
129946
|
129947
|
133112
|
133147
|
139037
|
139038
|
139039
|
139040
|
139041
|
139042
|
140795
|
140796
|
140797
|
140798
|
140799
|
140800