Bugzilla – Attachment 174848 Details for
Bug 38343
False display of closed invoices in receive process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38343: (QA follow-up) Improve tests and tidy
Bug-38343-QA-follow-up-Improve-tests-and-tidy.patch (text/plain), 3.01 KB, created by
Emily Lamancusa (emlam)
on 2024-11-20 15:16:47 UTC
(
hide
)
Description:
Bug 38343: (QA follow-up) Improve tests and tidy
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-11-20 15:16:47 UTC
Size:
3.01 KB
patch
obsolete
>From 8c39e54b60610f83ec455d08309cd4fd9d6ff70b Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Wed, 20 Nov 2024 09:41:22 -0500 >Subject: [PATCH] Bug 38343: (QA follow-up) Improve tests and tidy > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > acqui/parcels.pl | 4 ++-- > t/db_dependent/Acquisition/Invoices.t | 15 +++++++++------ > 2 files changed, 11 insertions(+), 8 deletions(-) > >diff --git a/acqui/parcels.pl b/acqui/parcels.pl >index 4b36a0a7d0..23baa663f3 100755 >--- a/acqui/parcels.pl >+++ b/acqui/parcels.pl >@@ -151,8 +151,8 @@ $template->param( > ); > > my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); >-my @parcels = GetInvoices( >- supplierid => $booksellerid, >+my @parcels = GetInvoices( >+ supplierid => $booksellerid, > invoicenumber => $code, > ( $datefrom ? ( shipmentdatefrom => $datefrom ) : () ), > ( $dateto ? ( shipmentdateto => $dateto ) : () ), >diff --git a/t/db_dependent/Acquisition/Invoices.t b/t/db_dependent/Acquisition/Invoices.t >index aa27e3d5df..337bd94883 100755 >--- a/t/db_dependent/Acquisition/Invoices.t >+++ b/t/db_dependent/Acquisition/Invoices.t >@@ -8,7 +8,7 @@ use Koha::Acquisition::Booksellers; > use Koha::Acquisition::Orders; > use Koha::Database; > >-use Test::More tests => 27; >+use Test::More tests => 29; > > BEGIN { > use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder GetInvoiceDetails GetInvoices ModInvoice CloseInvoice ReopenInvoice MergeInvoices DelInvoice )); >@@ -107,7 +107,6 @@ my $invoiceid_closed = AddInvoice( > closedate => '2024-12-13', > ); > >- > my $invoice1 = GetInvoice( $invoiceid1 ); > my $invoice2 = GetInvoice( $invoiceid2 ); > >@@ -170,10 +169,14 @@ is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by ISBN w > @invoices = GetInvoices(isbneanissn => '123456789'); > is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by partial ISBN works (bug 8854)'); > >-@invoices = GetInvoices(booksellerid => $booksellerid, closedate => undef); >-is(scalar @invoices, 2, ); >-is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices()'); >-is($invoices[1]->{invoicenumber}, 'invoice2', 'GetInvoices()'); >+@invoices = GetInvoices( booksellerid => $booksellerid, closedate => undef ); >+is( scalar @invoices, 2, 'GetInvoices() to search by only open invoices' ); >+is( $invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by only open invoices' ); >+is( $invoices[1]->{invoicenumber}, 'invoice2', 'GetInvoices() to search by only open invoices' ); >+ >+@invoices = GetInvoices( booksellerid => $booksellerid, closedate => '2024-12-13' ); >+is( scalar @invoices, 1, 'GetInvoices() to filter by closedate' ); >+is( $invoices[0]->{invoicenumber}, 'invoice_close', 'GetInvoices() to filter by closedate' ); > > my $invoicesummary1 = GetInvoice($invoiceid1); > is($invoicesummary1->{'invoicenumber'}, 'invoice1', 'GetInvoice retrieves correct invoice'); >-- >2.34.1
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 38343
:
174818
|
174820
|
174844
|
174845
|
174846
|
174847
| 174848