Bugzilla – Attachment 174369 Details for
Bug 34355
Automated MARC record ordering process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34355: Add a plugin hook - before_orderline_create
Bug-34355-Add-a-plugin-hook---beforeorderlinecreat.patch (text/plain), 2.01 KB, created by
Matt Blenkinsop
on 2024-11-11 15:24:17 UTC
(
hide
)
Description:
Bug 34355: Add a plugin hook - before_orderline_create
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-11-11 15:24:17 UTC
Size:
2.01 KB
patch
obsolete
>From 8a8eb7f5433eafc886d7a570c59bb250948469f6 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 > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/MarcOrder.pm | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm >index be8f9073196..8faa0492df1 100644 >--- a/Koha/MarcOrder.pm >+++ b/Koha/MarcOrder.pm >@@ -60,6 +60,7 @@ use Koha::Import::Records; > use Koha::Acquisition::Currencies; > use Koha::Acquisition::Booksellers; > use Koha::Acquisition::Baskets; >+use Koha::Plugins; > > =head1 NAME > >@@ -1105,6 +1106,14 @@ sub create_items_and_generate_order_hash { > > # Remove uncertainprice flag if we have found a price in the MARC record > $orderinfo{uncertainprice} = 0 if $orderinfo{listprice}; >+ Koha::Plugins->call( >+ 'before_orderline_create', >+ { >+ marcrecord => $fields->{marcrecord}, >+ orderline => \%orderinfo, >+ marcfields => $fields >+ } >+ ); > > my $order = Koha::Acquisition::Order->new( \%orderinfo ); > $order->populate_with_prices_for_ordering(); >@@ -1152,6 +1161,14 @@ sub create_items_and_generate_order_hash { > > # Remove uncertainprice flag if we have found a price in the MARC record > $orderinfo{uncertainprice} = 0 if $orderinfo{listprice}; >+ Koha::Plugins->call( >+ 'before_orderline_create', >+ { >+ marcrecord => $fields->{marcrecord}, >+ orderline => \%orderinfo, >+ marcfields => $fields >+ } >+ ); > > my $order = Koha::Acquisition::Order->new( \%orderinfo ); > $order->populate_with_prices_for_ordering(); >-- >2.39.3 (Apple Git-146)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34355
:
154705
|
154706
|
154707
|
154708
|
154709
|
154710
|
157092
|
157093
|
157094
|
157095
|
157096
|
157097
|
157098
|
157099
|
157100
|
160858
|
160859
|
160860
|
160861
|
160862
|
160863
|
160864
|
160865
|
160866
|
160867
|
160868
|
160869
|
160870
|
160871
|
160872
|
160873
|
160874
|
160875
|
169896
|
169897
|
169898
|
169899
|
169900
|
169901
|
169902
|
169903
|
169904
|
170395
|
170401
|
170402
|
170403
|
170404
|
170405
|
170406
|
170407
|
170408
|
170409
|
173054
|
173055
|
173056
|
173057
|
173058
|
173059
|
173060
|
173061
|
173062
|
173063
|
173064
|
173065
|
173066
|
173709
|
173805
|
173806
|
173809
|
173824
|
173825
|
173993
|
173994
|
173995
|
173996
|
173997
|
173998
|
173999
|
174000
|
174001
|
174002
|
174003
|
174004
|
174005
|
174006
|
174007
|
174008
|
174009
|
174010
|
174362
|
174363
|
174364
|
174365
|
174366
|
174367
|
174368
| 174369 |
174370
|
174371
|
174372
|
174373
|
174374
|
174375
|
174376
|
174377
|
174378
|
174379
|
174380
|
174382
|
174383