Bugzilla – Attachment 82703 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]
Bug 21896: (QA follow-up) normalize_balance -> reconcile_balance rename
Bug-21896-QA-follow-up-normalizebalance---reconcil.patch (text/plain), 2.80 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-11-28 14:27:38 UTC
(
hide
)
Description:
Bug 21896: (QA follow-up) normalize_balance -> reconcile_balance rename
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-11-28 14:27:38 UTC
Size:
2.80 KB
patch
obsolete
>From fab7cbe8fdeea8918544180c1227b138cd18057e 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] 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> >--- > 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 064489f65f..80e8353368 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -515,15 +515,15 @@ sub lines { > ); > } > >-=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 ad9da10f64..39c0664f27 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -226,7 +226,7 @@ subtest 'lines() tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'normalize_balance' => sub { >+subtest 'reconcile_balance' => sub { > > plan tests => 3; > >@@ -260,7 +260,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' ); >@@ -298,7 +298,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' ); >@@ -337,7 +337,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