Bugzilla – Attachment 83257 Details for
Bug 21756
Deprecate C4::Accounts::manualinvoice (use Koha::Account->add_debit instead)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21756: Remove use of manualinvoice from Koha::Patron
Bug-21756-Remove-use-of-manualinvoice-from-KohaPat.patch (text/plain), 1.76 KB, created by
Martin Renvoize (ashimema)
on 2018-12-17 08:58:21 UTC
(
hide
)
Description:
Bug 21756: Remove use of manualinvoice from Koha::Patron
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-12-17 08:58:21 UTC
Size:
1.76 KB
patch
obsolete
>From 81e7ee15632a017e049c3c6fdb56d6c1a0372682 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Sat, 15 Dec 2018 15:58:46 +0000 >Subject: [PATCH] Bug 21756: Remove use of manualinvoice from Koha::Patron > >Known Side Effect: Prior to this patch enrolment fees were not >recorded in the FinesLog. After this patch, if the FinesLog is >enabled then the 'action' will be recorded as `create_account`. >--- > Koha/Patron.pm | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 5831034bdc..ea52179e2b 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -25,7 +25,6 @@ use List::MoreUtils qw( uniq ); > use JSON qw( to_json ); > use Text::Unaccent qw( unac_string ); > >-use C4::Accounts; > use C4::Context; > use C4::Log; > use Koha::AuthUtils; >@@ -886,8 +885,14 @@ sub add_enrolment_fee_if_needed { > my ($self) = @_; > my $enrolment_fee = $self->category->enrolmentfee; > if ( $enrolment_fee && $enrolment_fee > 0 ) { >- # insert fee in patron debts >- C4::Accounts::manualinvoice( $self->borrowernumber, '', '', 'A', $enrolment_fee ); >+ $self->account->add_debit( >+ { >+ amount => $enrolment_fee, >+ user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : 0, >+ library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef, >+ type => 'account' >+ } >+ ); > } > return $enrolment_fee || 0; > } >@@ -1333,10 +1338,11 @@ sub _type { > return 'Borrower'; > } > >-=head1 AUTHOR >+=head1 AUTHORS > > Kyle M Hall <kyle@bywatersolutions.com> > Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >+Martin Renvoize <martin.renvoize@ptfs-europe.com> > > =cut > >-- >2.19.2
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 21756
:
83257
|
83258
|
83259
|
83260
|
83261
|
83262
|
83263
|
83264
|
83265
|
83266
|
83267
|
83268
|
83269
|
83270
|
83271
|
84729
|
84730
|
84731
|
84732
|
84733
|
85320
|
85321
|
85322
|
85323
|
85324
|
85325
|
85326
|
85327
|
85350
|
85420
|
85421
|
85422
|
85423
|
85424
|
85425
|
85426
|
85427
|
85428
|
85429
|
85430
|
85505
|
85506
|
85507
|
85508
|
85509
|
85510
|
85511
|
85512
|
85513
|
85514
|
85515
|
85638
|
85639
|
85640
|
85641
|
85642
|
85643
|
85644
|
85645
|
85646
|
85647
|
85648
|
85654
|
85655
|
85656
|
85657
|
85658
|
85659
|
85660
|
85661
|
85662
|
85663
|
85664
|
85665
|
86265
|
86266
|
86267
|
86268
|
86269
|
86270
|
86271
|
86272
|
86273
|
86274
|
86275
|
86276
|
86441
|
86442
|
86443
|
86444
|
86445
|
86446
|
86447
|
86448
|
86449
|
86450
|
86451
|
86452