|
Lines 159-178
my $invoiceid = AddInvoice(
Link Here
|
| 159 |
unknown => "unknown" |
159 |
unknown => "unknown" |
| 160 |
); |
160 |
); |
| 161 |
|
161 |
|
| 162 |
my ($datereceived, $new_ordernumber) = ModReceiveOrder( |
162 |
my ( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
| 163 |
$biblionumber2, |
163 |
{ |
| 164 |
$ordernumber2, |
164 |
biblionumber => $biblionumber2, |
| 165 |
2, |
165 |
ordernumber => $ordernumber2, |
| 166 |
undef, |
166 |
quantityreceived => 2, |
| 167 |
12, |
167 |
cost => 12, |
| 168 |
12, |
168 |
ecost => 12, |
| 169 |
$invoiceid, |
169 |
invoiceid => $invoiceid, |
| 170 |
42, |
170 |
rrp => 42, |
| 171 |
undef, |
171 |
notes => "my notes", |
| 172 |
undef, |
172 |
} |
| 173 |
undef, |
173 |
); |
| 174 |
"my notes", |
|
|
| 175 |
); |
| 176 |
my $order2 = GetOrder( $ordernumber2 ); |
174 |
my $order2 = GetOrder( $ordernumber2 ); |
| 177 |
is($order2->{'quantityreceived'}, 0, 'Splitting up order did not receive any on original order'); |
175 |
is($order2->{'quantityreceived'}, 0, 'Splitting up order did not receive any on original order'); |
| 178 |
is($order2->{'quantity'}, 40, '40 items on original order'); |
176 |
is($order2->{'quantity'}, 40, '40 items on original order'); |
|
Lines 191-210
my $budgetid2 = C4::Budgets::AddBudget(
Link Here
|
| 191 |
} |
189 |
} |
| 192 |
); |
190 |
); |
| 193 |
|
191 |
|
| 194 |
($datereceived, $new_ordernumber) = ModReceiveOrder( |
192 |
( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
| 195 |
$biblionumber2, |
193 |
{ |
| 196 |
$ordernumber3, |
194 |
biblionumber => $biblionumber2, |
| 197 |
2, |
195 |
ordernumber => $ordernumber3, |
| 198 |
undef, |
196 |
quantityreceived => 2, |
| 199 |
12, |
197 |
cost => 12, |
| 200 |
12, |
198 |
ecost => 12, |
| 201 |
$invoiceid, |
199 |
invoiceid => $invoiceid, |
| 202 |
42, |
200 |
rrp => 42, |
| 203 |
$budgetid2, |
201 |
budget_id => $budgetid2, |
| 204 |
undef, |
202 |
notes => "my other notes", |
| 205 |
undef, |
203 |
} |
| 206 |
"my other notes", |
204 |
); |
| 207 |
); |
|
|
| 208 |
|
205 |
|
| 209 |
my $order3 = GetOrder( $ordernumber3 ); |
206 |
my $order3 = GetOrder( $ordernumber3 ); |
| 210 |
is($order3->{'quantityreceived'}, 0, 'Splitting up order did not receive any on original order'); |
207 |
is($order3->{'quantityreceived'}, 0, 'Splitting up order did not receive any on original order'); |
|
Lines 217-236
is($neworder->{'quantity'}, 2, '2 items on new order');
Link Here
|
| 217 |
is($neworder->{'quantityreceived'}, 2, 'Splitting up order received items on new order'); |
214 |
is($neworder->{'quantityreceived'}, 2, 'Splitting up order received items on new order'); |
| 218 |
is($neworder->{'budget_id'}, $budgetid2, 'Budget on new order is changed'); |
215 |
is($neworder->{'budget_id'}, $budgetid2, 'Budget on new order is changed'); |
| 219 |
|
216 |
|
| 220 |
($datereceived, $new_ordernumber) = ModReceiveOrder( |
217 |
( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
| 221 |
$biblionumber2, |
218 |
{ |
| 222 |
$ordernumber3, |
219 |
biblionumber => $biblionumber2, |
| 223 |
2, |
220 |
ordernumber => $ordernumber3, |
| 224 |
undef, |
221 |
quantityreceived => 2, |
| 225 |
12, |
222 |
cost => 12, |
| 226 |
12, |
223 |
ecost => 12, |
| 227 |
$invoiceid, |
224 |
invoiceid => $invoiceid, |
| 228 |
42, |
225 |
rrp => 42, |
| 229 |
$budgetid2, |
226 |
budget_id => $budgetid2, |
| 230 |
undef, |
227 |
notes => "my third notes", |
| 231 |
undef, |
228 |
} |
| 232 |
"my third notes", |
229 |
); |
| 233 |
); |
|
|
| 234 |
|
230 |
|
| 235 |
$order3 = GetOrder( $ordernumber3 ); |
231 |
$order3 = GetOrder( $ordernumber3 ); |
| 236 |
is($order3->{'quantityreceived'}, 2, 'Order not split up'); |
232 |
is($order3->{'quantityreceived'}, 2, 'Order not split up'); |