Bugzilla – Attachment 159535 Details for
Bug 27595
Place holds for patrons on accepted purchase suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27595: Place holds when ordering from a suggestion
Bug-27595-Place-holds-when-ordering-from-a-suggest.patch (text/plain), 1.56 KB, created by
ByWater Sandboxes
on 2023-12-04 16:40:53 UTC
(
hide
)
Description:
Bug 27595: Place holds when ordering from a suggestion
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-12-04 16:40:53 UTC
Size:
1.56 KB
patch
obsolete
>From 78f5e3244e6315de8b1bfec6a3dd2a450481984c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 4 Dec 2023 14:05:43 +0000 >Subject: [PATCH] Bug 27595: Place holds when ordering from a suggestion > >This patch updates the ordering code to place a hold when adding to a basket from a >suggestion if the new preference PlaceHoldsOnOrdersFromSuggestions is enabled. > >To test: >1 - Apply all patches >2 - updatedatabase >3 - See new system preference PlaceHoldsOnOrdersFromSuggestions >4 - Create a new purchase suggestion, mark it accepted >5 - Go to acquisitions, find a vendor, find a basket, 'Add to basket' -> 'From a suggestion' >6 - Complete order, confirm no hold was placed >7 - Enable the new system preference >8 - Repeast 4-6 >9 - Confirm a hold was placed > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > acqui/addorder.pl | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index c5b9847b01..7142d25046 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -338,6 +338,12 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > STATUS => 'ORDERED', > } > ); >+ if ( C4::Context->preference('PlaceHoldsOnOrdersFromSuggestions') ) { >+ my $suggestion = Koha::Suggestions->find($suggestionid); >+ if ($suggestion) { >+ $suggestion->place_hold(); >+ } >+ } > } > > $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; >-- >2.30.2
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 27595
:
159524
|
159525
|
159526
|
159533
|
159534
|
159535
|
159537
|
159538
|
159539
|
159540
|
159541
|
159542
|
159786
|
159787
|
159788
|
163331
|
163332
|
163333