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