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

(-)a/t/db_dependent/Acquisition.t (-3 / +23 lines)
Lines 19-27 use Modern::Perl; Link Here
19
19
20
use POSIX qw(strftime);
20
use POSIX qw(strftime);
21
21
22
use Test::More tests => 78;
22
use Test::More tests => 79;
23
use t::lib::Mocks;
23
use t::lib::Mocks;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils qw(dt_from_string output_pref);
25
use Koha::Acquisition::Basket;
26
use Koha::Acquisition::Basket;
26
27
27
use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'MARC21' );
28
use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'MARC21' );
Lines 304-319 my $invoiceid = AddInvoice( Link Here
304
305
305
my $invoice = GetInvoice( $invoiceid );
306
my $invoice = GetInvoice( $invoiceid );
306
307
308
my $reception_date = output_pref(
309
    {
310
            dt => dt_from_string->add( days => 1 ),
311
            dateformat => 'iso',
312
            dateonly => 1,
313
    }
314
);
307
my ($datereceived, $new_ordernumber) = ModReceiveOrder(
315
my ($datereceived, $new_ordernumber) = ModReceiveOrder(
308
    {
316
    {
309
        biblionumber      => $biblionumber4,
317
        biblionumber      => $biblionumber4,
310
        order             => Koha::Acquisition::Orders->find( $ordernumbers[4] )->unblessed,
318
        order             => Koha::Acquisition::Orders->find( $ordernumbers[4] )->unblessed,
311
        quantityreceived  => 1,
319
        quantityreceived  => 1,
312
        invoice           => $invoice,
320
        invoice           => $invoice,
313
        budget_id          => $order_content[4]->{str}->{budget_id},
321
        budget_id         => $order_content[4]->{str}->{budget_id},
322
        datereceived      => $reception_date,
314
    }
323
    }
315
);
324
);
316
325
326
is(
327
    output_pref(
328
        {
329
            dt         => dt_from_string($datereceived),
330
            dateformat => 'iso',
331
            dateonly   => 1
332
        }
333
    ),
334
    $reception_date,
335
    'ModReceiveOrder sets the passed date'
336
);
337
317
my $search_orders = SearchOrders({
338
my $search_orders = SearchOrders({
318
    booksellerid => $booksellerid,
339
    booksellerid => $booksellerid,
319
    basketno     => $basketno
340
    basketno     => $basketno
320
- 

Return to bug 24277