From f05f65ba18a294d20d1091b5eae46904690e2e94 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 9 Dec 2021 13:55:41 +0000 Subject: [PATCH] Bug 29670: Fix EDI for AcqCreateItem = 'placing on order' The AcqCreatItem at order time functionality was broken by bug 27708. This patch resolves that. Test plan. 1) Run the newly created unit tests that prove both settings work Signed-off-by: Jonathan Field Signed-off-by: Katrin Fischer (cherry picked from commit 960372b76ca0b42d8e22dde445402f4c9ba523dc) Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit bda8299669d1a34a32fe45f6f765133a0f54f22a) Signed-off-by: Victor Grousset/tuxayo --- Koha/Edifact/Order.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm index 3104a80094..3093a7acf3 100644 --- a/Koha/Edifact/Order.pm +++ b/Koha/Edifact/Order.pm @@ -390,17 +390,17 @@ sub order_line { my $i_obj = $schema->resultset('Item')->find( $item->itemnumber ); if ( defined $i_obj ) { push @items, { - branchcode => $item->{branchcode}, - itype => $item->{itype}, - location => $item->{location}, - itemcallnumber => $item->{itemcallnumber}, + branchcode => $i_obj->get_column('homebranch'), + itype => $i_obj->effective_itemtype, + location => $i_obj->location, + itemcallnumber => $i_obj->itemcallnumber, }; } } } else { my $item_hash = { - itemtype => $biblioitem->itemtype, + itype => $biblioitem->itemtype, itemcallnumber => $biblioitem->cn_class, }; my $branch = $orderline->basketno->deliveryplace; -- 2.39.5