Bugzilla – Attachment 120344 Details for
Bug 27636
Replace Koha::Account::pay with a simpler method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27636: (QA follow-up) Restore force AutoReconcile
Bug-27636-QA-follow-up-Restore-force-AutoReconcile.patch (text/plain), 1.42 KB, created by
Martin Renvoize (ashimema)
on 2021-04-30 15:04:21 UTC
(
hide
)
Description:
Bug 27636: (QA follow-up) Restore force AutoReconcile
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-30 15:04:21 UTC
Size:
1.42 KB
patch
obsolete
>From 432ae648e35ea3ad6a4baacf91e7a97344b77e49 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 28 Apr 2021 14:36:27 +0100 >Subject: [PATCH] Bug 27636: (QA follow-up) Restore force AutoReconcile > >This patch restores the behaviour ->pay always acting as though >`AccountAutoReconcile` was enabled. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Account.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 16bff39073..bd4af13a2d 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -86,7 +86,6 @@ sub pay { > > my $userenv = C4::Context->userenv; > >- > my $manager_id = $userenv ? $userenv->{number} : undef; > my $interface = $params ? ( $params->{interface} || C4::Context->interface ) : C4::Context->interface; > my $payment = $self->payin_amount( >@@ -105,6 +104,14 @@ sub pay { > } > ); > >+ # NOTE: Pay historically always applied as much credit as it could to all >+ # existing outstanding debits, whether passed specific debits or otherwise. >+ if ( $payment->amountoutstanding ) { >+ $payment = >+ $payment->apply( >+ { debits => [ $self->outstanding_debits->as_list ] } ); >+ } >+ > my $patron = Koha::Patrons->find( $self->{patron_id} ); > my @account_offsets = $payment->debit_offsets; > if ( C4::Context->preference('UseEmailReceipts') ) { >-- >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 27636
:
116393
|
118471
|
118515
|
118516
|
118522
|
118523
|
119205
|
119206
|
119207
|
119242
|
119243
|
119244
|
120022
|
120023
|
120024
|
120089
|
120090
|
120091
|
120257
|
120258
|
120259
|
120262
|
120263
|
120270
|
120271
|
120272
|
120276
|
120294
|
120343
| 120344 |
120345