Bugzilla – Attachment 170694 Details for
Bug 27063
Allow changing which record an order is linked to
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27063: Allow received orders to also be relinked
Bug-27063-Allow-received-orders-to-also-be-relinke.patch (text/plain), 3.87 KB, created by
Aleisha Amohia
on 2024-08-26 03:52:21 UTC
(
hide
)
Description:
Bug 27063: Allow received orders to also be relinked
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-08-26 03:52:21 UTC
Size:
3.87 KB
patch
obsolete
>From 4f96dc69b6b49561438733f6c07b2cfba8db63d2 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sat, 6 Jul 2024 02:04:17 +0000 >Subject: [PATCH] Bug 27063: Allow received orders to also be relinked > >Useful for when the bibliographic records of received orders have been deleted, but we want to keep the ordernumber history/invoice data etc. > >To test: > >1. Add an order to a standing basket >2. Receive the order >3. Once received, delete the record attached to the order >4. Go back to the basket >5. Attempt to relink the order with the deleted record >6. This should work > >Sponsored-by: Auckland University of Technology >--- > acqui/neworderempty.pl | 5 +++-- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 3 +-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 4d7d30abcfb..9c93addacca 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -147,13 +147,14 @@ my $bookseller = Koha::Acquisition::Booksellers->find($booksellerid); > $data = GetOrder($ordernumber) if $ordernumber; > > my $newdata; >+my $relink = $input->param("relink"); > > # re-linking order to a different record > if ( $biblionumber and $biblionumber != $data->{biblionumber} ) { > $newdata = GetBiblioData($biblionumber); > } elsif ( $suggestionid and $ordernumber ) { > $newdata = GetSuggestion($suggestionid); >-} elsif ( $ordernumber and $input->param('relink') ) { >+} elsif ( $ordernumber and $relink ) { > $newdata = {}; > } > if ($newdata) { >@@ -179,7 +180,7 @@ $template->param( > name => $bookseller->name, > ); > output_and_exit( $input, $cookie, $template, 'order_cannot_be_edited' ) >- if $ordernumber and ( $basketobj->closedate || $data->{orderstatus} eq "complete" ); >+ if $ordernumber and undef($relink) and ( $basketobj->closedate || $data->{orderstatus} eq "complete" ); > > my $contract = GetContract({ > contractnumber => $basket->{contractnumber} >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 a9c100a4c09..e674b273dda 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -719,12 +719,11 @@ > </td> > [% IF ( active && !closedate ) %] > <td> >+ <a href="#relinkOrder" role="button" class="relink_order" data-toggle="modal" data-ordernumber="[% books_loo.ordernumber | html %]" data-basketname="[% basket.basketname | html %]">Link to different record</a> > [% UNLESS (books_loo.order_received) %] > <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> >- <a href="#relinkOrder" role="button" class="relink_order" data-toggle="modal" data-ordernumber="[% books_loo.ordernumber | html %]" data-basketname="[% basket.basketname | html %]">Link to different record</a> > [% END %] > </td> > [% END %] >-- >2.39.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 27063
:
167619
|
167678
|
167679
|
167783
|
167784
|
167818
|
167819
|
168049
|
168050
|
168571
|
168572
|
170123
|
170166
|
170487
|
170488
|
170692
|
170693
| 170694 |
170695
|
170696
|
174648
|
174649