|
Lines 651-659
my $invoiceid = AddInvoice(
Link Here
|
| 651 |
unknown => "unknown" |
651 |
unknown => "unknown" |
| 652 |
); |
652 |
); |
| 653 |
|
653 |
|
| 654 |
my ( $datereceived, $new_ordernumber ) = |
654 |
my ($datereceived, $new_ordernumber) = ModReceiveOrder( |
| 655 |
ModReceiveOrder( $biblionumber4, $ordernumbers[4], 1, undef, 10, 10, |
655 |
{ |
| 656 |
$invoiceid, 10, $order_content[4]->{str}->{budget_id} ); |
656 |
biblionumber => $biblionumber4, |
|
|
657 |
ordernumber => $ordernumbers[4], |
| 658 |
quantityreceived => 1, |
| 659 |
cost => 10, |
| 660 |
ecost => 10, |
| 661 |
invoiceid => $invoiceid, |
| 662 |
rrp => 10, |
| 663 |
budget_id => $order_content[4]->{str}->{budget_id}, |
| 664 |
} |
| 665 |
); |
| 657 |
|
666 |
|
| 658 |
my $search_orders = SearchOrders({ |
667 |
my $search_orders = SearchOrders({ |
| 659 |
booksellerid => $booksellerid, |
668 |
booksellerid => $booksellerid, |
|
Lines 791-799
is(
Link Here
|
| 791 |
"AddClaim : Check claimed_date" |
800 |
"AddClaim : Check claimed_date" |
| 792 |
); |
801 |
); |
| 793 |
|
802 |
|
| 794 |
( $datereceived, $new_ordernumber ) = |
803 |
( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
| 795 |
ModReceiveOrder( $biblionumber2, $ordernumbers[1], 2, undef, 12, 12, |
804 |
{ |
| 796 |
$invoiceid, 42, undef, undef, undef, "my notes"); |
805 |
biblionumber => $biblionumber2, |
|
|
806 |
ordernumber => $ordernumbers[1], |
| 807 |
quantityreceived => 2, |
| 808 |
cost => 12, |
| 809 |
ecost => 12, |
| 810 |
invoiceid => $invoiceid, |
| 811 |
rrp => 42, |
| 812 |
notes => "my notes", |
| 813 |
} |
| 814 |
); |
| 797 |
my $order2 = GetOrder( $ordernumbers[1] ); |
815 |
my $order2 = GetOrder( $ordernumbers[1] ); |
| 798 |
is( $order2->{'quantityreceived'}, |
816 |
is( $order2->{'quantityreceived'}, |
| 799 |
0, 'Splitting up order did not receive any on original order' ); |
817 |
0, 'Splitting up order did not receive any on original order' ); |
|
Lines 816-824
my $budgetid2 = C4::Budgets::AddBudget(
Link Here
|
| 816 |
} |
834 |
} |
| 817 |
); |
835 |
); |
| 818 |
|
836 |
|
| 819 |
( $datereceived, $new_ordernumber ) = |
837 |
( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
| 820 |
ModReceiveOrder( $biblionumber2, $ordernumbers[2], 2, undef, 12, 12, |
838 |
{ |
| 821 |
$invoiceid, 42, $budgetid2, undef, undef, "my other notes" ); |
839 |
biblionumber => $biblionumber2, |
|
|
840 |
ordernumber => $ordernumbers[2], |
| 841 |
quantityreceived => 2, |
| 842 |
cost => 12, |
| 843 |
ecost => 12, |
| 844 |
invoiceid => $invoiceid, |
| 845 |
rrp => 42, |
| 846 |
budget_id => $budgetid2, |
| 847 |
notes => "my other notes", |
| 848 |
} |
| 849 |
); |
| 822 |
|
850 |
|
| 823 |
my $order3 = GetOrder( $ordernumbers[2] ); |
851 |
my $order3 = GetOrder( $ordernumbers[2] ); |
| 824 |
is( $order3->{'quantityreceived'}, |
852 |
is( $order3->{'quantityreceived'}, |
|
Lines 835-843
is( $neworder->{'quantityreceived'},
Link Here
|
| 835 |
2, 'Splitting up order received items on new order' ); |
863 |
2, 'Splitting up order received items on new order' ); |
| 836 |
is( $neworder->{'budget_id'}, $budgetid2, 'Budget on new order is changed' ); |
864 |
is( $neworder->{'budget_id'}, $budgetid2, 'Budget on new order is changed' ); |
| 837 |
|
865 |
|
| 838 |
( $datereceived, $new_ordernumber ) = |
866 |
( $datereceived, $new_ordernumber ) = ModReceiveOrder( |
| 839 |
ModReceiveOrder( $biblionumber2, $ordernumbers[2], 2, undef, 12, 12, |
867 |
{ |
| 840 |
$invoiceid, 42, $budgetid2, undef, undef, "my third notes" ); |
868 |
biblionumber => $biblionumber2, |
|
|
869 |
ordernumber => $ordernumbers[2], |
| 870 |
quantityreceived => 2, |
| 871 |
cost => 12, |
| 872 |
ecost => 12, |
| 873 |
invoiceid => $invoiceid, |
| 874 |
rrp => 42, |
| 875 |
budget_id => $budgetid2, |
| 876 |
notes => "my third notes", |
| 877 |
} |
| 878 |
); |
| 841 |
|
879 |
|
| 842 |
$order3 = GetOrder( $ordernumbers[2] ); |
880 |
$order3 = GetOrder( $ordernumbers[2] ); |
| 843 |
is( $order3->{'quantityreceived'}, 2, 'Order not split up' ); |
881 |
is( $order3->{'quantityreceived'}, 2, 'Order not split up' ); |