Lines 56-68
is( $basket->{is_standing}, 1, 'basket correctly created as standing order baske
Link Here
|
56 |
|
56 |
|
57 |
my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( MARC::Record->new, '' ); |
57 |
my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( MARC::Record->new, '' ); |
58 |
|
58 |
|
|
|
59 |
|
59 |
my $ordernumber = Koha::Acquisition::Order->new( |
60 |
my $ordernumber = Koha::Acquisition::Order->new( |
60 |
{ |
61 |
{ |
61 |
basketno => $basketno, |
62 |
basketno => $basketno, |
62 |
biblionumber => $biblionumber, |
63 |
biblionumber => $biblionumber, |
63 |
budget_id => $budget->{budget_id}, |
64 |
budget_id => $budget->{budget_id}, |
64 |
currency => 'USD', |
65 |
currency => 'USD', |
65 |
quantity => 0, |
66 |
quantity => 0, |
|
|
67 |
rrp => 42, |
68 |
rrp_tax_included => 42, |
69 |
rrp_tax_excluded => 42, |
70 |
ecost => 22, |
71 |
ecost_tax_included => 22, |
72 |
ecost_tax_excluded => 22, |
73 |
unitprice => 12, |
74 |
unitprice_tax_included => 12, |
75 |
unitprice_tax_excluded => 12, |
76 |
tax_rate => 0, |
77 |
tax_rate_on_ordering => 0, |
78 |
tax_rate_on_receiving => 0, |
66 |
} |
79 |
} |
67 |
)->insert->{ordernumber}; |
80 |
)->insert->{ordernumber}; |
68 |
|
81 |
|
Lines 85-105
my $invoiceid = AddInvoice(
Link Here
|
85 |
unknown => "unknown" |
98 |
unknown => "unknown" |
86 |
); |
99 |
); |
87 |
|
100 |
|
|
|
101 |
my $order = Koha::Acquisition::Order->fetch( { ordernumber => $ordernumber } ); |
102 |
|
88 |
my ( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
103 |
my ( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
89 |
{ |
104 |
{ |
90 |
biblionumber => $biblionumber, |
105 |
biblionumber => $biblionumber, |
91 |
ordernumber => $ordernumber, |
106 |
order => $order, |
92 |
quantityreceived => 2, |
107 |
quantityreceived => 2, |
93 |
cost => 12, |
|
|
94 |
ecost => 22, |
95 |
invoiceid => $invoiceid, |
108 |
invoiceid => $invoiceid, |
96 |
rrp => 42, |
|
|
97 |
} |
109 |
} |
98 |
); |
110 |
); |
99 |
|
111 |
|
100 |
isnt( $ordernumber, $new_ordernumber, "standing order split on receive" ); |
112 |
isnt( $ordernumber, $new_ordernumber, "standing order split on receive" ); |
101 |
|
113 |
|
102 |
my $order = Koha::Acquisition::Order->fetch( { ordernumber => $ordernumber } ); |
114 |
#order has been updated, refetch |
|
|
115 |
$order = Koha::Acquisition::Order->fetch( { ordernumber => $ordernumber } ); |
103 |
my $neworder = Koha::Acquisition::Order->fetch( { ordernumber => $new_ordernumber } ); |
116 |
my $neworder = Koha::Acquisition::Order->fetch( { ordernumber => $new_ordernumber } ); |
104 |
|
117 |
|
105 |
is( $order->{orderstatus}, 'partial', 'original order set to partially received' ); |
118 |
is( $order->{orderstatus}, 'partial', 'original order set to partially received' ); |
106 |
- |
|
|