Bug 35398: Fix LRP support for EDI orders with single items
This patch corrects a mistake in the original implementaiton of bug 20595 where we introduced support for the LRP segments being used to automatically assign items ordered via EDI to stock rotation plans. Signed-off-by: Sophie Halden <sophie.halden@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
de79e957ce
commit
783a58a9d3
1 changed files with 16 additions and 0 deletions
16
Koha/EDI.pm
16
Koha/EDI.pm
|
@ -829,6 +829,22 @@ sub quote_item {
|
|||
}
|
||||
);
|
||||
++$created;
|
||||
|
||||
my $lrp =
|
||||
$item->girfield( 'library_rotation_plan' );
|
||||
if ($lrp) {
|
||||
my $rota =
|
||||
Koha::StockRotationRotas->find( { title => $lrp },
|
||||
{ key => 'stockrotationrotas_title' } );
|
||||
if ($rota) {
|
||||
$rota->add_item($itemnumber);
|
||||
$logger->trace("Item added to rota $rota->id");
|
||||
}
|
||||
else {
|
||||
$logger->error(
|
||||
"No rota found matching $lrp in orderline");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue