From 151156ac8fb17f3682ce7fd288fc107478c935d2 Mon Sep 17 00:00:00 2001
From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Date: Tue, 12 Sep 2023 11:48:32 +0000
Subject: [PATCH] Bug 34355: Add a plugin hook - before_orderline_create
---
Koha/MarcOrder.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm
index 0d3a1e262d..fc7574c6d3 100644
--- a/Koha/MarcOrder.pm
+++ b/Koha/MarcOrder.pm
@@ -54,6 +54,7 @@ use Koha::Import::Records;
use Koha::Acquisition::Currencies;
use Koha::Acquisition::Booksellers;
use Koha::Acquisition::Baskets;
+use Koha::Plugins;
=head1 NAME
@@ -691,7 +692,16 @@ sub add_items_from_import_record {
}
$order_detail_hash{uncertainprice} = 0 if $order_detail_hash{listprice};
+ Koha::Plugins->call(
+ 'before_orderline_create',
+ {
+ marcrecord => $marcrecord,
+ orderline => \%order_detail_hash,
+ marcfields => $marc_fields_to_order
+ }
+ );
push @order_line_details, \%order_detail_hash;
+
}
}
--
2.37.1 (Apple Git-137.1)