Bugzilla – Attachment 68275 Details for
Bug 19487
Internal server error when writing off lost fine for item not checked out
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19487: Do not return an item if not checked out
Bug-19487-Do-not-return-an-item-if-not-checked-out.patch (text/plain), 1.85 KB, created by
Jonathan Druart
on 2017-10-18 17:01:39 UTC
(
hide
)
Description:
Bug 19487: Do not return an item if not checked out
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-18 17:01:39 UTC
Size:
1.85 KB
patch
obsolete
>From 5b95b49441685a0a0b6a220cc36b58d305a5be91 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 18 Oct 2017 13:59:56 -0300 >Subject: [PATCH] Bug 19487: Do not return an item if not checked out > >To recreate: >1 - Manually add a lost fine to a ptron and include a barcode >2 - Attempt to write off the fine >3 - Internal server error >4 - Checkout an item and mark lost to checkin and fine >5 - Attempt to write off line >6 - Internal server error >--- > C4/Circulation.pm | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index b915b34007..18d9a44256 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2129,6 +2129,11 @@ routine in C<C4::Accounts>. > sub MarkIssueReturned { > my ( $borrowernumber, $itemnumber, $dropbox_branch, $returndate, $privacy ) = @_; > >+ >+ # Retrieve the issue >+ my $issue = Koha::Checkouts->find( { itemnumber => $itemnumber } ) or return; >+ my $issue_id = $issue->issue_id; >+ > my $anonymouspatron; > if ( $privacy == 2 ) { > # The default of 0 will not work due to foreign key constraints >@@ -2143,11 +2148,6 @@ sub MarkIssueReturned { > my $schema = $database->schema; > my $dbh = C4::Context->dbh; > >- my $issue_id = $dbh->selectrow_array( >- q|SELECT issue_id FROM issues WHERE itemnumber = ?|, >- undef, $itemnumber >- ); >- > my $query = 'UPDATE issues SET returndate='; > my @bind; > if ($dropbox_branch) { >@@ -2170,9 +2170,6 @@ sub MarkIssueReturned { > # Update the returndate > $dbh->do( $query, undef, @bind ); > >- # Retrieve the issue >- my $issue = Koha::Checkouts->find( $issue_id ); # FIXME should be fetched earlier >- > # Create the old_issues entry > my $old_checkout = Koha::Old::Checkout->new($issue->unblessed)->store; > >-- >2.11.0
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 19487
:
68275
|
68293
|
68294
|
68312
|
68313
|
68314
|
68330