Bugzilla – Attachment 98438 Details for
Bug 24474
Lost items that are checked out are always returned, even when attempting to renew them
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24474: Add ReturnLostItem handling for staff client payments
Bug-24474-Add-ReturnLostItem-handling-for-staff-cl.patch (text/plain), 2.42 KB, created by
Martin Renvoize (ashimema)
on 2020-02-05 09:22:03 UTC
(
hide
)
Description:
Bug 24474: Add ReturnLostItem handling for staff client payments
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-05 09:22:03 UTC
Size:
2.42 KB
patch
obsolete
>From 20c460457dead2ff00f911a0289760d0afc37fcb Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 5 Feb 2020 09:17:13 +0000 >Subject: [PATCH] Bug 24474: Add ReturnLostItem handling for staff client > payments > >This patch adds a call to ReturnLostItem for Lost Item payments taken >via the staff client. >--- > members/paycollect.pl | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > >diff --git a/members/paycollect.pl b/members/paycollect.pl >index a7f0e39108..0c7470599f 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -184,6 +184,17 @@ if ( $total_paid and $total_paid ne '0.00' ) { > cash_register => $registerid > } > ); >+ >+ # Return lost items when paid for >+ if ( $payment_type ne 'WRITEOFF' >+ && $line->debit_type_code eq 'LOST' >+ && $line->amountoutstanding == 0 >+ && C4::Context->preference('MarkLostItemsAsReturned') =~ m|OnPayment| ) >+ { >+ C4::Circulation::ReturnLostItem( $borrowernumber, >+ $line->itemnumber ); >+ >+ } > print $input->redirect( > "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber&payment_id=$payment_id&change_given=$change_given"); > } else { >@@ -208,6 +219,25 @@ if ( $total_paid and $total_paid ne '0.00' ) { > cash_register => $registerid > } > ); >+ >+ # Return lost items when paid for >+ if ( >+ C4::Context->preference('MarkLostItemsAsReturned') =~ >+ m|OnPayment| ) >+ { >+ >+ for my $debit ( @selected_accountlines ){ >+ $debit->get_from_storage; >+ if ( $debit->amountoutstanding == 0 >+ && $debit->itemnumber >+ && $debit->debit_type_code >+ && ( $debit->debit_type_code eq 'LOST' ) ) >+ { >+ C4::Circulation::ReturnLostItem( >+ $borrowernumber, $debit->itemnumber ); >+ } >+ } >+ } > } > } > else { >-- >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 24474
:
98392
|
98393
|
98436
|
98437
|
98438
|
98439
|
98460
|
98485
|
98486
|
98487
|
98645
|
98646
|
98647
|
98648
|
98673
|
98674
|
98675
|
98676
|
98923
|
100229
|
100230
|
100231
|
100232
|
100233
|
102104
|
102105
|
102106
|
102107
|
102108
|
102109
|
102110
|
102132
|
102133
|
102134
|
102135
|
102136
|
102137
|
102138