Bugzilla – Attachment 119199 Details for
Bug 24300
Add a 'payout amount' option to accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24300: (QA follow-up) Update payout_amount to use internal methods
Bug-24300-QA-follow-up-Update-payoutamount-to-use-.patch (text/plain), 1.74 KB, created by
Martin Renvoize (ashimema)
on 2021-04-06 11:06:48 UTC
(
hide
)
Description:
Bug 24300: (QA follow-up) Update payout_amount to use internal methods
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-06 11:06:48 UTC
Size:
1.74 KB
patch
obsolete
>From 304fac53aa8e15ce1312eecc08d507b36744314d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 17 Mar 2021 14:12:37 +0000 >Subject: [PATCH] Bug 24300: (QA follow-up) Update payout_amount to use > internal methods > >Tomas pointed out that we could, and probably should, use the internal >'add_debit' method within this function. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Account.pm | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 3ff37bc674..da1b562af8 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -692,20 +692,18 @@ sub payout_amount { > sub { > > # A 'payout' is a 'debit' >- $payout = Koha::Account::Line->new( >+ $payout = $self->add_debit( > { >- date => \'NOW()', >- amount => $amount, >- debit_type_code => 'PAYOUT', >+ amount => $params->{amount}, >+ type => 'PAYOUT', > payment_type => $params->{payout_type}, >- amountoutstanding => $amount, >+ amountoutstanding => $params->{amount}, > manager_id => $params->{staff_id}, >- borrowernumber => $self->{patron_id}, > interface => $params->{interface}, > branchcode => $params->{branch}, > register_id => $params->{cash_register} > } >- )->store(); >+ ); > > # Offset against credits > for my $credit ( @{$outstanding_credits} ) { >-- >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 24300
:
116395
|
116412
|
116413
|
116837
|
116838
|
117917
|
117918
|
117919
|
118335
|
118392
|
118393
|
118394
|
118395
|
118396
|
118464
|
118503
|
118601
|
118602
|
118603
|
118604
|
118605
|
118606
|
118612
|
119195
|
119196
|
119197
|
119198
|
119199
|
119200
|
120016
|
120017
|
120018
|
120019
|
120020
|
120021