Bugzilla – Attachment 183335 Details for
Bug 31632
Add ability to manually link orders to suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31632: Link a suggestion to an existing order
Bug-31632-Link-a-suggestion-to-an-existing-order.patch (text/plain), 6.51 KB, created by
Emily Lamancusa (emlam)
on 2025-06-18 14:52:04 UTC
(
hide
)
Description:
Bug 31632: Link a suggestion to an existing order
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-06-18 14:52:04 UTC
Size:
6.51 KB
patch
obsolete
>From fe73e89fbf6ff7c043794ff362e0b82744c0ac39 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 23 Jul 2024 02:50:29 +0000 >Subject: [PATCH] Bug 31632: Link a suggestion to an existing order > >This enhancement allows library staff to link an order (in an unclosed basket, or a standing order) to an accepted suggestion. > >To test: > >1) In the staff interface, go to Suggestions and create at least two suggestions. >2) Mark at least two suggestions as Accepted. >3) Go to Acquisitions, create a vendor if you don't have one already. >4) Have or create two baskets - one should be standing, and one not standing (normal). >5) In the normal basket (not standing), add an order from any source but NOT from a suggestion. >6) When you save the order, there should be a new link in the Modify column of the Orders table - "Search for suggestion to link". Click this. >7) Choose one of your suggestions to link to the order. >8) You should be redirected back to the basket. Confirm your order has been correctly linked to the suggestion. Confirm there is no link to "Search for suggestion to link" for this order now that a suggestion has already been linked. >9) Add another order to this basket from any source but NOT from a suggestion. >10) Close the basket. Confirm there is no link to "Search for suggestion to link" because the basket is closed, but you could reopen the basket to link the order if you wanted to. >11) Go to Baskets in the left navigation so you can find your standing basket. >12) Add an order to your standing basket from any source but NOT from a suggestion. >13) Go to the vendor and Receive shipments. Receive your standing order and finish receiving. >14) Go to the standing basket. There should be a new unreceived standing order for the record you just received, with a link to "Search for suggestion to link". Click this. >15) Choose a suggestion to link to the order. >16) You should be redirected back to the basket. Confirm your orders for this record have been correctly linked to the suggestion. > >Sponsored-by: Pymble Ladies' College >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > acqui/newordersuggestion.pl | 9 +++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 4 ++++ > .../prog/en/modules/acqui/newordersuggestion.tt | 4 +++- > 3 files changed, 16 insertions(+), 1 deletion(-) > >diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl >index e41381f4f4..33fb3fc8d9 100755 >--- a/acqui/newordersuggestion.pl >+++ b/acqui/newordersuggestion.pl >@@ -111,6 +111,7 @@ my $op = $input->param('op'); > my $suggestionid = $input->param('suggestionid'); > my $duplicateNumber = $input->param('duplicateNumber'); > my $uncertainprice = $input->param('uncertainprice'); >+my $link_order = $input->param('link_order'); > > $op = 'else' unless $op; > >@@ -128,6 +129,13 @@ if ( $op eq 'connectDuplicate' ) { > ConnectSuggestionAndBiblio( $suggestionid, $duplicateNumber ); > } > >+if ( $op eq 'link_order' and $link_order ) { >+ my $order = Koha::Acquisition::Orders->find($link_order); >+ my $suggestion = Koha::Suggestions->find($suggestionid); >+ $suggestion->update( { biblionumber => $order->biblionumber } ) if $order->biblionumber; >+ print $input->redirect( "/cgi-bin/koha/acqui/basket.pl?basketno=" . $basketno ); >+} >+ > my $suggestions = [ > Koha::Suggestions->search_limited( > { >@@ -147,6 +155,7 @@ $template->param( > booksellerid => $booksellerid, > name => $vendor->name, > "op_$op" => 1, >+ link_order => $link_order, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 49c9d98fd3..70dc2f9063 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -812,6 +812,10 @@ > <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Modify</a> > <br /> > <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a> >+ <br /> >+ [% END %] >+ [% UNLESS ( books_loo.suggestionid ) %] >+ <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&link_order=[% books_loo.ordernumber | uri %]">Search for suggestion to link</a> > [% END %] > </td> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt >index 613b56588b..6d2da78124 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt >@@ -89,7 +89,9 @@ > </td> > <td> [% suggestion.total | $Price %] </td> > <td class="actions"> >- [% IF ( suggestion.biblionumber ) %] >+ [% IF link_order %] >+ <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?op=link_order&link_order=[% link_order | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Link suggestion') | html %]</a> >+ [% ELSIF ( suggestion.biblionumber ) %] > <a > href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&suggestionid=[% suggestion.suggestionid | uri %]&biblio=[% suggestion.biblionumber | uri %]" > class="btn btn-default btn-xs" >-- >2.39.5
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 31632
:
141028
|
141029
|
141030
|
169391
|
170147
|
170148
|
170953
|
174393
|
174394
|
174395
|
174415
|
174416
|
174417
|
175620
|
175621
|
175622
|
175623
|
175624
|
176281
|
176282
|
179957
|
179958
|
179959
|
179960
|
179961
|
179962
|
183335
|
183336
|
183337
|
183338
|
183339
|
183480
|
183481
|
183482
|
183483
|
183484