Bugzilla – Attachment 61795 Details for
Bug 18266
Internal Server Error when paying fine for lost item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[16.11.x] Bug 18266: Fix internal error when paying fine for lost item without.. item
Bug-18266-Fix-internal-error-when-paying-fine-for-.patch (text/plain), 1.42 KB, created by
Jonathan Druart
on 2017-04-03 13:20:09 UTC
(
hide
)
Description:
[16.11.x] Bug 18266: Fix internal error when paying fine for lost item without.. item
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-03 13:20:09 UTC
Size:
1.42 KB
patch
obsolete
>From 27df75e133f3acf881b08a890db893e5f6f4c4ea Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 21 Mar 2017 12:24:28 -0300 >Subject: [PATCH] Bug 18266: Fix internal error when paying fine for lost item > without.. item > >If a fine is created for a lost item but the itemnumber is not supplied, >the system will return it. >The item should not be mark as returned if there is no item linked to >the fine. > >Test plan: >1. Turn StoreLastBorrower on >2. Create a manual invoice for a lost item, do not supply a barcode >3. Pay the fines 'Pay fines > Pay' > >=> Without this patch applied you get >Can't call method "last_returned_by" on an undefined value at >/home/marc/koha/C4/Circulation.pm line 2188. > >=> With this patch applied, you must not get the error. >--- > C4/Accounts.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index e49becb..bba267c 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -169,7 +169,7 @@ sub makepayment { > }); > > #check to see what accounttype >- if ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) { >+ if ( $data->{itemnumber} && ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) ) { > C4::Circulation::ReturnLostItem( $borrowernumber, $data->{'itemnumber'} ); > } > my $sthr = $dbh->prepare("SELECT max(accountlines_id) AS lastinsertid FROM accountlines"); >-- >2.9.3
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 18266
:
61402
|
61439
|
61687
| 61795