From 079b5e0efdb002261a081906c9de46660fa4ecb3 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Wed, 21 Oct 2009 16:13:11 +0200 Subject: [PATCH] MT 2069 : MoveItemFromBiblio now checks for orders --- C4/Items.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/C4/Items.pm b/C4/Items.pm index a060c36ae9..61126d9588 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -30,6 +30,7 @@ use C4::Log; use C4::Branch; require C4::Reserves; use C4::Charset; +use C4::Acquisition; use vars qw($VERSION @ISA @EXPORT); @@ -2060,6 +2061,14 @@ sub MoveItemFromBiblio { # If we found an item (should always true, except in case of database-marcxml inconsistency) if ($item) { + # Checking if the item we want to move is in an order + my $order = GetOrderFromItemnumber($itemnumber); + if ($order) { + # Replacing the biblionumber within the order if necessary + $order->{'biblionumber'} = $tobiblio; + ModOrder($order); + } + # Saving the modification ModBiblioMarc($record, $frombiblio, $frameworkcode); -- 2.39.5