View | Details | Raw Unified | Return to bug 38343
Collapse All | Expand All

(-)a/acqui/parcels.pl (-2 / +2 lines)
Lines 151-158 $template->param( Link Here
151
);
151
);
152
152
153
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
153
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
154
my @parcels = GetInvoices(
154
my @parcels    = GetInvoices(
155
    supplierid => $booksellerid,
155
    supplierid    => $booksellerid,
156
    invoicenumber => $code,
156
    invoicenumber => $code,
157
    ( $datefrom ? ( shipmentdatefrom => $datefrom ) : () ),
157
    ( $datefrom ? ( shipmentdatefrom => $datefrom ) : () ),
158
    ( $dateto   ? ( shipmentdateto   => $dateto   ) : () ),
158
    ( $dateto   ? ( shipmentdateto   => $dateto   ) : () ),
(-)a/t/db_dependent/Acquisition/Invoices.t (-7 / +9 lines)
Lines 8-14 use Koha::Acquisition::Booksellers; Link Here
8
use Koha::Acquisition::Orders;
8
use Koha::Acquisition::Orders;
9
use Koha::Database;
9
use Koha::Database;
10
10
11
use Test::More tests => 27;
11
use Test::More tests => 29;
12
12
13
BEGIN {
13
BEGIN {
14
    use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder GetInvoiceDetails GetInvoices ModInvoice CloseInvoice ReopenInvoice MergeInvoices DelInvoice ));
14
    use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder GetInvoiceDetails GetInvoices ModInvoice CloseInvoice ReopenInvoice MergeInvoices DelInvoice ));
Lines 107-113 my $invoiceid_closed = AddInvoice( Link Here
107
    closedate     => '2024-12-13',
107
    closedate     => '2024-12-13',
108
);
108
);
109
109
110
111
my $invoice1 = GetInvoice( $invoiceid1 );
110
my $invoice1 = GetInvoice( $invoiceid1 );
112
my $invoice2 = GetInvoice( $invoiceid2 );
111
my $invoice2 = GetInvoice( $invoiceid2 );
113
112
Lines 170-179 is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by ISBN w Link Here
170
@invoices = GetInvoices(isbneanissn => '123456789');
169
@invoices = GetInvoices(isbneanissn => '123456789');
171
is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by partial ISBN works (bug 8854)');
170
is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by partial ISBN works (bug 8854)');
172
171
173
@invoices = GetInvoices(booksellerid => $booksellerid, closedate => undef);
172
@invoices = GetInvoices( booksellerid => $booksellerid, closedate => undef );
174
is(scalar @invoices, 2, );
173
is( scalar @invoices,              2,          'GetInvoices() to search by only open invoices' );
175
is($invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices()');
174
is( $invoices[0]->{invoicenumber}, 'invoice1', 'GetInvoices() to search by only open invoices' );
176
is($invoices[1]->{invoicenumber}, 'invoice2', 'GetInvoices()');
175
is( $invoices[1]->{invoicenumber}, 'invoice2', 'GetInvoices() to search by only open invoices' );
176
177
@invoices = GetInvoices( booksellerid => $booksellerid, closedate => '2024-12-13' );
178
is( scalar @invoices,              1,               'GetInvoices() to filter by closedate' );
179
is( $invoices[0]->{invoicenumber}, 'invoice_close', 'GetInvoices() to filter by closedate' );
177
180
178
my $invoicesummary1 = GetInvoice($invoiceid1);
181
my $invoicesummary1 = GetInvoice($invoiceid1);
179
is($invoicesummary1->{'invoicenumber'}, 'invoice1', 'GetInvoice retrieves correct invoice');
182
is($invoicesummary1->{'invoicenumber'}, 'invoice1', 'GetInvoice retrieves correct invoice');
180
- 

Return to bug 38343