Bugzilla – Attachment 89320 Details for
Bug 19919
Writing off a Lost Item Fee marks as "Paid for by patron"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19919: Do not record payments for a writeoff
Bug-19919-Do-not-record-payments-for-a-writeoff.patch (text/plain), 2.28 KB, created by
Martin Renvoize (ashimema)
on 2019-05-03 14:51:40 UTC
(
hide
)
Description:
Bug 19919: Do not record payments for a writeoff
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-05-03 14:51:40 UTC
Size:
2.28 KB
patch
obsolete
>From ab96f33a2c35c3f1181e3f8cc348f80dbf94601a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 3 May 2019 15:44:35 +0100 >Subject: [PATCH] Bug 19919: Do not record payments for a writeoff > >--- > C4/Circulation.pm | 18 ++++++++++-------- > Koha/Account.pm | 2 +- > 2 files changed, 11 insertions(+), 9 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 7b6ad89056..dab653d70c 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3668,16 +3668,18 @@ sub DeleteBranchTransferLimits { > } > > sub ReturnLostItem{ >- my ( $borrowernumber, $itemnum ) = @_; >+ my ( $borrowernumber, $itemnum, $offset_type ) = @_; > > MarkIssueReturned( $borrowernumber, $itemnum ); >- my $patron = Koha::Patrons->find( $borrowernumber ); >- my $item = Koha::Items->find($itemnum); >- my $old_note = ($item->paidfor && ($item->paidfor ne q{})) ? $item->paidfor.' / ' : q{}; >- my @datearr = localtime(time); >- my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; >- my $bor = $patron->firstname . ' ' . $patron->surname . ' ' . $patron->cardnumber; >- ModItem({ paidfor => $old_note."Paid for by $bor $date" }, undef, $itemnum); >+ if ( $offset_type ne 'Writeoff' ) { >+ my $patron = Koha::Patrons->find( $borrowernumber ); >+ my $item = Koha::Items->find($itemnum); >+ my $old_note = ($item->paidfor && ($item->paidfor ne q{})) ? $item->paidfor.' / ' : q{}; >+ my @datearr = localtime(time); >+ my $date = ( 1900 + $datearr[5] ) . "-" . ( $datearr[4] + 1 ) . "-" . $datearr[3]; >+ my $bor = $patron->firstname . ' ' . $patron->surname . ' ' . $patron->cardnumber; >+ ModItem({ paidfor => $old_note."Paid for by $bor $date" }, undef, $itemnum); >+ } > } > > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 4abafc647d..591a89c079 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -110,7 +110,7 @@ sub pay { > > if ( $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'LOST' ) ) > { >- C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); >+ C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber, $offset_type ); > } > > my $account_offset = Koha::Account::Offset->new( >-- >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 19919
:
70293
|
89320
|
89356
|
89459
|
89472
|
89794
|
89814
|
89815
|
89816
|
89817
|
90228
|
90229
|
90230