Bug 21587: don't drop patrons to notify in order creation

It only worked on modification.

== Test plan ==
1. have/create a active budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add an order line to the basket
     Add a user in "To notify on receiving"
6. Modify the order
7. The patrons isn't here. This is the bug
8. Add a user in "To notify on receiving"
9. Save
10. Modify the order
11. The patron is here now
12. Apply this patch
13. Retry step 5 to 11 and patron should be saved on order creation
14. Celebrate! :D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Victor Grousset 2018-10-18 11:54:58 +02:00 committed by Nick Clemens
parent 59757c1f5b
commit bf8b4e773c
1 changed files with 3 additions and 4 deletions

View File

@ -290,14 +290,13 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) {
my $order = Koha::Acquisition::Order->new($orderinfo);
if ( $orderinfo->{ordernumber} ) {
ModOrder($orderinfo);
my $order_users_ids = $input->param('users_ids');
my @order_users = split( /:/, $order_users_ids );
ModOrderUsers( $orderinfo->{ordernumber}, @order_users );
}
else { # else, it's a new line
$order->store;
}
my $order_users_ids = $input->param('users_ids');
my @order_users = split( /:/, $order_users_ids );
ModOrderUsers( $order->ordernumber, @order_users );
# now, add items if applicable
if ($basket->effective_create_items eq 'ordering') {