Bugzilla – Attachment 156187 Details for
Bug 34277
Add an API endpoint to return all patrons with outstanding charges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[ALTERNATE] Bug 34277: (follow-up) Use Koha::Patron->balance_details in GET /patrons/{patron_id}/account
ALTERNATE-Bug-34277-follow-up-Use-KohaPatron-balan.patch (text/plain), 1.59 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-09-25 19:02:47 UTC
(
hide
)
Description:
[ALTERNATE] Bug 34277: (follow-up) Use Koha::Patron->balance_details in GET /patrons/{patron_id}/account
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-09-25 19:02:47 UTC
Size:
1.59 KB
patch
obsolete
>From 0ef80e2c0cfbdd560b48716c5e1ade4a15172794 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 25 Sep 2023 16:01:17 -0300 >Subject: [PATCH] [ALTERNATE] Bug 34277: (follow-up) Use > Koha::Patron->balance_details in GET /patrons/{patron_id}/account > >This patch makes the existing route reuse the introduced method. To >verify no behavior change: > >1. Run: > $ ktd --shell > k$ prove t/db_dependent/api/v1/patrons_accounts.t >=> SUCCESS: Tests pass! >2. Sign off :-D >--- > Koha/REST/V1/Patrons/Account.pm | 18 +----------------- > 1 file changed, 1 insertion(+), 17 deletions(-) > >diff --git a/Koha/REST/V1/Patrons/Account.pm b/Koha/REST/V1/Patrons/Account.pm >index 2cf643029cf..d3cb8e17020 100644 >--- a/Koha/REST/V1/Patrons/Account.pm >+++ b/Koha/REST/V1/Patrons/Account.pm >@@ -50,25 +50,9 @@ sub get { > } > > return try { >- my $account = $patron->account; >- >- # get outstanding debits and credits >- my $debits = $account->outstanding_debits; >- my $credits = $account->outstanding_credits; >- > return $c->render( > status => 200, >- openapi => { >- balance => $account->balance, >- outstanding_debits => { >- total => $debits->total_outstanding, >- lines => $debits->to_api >- }, >- outstanding_credits => { >- total => $credits->total_outstanding, >- lines => $credits->to_api >- } >- } >+ openapi => $patron->balance_details, > ); > } > catch { >-- >2.42.0
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 34277
:
153477
|
153478
|
154516
|
156185
|
156186
| 156187