Bugzilla – Attachment 160582 Details for
Bug 35717
Link suggestions to orders by adding ordernumber to suggestions table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35717: Adjust other calls
Bug-35717-Adjust-other-calls.patch (text/plain), 2.49 KB, created by
Nick Clemens (kidclamp)
on 2024-01-05 18:57:12 UTC
(
hide
)
Description:
Bug 35717: Adjust other calls
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-01-05 18:57:12 UTC
Size:
2.49 KB
patch
obsolete
>From fe8660751aa0272fa7b48784ad7c0e6178dcdab3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Nov 2023 14:56:06 +0100 >Subject: [PATCH] Bug 35717: Adjust other calls > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/EDI.pm | 13 +++++-------- > acqui/addorder.pl | 11 ----------- > 2 files changed, 5 insertions(+), 19 deletions(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index ceb9a2ccd41..0cacb45e6a5 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -45,6 +45,7 @@ use Koha::Plugins; # Adds plugin dirs to @INC > use Koha::Plugins::Handler; > use Koha::Acquisition::Baskets; > use Koha::Acquisition::Booksellers; >+use Koha::Acquisition::Orders; > > our $VERSION = 1.1; > >@@ -330,16 +331,12 @@ sub process_invoice { > # ModReceiveOrder does not validate that $ordernumber exists validate here > if ($order) { > >- # check suggestions >- my $s = $schema->resultset('Suggestion')->search( >- { >- biblionumber => $order->biblionumber->biblionumber, >- } >- )->single; >- if ($s) { >+ my $order_koha_object = Koha::Acquisition::Orders->find($ordernumber); >+ my $suggestions = $order_koha_object->suggestions; >+ while ( my $suggestion = $suggestions->next ) { > ModSuggestion( > { >- suggestionid => $s->suggestionid, >+ suggestionid => $suggestion->id, > STATUS => 'AVAILABLE', > } > ); >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index f8d4f9e0b20..5ffe3d8cc52 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -329,17 +329,6 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > $orderinfo->{biblionumber}=$biblionumber; > } > >- # change suggestion status if applicable >- if ( my $suggestionid = $input->param('suggestionid') ) { >- ModSuggestion( >- { >- suggestionid => $suggestionid, >- biblionumber => $orderinfo->{biblionumber}, >- STATUS => 'ORDERED', >- } >- ); >- } >- > $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; > > my $order; >-- >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 35717
:
160576
|
160577
|
160578
|
160579
|
160580
|
160581
|
160582
|
160583
|
164834
|
164835
|
164836
|
164837
|
164838
|
164839
|
164840
|
172871
|
172872
|
172873
|
172874
|
172875
|
172876
|
172877
|
172878
|
172899
|
172900
|
172901