Bugzilla – Attachment 82782 Details for
Bug 21915
Add a way to automatically reconcile balance for patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21915: Call reconcile_balance on manual credit creation
Bug-21915-Call-reconcilebalance-on-manual-credit-c.patch (text/plain), 1.44 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-11-30 12:56:25 UTC
(
hide
)
Description:
Bug 21915: Call reconcile_balance on manual credit creation
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-11-30 12:56:25 UTC
Size:
1.44 KB
patch
obsolete
>From 0d51125e503e89b7ff4e83c04218c3108e82ec1e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 30 Nov 2018 09:54:56 -0300 >Subject: [PATCH] Bug 21915: Call reconcile_balance on manual credit creation > >This patch makes the manual credit creation step call >Koha::Account::reconcile_balance when the AccountAutoReconcile syspref >is set. > >To test: >- Apply the patch >- Have some outstanding debits >- Create a manual credit >=> SUCCESS: Same behaviour as always >- Set AccountAutoReconcile >- Create a manual credit >=> SUCCESS: Reconcillation happened >- Sign off :-D >--- > members/mancredit.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/members/mancredit.pl b/members/mancredit.pl >index 5000fb2f85..fe73492543 100755 >--- a/members/mancredit.pl >+++ b/members/mancredit.pl >@@ -81,7 +81,8 @@ if ($add){ > my $amount = $input->param('amount') || 0; > my $type = $input->param('type'); > >- $patron->account->add_credit({ >+ my $account = $patron->account; >+ $account->add_credit({ > amount => $amount, > description => $description, > item_id => $item_id, >@@ -90,6 +91,10 @@ if ($add){ > user_id => $logged_in_user->id > }); > >+ if ( C4::Context->preference('AccountAutoReconcile') ) { >+ $account->reconcile_balance; >+ } >+ > print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber"); > > } else { >-- >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 21915
:
82762
|
82763
|
82764
|
82765
|
82781
|
82782
|
82784
|
82789
|
82790
|
82791
|
82792
|
82793
|
82803
|
82804
|
82805
|
82806
|
82807
|
82863
|
82864
|
82865
|
82866
|
82867
|
83053
|
83062
|
83063
|
83064
|
83065
|
83066