Bugzilla – Attachment 67757 Details for
Bug 19066
Add branchcode to accountlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19066 [QA Followup] - Fix related unit test failures
Bug-19066-QA-Followup---Fix-related-unit-test-fail.patch (text/plain), 1.93 KB, created by
Kyle M Hall
on 2017-10-06 18:52:37 UTC
(
hide
)
Description:
Bug 19066 [QA Followup] - Fix related unit test failures
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2017-10-06 18:52:37 UTC
Size:
1.93 KB
patch
obsolete
>From 7d3eae2cb422719c9b924c0e0e2458d8db80f87c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 6 Oct 2017 14:52:25 -0400 >Subject: [PATCH] Bug 19066 [QA Followup] - Fix related unit test failures > >--- > C4/Accounts.pm | 2 ++ > C4/Circulation.pm | 2 +- > t/db_dependent/Circulation/issue.t | 4 ++-- > 3 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index a963aae..2a2eeb0 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -211,6 +211,8 @@ sub manualinvoice { > my $accountno = getnextacctno($borrowernumber); > my $amountleft = $amount; > >+ $itemnum ||= undef; >+ > if ( ( $type eq 'L' ) > or ( $type eq 'F' ) > or ( $type eq 'A' ) >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 723796e..8a522f8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3223,7 +3223,7 @@ sub AddIssuingCharge { > > my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; > >- Koha::Account::Line->new( >+ return Koha::Account::Line->new( > { > date => dt_from_string(), > borrowernumber => $borrowernumber, >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index 2f12201..eb5d3e1 100644 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -207,8 +207,8 @@ $sth = $dbh->prepare($query); > $sth->execute; > my $countaccount = $sth -> fetchrow_array; > is ($countaccount,0,"0 accountline exists"); >-is( C4::Circulation::AddIssuingCharge( $item_id1, $borrower_id1, 10 ), >- 1, "An issuing charge has been added" ); >+isa_ok( C4::Circulation::AddIssuingCharge( $item_id1, $borrower_id1, 10 ), >+ 'Koha::Account::Line', "An issuing charge has been added" ); > my $account_id = $dbh->last_insert_id( undef, undef, 'accountlines', undef ); > $sth->execute; > $countaccount = $sth -> fetchrow_array; >-- >2.10.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 19066
:
65769
|
65770
|
65771
|
67756
|
67757
|
71153
|
71154
|
71155
|
73185
|
73186
|
73187
|
73595
|
77281
|
77282
|
77283
|
78900
|
78901
|
81144
|
81145
|
81146
|
81253
|
81254
|
81255
|
81684
|
81912
|
81918
|
82047
|
82048
|
82084
|
82086
|
82087
|
82469
|
82470
|
82471
|
82473
|
82474
|
82475
|
82476
|
82477
|
82478
|
83067
|
83068
|
83069
|
83070
|
83071
|
83072
|
83073
|
83074
|
83075
|
83076
|
83077
|
83078
|
83079
|
83080
|
83081
|
83082
|
83083
|
83084
|
83275
|
83519
|
83520
|
83521
|
83522
|
83523
|
83524
|
83525
|
83526
|
83527
|
83528
|
83628