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

(-)a/t/db_dependent/Acquisition/OrderFromSubscription.t (-7 / +7 lines)
Lines 33-40 my $bookseller = Koha::Acquisition::Bookseller->new( Link Here
33
my ($biblionumber, $biblioitemnumber) = AddBiblio(MARC::Record->new, '');
33
my ($biblionumber, $biblioitemnumber) = AddBiblio(MARC::Record->new, '');
34
my $budgetid;
34
my $budgetid;
35
my $bpid = AddBudgetPeriod({
35
my $bpid = AddBudgetPeriod({
36
    budget_period_startdate   => '01-01-2015',
36
    budget_period_startdate   => '2015-01-01',
37
    budget_period_enddate     => '12-31-2015',
37
    budget_period_enddate     => '2015-12-31',
38
    budget_period_description => "budget desc"
38
    budget_period_description => "budget desc"
39
});
39
});
40
40
Lines 48-58 my $budget_id = AddBudget({ Link Here
48
48
49
my $subscriptionid = NewSubscription(
49
my $subscriptionid = NewSubscription(
50
    undef,      "",     undef, undef, $budget_id, $biblionumber,
50
    undef,      "",     undef, undef, $budget_id, $biblionumber,
51
    '01-01-2013',undef, undef, undef,  undef,
51
    '2013-01-01',undef, undef, undef,  undef,
52
    undef,      undef,  undef, undef, undef, undef,
52
    undef,      undef,  undef, undef, undef, undef,
53
    1,          "notes",undef, '01-01-2013', undef, undef,
53
    1,          "notes",undef, '2013-01-01', undef, undef,
54
    undef,       undef,  0,    "intnotes",  0,
54
    undef,       undef,  0,    "intnotes",  0,
55
    undef, undef, 0,          undef,         '31-12-2013', 0
55
    undef, undef, 0,          undef,         '2013-12-31', 0
56
);
56
);
57
die unless $subscriptionid;
57
die unless $subscriptionid;
58
58
Lines 64-70 my $subscription = GetSubscription( $subscriptionid ); Link Here
64
64
65
my $order = Koha::Acquisition::Order->new({
65
my $order = Koha::Acquisition::Order->new({
66
    biblionumber => $subscription->{biblionumber},
66
    biblionumber => $subscription->{biblionumber},
67
    entrydate => '01-01-2013',
67
    entrydate => '2013-01-01',
68
    quantity => 1,
68
    quantity => 1,
69
    currency => $curcode,
69
    currency => $curcode,
70
    listprice => $cost,
70
    listprice => $cost,
Lines 88-94 $dbh->do(q{DELETE FROM aqinvoices}); Link Here
88
my $invoiceid = AddInvoice(invoicenumber => 'invoice1', booksellerid => $bookseller->id, unknown => "unknown");
88
my $invoiceid = AddInvoice(invoicenumber => 'invoice1', booksellerid => $bookseller->id, unknown => "unknown");
89
89
90
my $invoice = GetInvoice( $invoiceid );
90
my $invoice = GetInvoice( $invoiceid );
91
$invoice->{datereceived} = '02-01-2013';
91
$invoice->{datereceived} = '2013-01-02';
92
92
93
my ( $datereceived, $new_ordernumber ) = ModReceiveOrder(
93
my ( $datereceived, $new_ordernumber ) = ModReceiveOrder(
94
    {
94
    {
(-)a/t/db_dependent/Acquisition/OrderUsers.t (-1 / +1 lines)
Lines 49-55 my $order = Koha::Acquisition::Order->new( Link Here
49
        quantity         => 2,
49
        quantity         => 2,
50
        biblionumber     => $biblionumber,
50
        biblionumber     => $biblionumber,
51
        budget_id        => $budgetid,
51
        budget_id        => $budgetid,
52
        entrydate        => '01-01-2014',
52
        entrydate        => '2014-01-01',
53
        currency         => $currency->{currency},
53
        currency         => $currency->{currency},
54
        orderstatus      => 1,
54
        orderstatus      => 1,
55
        quantityreceived => 0,
55
        quantityreceived => 0,
(-)a/t/db_dependent/AdditionalField.t (-2 / +2 lines)
Lines 110-117 use C4::Serials::Numberpattern; Link Here
110
my ($biblionumber, $biblioitemnumber) = AddBiblio(MARC::Record->new, '');
110
my ($biblionumber, $biblioitemnumber) = AddBiblio(MARC::Record->new, '');
111
my $budgetid;
111
my $budgetid;
112
my $bpid = AddBudgetPeriod({
112
my $bpid = AddBudgetPeriod({
113
    budget_period_startdate => '01-01-2015',
113
    budget_period_startdate => '2015-01-01',
114
    budget_period_enddate   => '01-01-2016',
114
    budget_period_enddate   => '2016-01-01',
115
});
115
});
116
116
117
my $budget_id = AddBudget({
117
my $budget_id = AddBudget({
(-)a/t/db_dependent/Bookseller.t (-11 / +11 lines)
Lines 189-197 is( $bookseller1fromid->subscriptions->count, Link Here
189
189
190
my $id_subscription1 = NewSubscription(
190
my $id_subscription1 = NewSubscription(
191
    undef,      'BRANCH2',     $id_supplier1, undef, $id_budget, $biblionumber,
191
    undef,      'BRANCH2',     $id_supplier1, undef, $id_budget, $biblionumber,
192
    '01-01-2013',undef, undef, undef,  undef,
192
    '2013-01-01',undef, undef, undef,  undef,
193
    undef,      undef,  undef, undef, undef, undef,
193
    undef,      undef,  undef, undef, undef, undef,
194
    1,          "subscription notes",undef, '01-01-2013', undef, undef,
194
    1,          "subscription notes",undef, '2013-01-01', undef, undef,
195
    undef, 'CALL ABC',  0,    "intnotes",  0,
195
    undef, 'CALL ABC',  0,    "intnotes",  0,
196
    undef, undef, 0,          undef,         '2013-11-30', 0
196
    undef, undef, 0,          undef,         '2013-11-30', 0
197
);
197
);
Lines 201-209 is($subscriptions[0]->{publicnotes}, 'subscription notes', 'subscription search Link Here
201
201
202
my $id_subscription2 = NewSubscription(
202
my $id_subscription2 = NewSubscription(
203
    undef,      'BRANCH2',     $id_supplier1, undef, $id_budget, $biblionumber,
203
    undef,      'BRANCH2',     $id_supplier1, undef, $id_budget, $biblionumber,
204
    '01-01-2013',undef, undef, undef,  undef,
204
    '2013-01-01',undef, undef, undef,  undef,
205
    undef,      undef,  undef, undef, undef, undef,
205
    undef,      undef,  undef, undef, undef, undef,
206
    1,          "subscription notes",undef, '01-01-2013', undef, undef,
206
    1,          "subscription notes",undef, '2013-01-01', undef, undef,
207
    undef, 'CALL DEF',  0,    "intnotes",  0,
207
    undef, 'CALL DEF',  0,    "intnotes",  0,
208
    undef, undef, 0,          undef,         '2013-07-31', 0
208
    undef, undef, 0,          undef,         '2013-07-31', 0
209
);
209
);
Lines 330-338 ModBasket($basket4info); Link Here
330
#Add 1 subscription
330
#Add 1 subscription
331
my $id_subscription3 = NewSubscription(
331
my $id_subscription3 = NewSubscription(
332
    undef,      "BRANCH1",     $id_supplier1, undef, $id_budget, $biblionumber,
332
    undef,      "BRANCH1",     $id_supplier1, undef, $id_budget, $biblionumber,
333
    '01-01-2013',undef, undef, undef,  undef,
333
    '2013-01-01',undef, undef, undef,  undef,
334
    undef,      undef,  undef, undef, undef, undef,
334
    undef,      undef,  undef, undef, undef, undef,
335
    1,          "subscription notes",undef, '01-01-2013', undef, undef,
335
    1,          "subscription notes",undef, '2013-01-01', undef, undef,
336
    undef,       undef,  0,    "intnotes",  0,
336
    undef,       undef,  0,    "intnotes",  0,
337
    undef, undef, 0,          'LOCA',         '2013-12-31', 0
337
    undef, undef, 0,          'LOCA',         '2013-12-31', 0
338
);
338
);
Lines 355-361 my $order1 = Koha::Acquisition::Order->new( Link Here
355
        quantity         => 24,
355
        quantity         => 24,
356
        biblionumber     => $biblionumber,
356
        biblionumber     => $biblionumber,
357
        budget_id        => $id_budget,
357
        budget_id        => $id_budget,
358
        entrydate        => '01-01-2013',
358
        entrydate        => '2013-01-01',
359
        currency         => $curcode,
359
        currency         => $curcode,
360
        notes            => "This is a note1",
360
        notes            => "This is a note1",
361
        tax_rate          => 0.0500,
361
        tax_rate          => 0.0500,
Lines 364-370 my $order1 = Koha::Acquisition::Order->new( Link Here
364
        quantityreceived => 2,
364
        quantityreceived => 2,
365
        rrp              => 10,
365
        rrp              => 10,
366
        ecost            => 10,
366
        ecost            => 10,
367
        datereceived     => '01-06-2013'
367
        datereceived     => '2013-06-01'
368
    }
368
    }
369
)->store;
369
)->store;
370
my $ordernumber1 = $order1->ordernumber;
370
my $ordernumber1 = $order1->ordernumber;
Lines 375-381 my $order2 = Koha::Acquisition::Order->new( Link Here
375
        quantity       => 20,
375
        quantity       => 20,
376
        biblionumber   => $biblionumber,
376
        biblionumber   => $biblionumber,
377
        budget_id      => $id_budget,
377
        budget_id      => $id_budget,
378
        entrydate      => '01-01-2013',
378
        entrydate      => '2013-01-01',
379
        currency       => $curcode,
379
        currency       => $curcode,
380
        notes          => "This is a note2",
380
        notes          => "This is a note2",
381
        tax_rate        => 0.0500,
381
        tax_rate        => 0.0500,
Lines 393-399 my $order3 = Koha::Acquisition::Order->new( Link Here
393
        quantity       => 20,
393
        quantity       => 20,
394
        biblionumber   => $biblionumber,
394
        biblionumber   => $biblionumber,
395
        budget_id      => $id_budget,
395
        budget_id      => $id_budget,
396
        entrydate      => '02-02-2013',
396
        entrydate      => '2013-02-02',
397
        currency       => $curcode,
397
        currency       => $curcode,
398
        notes          => "This is a note3",
398
        notes          => "This is a note3",
399
        tax_rate        => 0.0500,
399
        tax_rate        => 0.0500,
Lines 411-417 my $order4 = Koha::Acquisition::Order->new( Link Here
411
        quantity         => 20,
411
        quantity         => 20,
412
        biblionumber     => $biblionumber,
412
        biblionumber     => $biblionumber,
413
        budget_id        => $id_budget,
413
        budget_id        => $id_budget,
414
        entrydate        => '02-02-2013',
414
        entrydate        => '2013-02-02',
415
        currency         => $curcode,
415
        currency         => $curcode,
416
        notes            => "This is a note3",
416
        notes            => "This is a note3",
417
        tax_rate          => 0.0500,
417
        tax_rate          => 0.0500,
(-)a/t/db_dependent/Koha/Acquisition/Booksellers.t (-4 / +4 lines)
Lines 110-120 subtest '->subscriptions() tests' => sub { Link Here
110
    # Add two subscriptions
110
    # Add two subscriptions
111
    my $subscription_1_id = NewSubscription(
111
    my $subscription_1_id = NewSubscription(
112
        undef,        'BRANCH2',     $vendor->id,          undef,
112
        undef,        'BRANCH2',     $vendor->id,          undef,
113
        $id_budget,   $biblionumber, '01-01-2013',         undef,
113
        $id_budget,   $biblionumber, '2013-01-01',         undef,
114
        undef,        undef,         undef,                undef,
114
        undef,        undef,         undef,                undef,
115
        undef,        undef,         undef,                undef,
115
        undef,        undef,         undef,                undef,
116
        undef,        1,             "subscription notes", undef,
116
        undef,        1,             "subscription notes", undef,
117
        '01-01-2013', undef,         undef,                undef,
117
        '2013-01-01', undef,         undef,                undef,
118
        'CALL ABC',   0,             "intnotes",           0,
118
        'CALL ABC',   0,             "intnotes",           0,
119
        undef,        undef,         0,                    undef,
119
        undef,        undef,         0,                    undef,
120
        '2013-11-30', 0
120
        '2013-11-30', 0
Lines 128-138 subtest '->subscriptions() tests' => sub { Link Here
128
128
129
    my $id_subscription2 = NewSubscription(
129
    my $id_subscription2 = NewSubscription(
130
        undef,        'BRANCH2',     $vendor->id,          undef,
130
        undef,        'BRANCH2',     $vendor->id,          undef,
131
        $id_budget,   $biblionumber, '01-01-2013',         undef,
131
        $id_budget,   $biblionumber, '2013-01-01',         undef,
132
        undef,        undef,         undef,                undef,
132
        undef,        undef,         undef,                undef,
133
        undef,        undef,         undef,                undef,
133
        undef,        undef,         undef,                undef,
134
        undef,        1,             "subscription notes", undef,
134
        undef,        1,             "subscription notes", undef,
135
        '01-01-2013', undef,         undef,                undef,
135
        '2013-01-01', undef,         undef,                undef,
136
        'CALL DEF',   0,             "intnotes",           0,
136
        'CALL DEF',   0,             "intnotes",           0,
137
        undef,        undef,         0,                    undef,
137
        undef,        undef,         0,                    undef,
138
        '2013-07-31', 0
138
        '2013-07-31', 0
(-)a/t/db_dependent/Serials.t (-3 / +2 lines)
Lines 51-58 my ($biblionumber, $biblioitemnumber) = AddBiblio(MARC::Record->new, ''); Link Here
51
51
52
my $budgetid;
52
my $budgetid;
53
my $bpid = AddBudgetPeriod({
53
my $bpid = AddBudgetPeriod({
54
    budget_period_startdate   => '01-01-2015',
54
    budget_period_startdate   => '2015-01-01',
55
    budget_period_enddate     => '31-12-2015',
55
    budget_period_enddate     => '2015-12-31',
56
    budget_period_description => "budget desc"
56
    budget_period_description => "budget desc"
57
});
57
});
58
58
59
- 

Return to bug 20144