Bugzilla – Attachment 82813 Details for
Bug 21896
Add Koha::Account::reconcile_balance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[18.05.x] Bug 21896: (QA follow-up) normalize_balance -> reconcile_balance rename
1805x-Bug-21896-QA-follow-up-normalizebalance---re.patch (text/plain), 2.95 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-11-30 20:11:46 UTC
(
hide
)
Description:
[18.05.x] Bug 21896: (QA follow-up) normalize_balance -> reconcile_balance rename
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-11-30 20:11:46 UTC
Size:
2.95 KB
patch
obsolete
>From 7d637e241727b01696710a7a4ae2813363f9bc9e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 28 Nov 2018 10:24:36 -0300 >Subject: [PATCH] [18.05.x] Bug 21896: (QA follow-up) normalize_balance -> > reconcile_balance rename > >This was requested on the QA review and I agree. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Account.pm | 6 +++--- > t/db_dependent/Koha/Account.t | 8 ++++---- > 2 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index ddc53d3103..5a8f555725 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -492,15 +492,15 @@ sub non_issues_charges { > : 0; > } > >-=head3 normalize_balance >+=head3 reconcile_balance > >-$account->normalize_balance(); >+$account->reconcile_balance(); > > Find outstanding credits and use them to pay outstanding debits > > =cut > >-sub normalize_balance { >+sub reconcile_balance { > my ($self) = @_; > > my $outstanding_debits = $self->outstanding_debits; >diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t >index ceda544e09..572d86f9d0 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -192,7 +192,7 @@ subtest 'add_credit() tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'normalize_balance' => sub { >+subtest 'reconcile_balance' => sub { > > plan tests => 3; > >@@ -226,7 +226,7 @@ subtest 'normalize_balance' => sub { > is( $account->outstanding_debits->total_outstanding, 10, 'Outstanding debits sum 10' ); > is( $account->outstanding_credits->total_outstanding, -15, 'Outstanding credits sum -15' ); > >- $account->normalize_balance(); >+ $account->reconcile_balance(); > > is( $account->balance(), -5, "Account balance is -5" ); > is( $account->outstanding_debits->total_outstanding, 0, 'No outstanding debits' ); >@@ -264,7 +264,7 @@ subtest 'normalize_balance' => sub { > is( $account->outstanding_debits->total_outstanding, 10, 'Outstanding debits sum 10' ); > is( $account->outstanding_credits->total_outstanding, -10, 'Outstanding credits sum -10' ); > >- $account->normalize_balance(); >+ $account->reconcile_balance(); > > is( $account->balance(), 0, "Account balance is 0" ); > is( $account->outstanding_debits->total_outstanding, 0, 'No outstanding debits' ); >@@ -303,7 +303,7 @@ subtest 'normalize_balance' => sub { > is( $account->outstanding_debits->total_outstanding, 15, 'Outstanding debits sum 15' ); > is( $account->outstanding_credits->total_outstanding, -10, 'Outstanding credits sum -10' ); > >- $account->normalize_balance(); >+ $account->reconcile_balance(); > > is( $account->balance(), 5, "Account balance is 5" ); > is( $account->outstanding_debits->total_outstanding, 5, 'Outstanding debits sum 5' ); >-- >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 21896
:
82684
|
82685
|
82688
|
82689
|
82690
|
82691
|
82692
|
82701
|
82702
|
82703
|
82720
|
82721
|
82722
|
82735
|
82736
|
82737
|
82738
|
82739
|
82740
|
82742
|
82811
|
82812
| 82813 |
82814
|
82815
|
82820