Bugzilla – Attachment 81791 Details for
Bug 21728
Update C4::Reserves::ChargeReserveFee to use Koha::Account->add_debit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21728: Use Koha::Account->add_debit in ChargeReserveFee
Bug-21728-Use-KohaAccount-adddebit-in-ChargeReserv.patch (text/plain), 1.57 KB, created by
Martin Renvoize (ashimema)
on 2018-11-01 11:12:08 UTC
(
hide
)
Description:
Bug 21728: Use Koha::Account->add_debit in ChargeReserveFee
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-11-01 11:12:08 UTC
Size:
1.57 KB
patch
obsolete
>From c7f05333d57be7c9042747c0ea8120fff8a6792a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 1 Nov 2018 11:08:51 +0000 >Subject: [PATCH] Bug 21728: Use Koha::Account->add_debit in ChargeReserveFee > >--- > C4/Reserves.pm | 21 ++++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 78e8f6a360..95b4b853c4 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -566,13 +566,20 @@ sub GetOtherReserves { > > sub ChargeReserveFee { > my ( $borrowernumber, $fee, $title ) = @_; >- return if !$fee || $fee==0; # the last test is needed to include 0.00 >- my $accquery = qq{ >-INSERT INTO accountlines ( borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding ) VALUES (?, ?, NOW(), ?, ?, 'Res', ?) >- }; >- my $dbh = C4::Context->dbh; >- my $nextacctno = &getnextacctno( $borrowernumber ); >- $dbh->do( $accquery, undef, ( $borrowernumber, $nextacctno, $fee, "Reserve Charge - $title", $fee ) ); >+ return if !$fee || $fee == 0; # the last test is needed to include 0.00 >+ Koha::Account->new( { patron_id => $borrowernumber } )->add_debit( >+ { >+ amount => $fee, >+ description => "Reserve Charge - " . $title, >+ note => undef, >+ user_id => undef, >+ library_id => undef, >+ sip => undef, >+ invoice_type => undef, >+ type => 'reserve', >+ item_id => undef >+ } >+ ); > } > > =head2 GetReserveFee >-- >2.19.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 21728
:
81791
|
81881
|
82808
|
82809
|
84278
|
84279
|
85171
|
85172
|
86032