Bugzilla – Attachment 152204 Details for
Bug 33176
Improve enforcing of RequirePaymentType
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33176: Enforce RequirePaymentType with API
Bug-33176-Enforce-RequirePaymentType-with-API.patch (text/plain), 999 bytes, created by
Sam Lau
on 2023-06-08 14:49:01 UTC
(
hide
)
Description:
Bug 33176: Enforce RequirePaymentType with API
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2023-06-08 14:49:01 UTC
Size:
999 bytes
patch
obsolete
>From 84a9712378dff5bdc8fc506f152c0f60e9643d36 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 13 Apr 2023 17:52:58 +0000 >Subject: [PATCH] Bug 33176: Enforce RequirePaymentType with API > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Sam Lau <samalau@gmail.com> >--- > Koha/REST/V1/Patrons/Account.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/Koha/REST/V1/Patrons/Account.pm b/Koha/REST/V1/Patrons/Account.pm >index e2d18f5824..95c998ad56 100644 >--- a/Koha/REST/V1/Patrons/Account.pm >+++ b/Koha/REST/V1/Patrons/Account.pm >@@ -145,6 +145,10 @@ sub add_credit { > my $note = $body->{note}; > my $library_id = $body->{library_id}; > >+ if ( C4::Context->preference("RequirePaymentType") && !defined($payment_type) ) { >+ Koha::Exceptions::Account::PaymentTypeRequired->throw(); >+ } >+ > my $credit = $account->add_credit( > { > amount => $amount, >-- >2.30.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 33176
:
149617
|
149619
|
150254
|
150255
|
152131
|
152203
|
152204
|
152205
|
152271
|
152272
|
152273