View | Details | Raw Unified | Return to bug 27063
Collapse All | Expand All

(-)a/acqui/neworderempty.pl (-2 / +3 lines)
Lines 147-159 my $bookseller = Koha::Acquisition::Booksellers->find($booksellerid); Link Here
147
$data = GetOrder($ordernumber) if $ordernumber;
147
$data = GetOrder($ordernumber) if $ordernumber;
148
148
149
my $newdata;
149
my $newdata;
150
my $relink = $input->param("relink");
150
151
151
# re-linking order to a different record
152
# re-linking order to a different record
152
if ( $biblionumber and $biblionumber != $data->{biblionumber} ) {
153
if ( $biblionumber and $biblionumber != $data->{biblionumber} ) {
153
    $newdata = GetBiblioData($biblionumber);
154
    $newdata = GetBiblioData($biblionumber);
154
} elsif ( $suggestionid and $ordernumber ) {
155
} elsif ( $suggestionid and $ordernumber ) {
155
    $newdata = GetSuggestion($suggestionid);
156
    $newdata = GetSuggestion($suggestionid);
156
} elsif ( $ordernumber and $input->param('relink') ) {
157
} elsif ( $ordernumber and $relink ) {
157
    $newdata = {};
158
    $newdata = {};
158
}
159
}
159
if ($newdata) {
160
if ($newdata) {
Lines 179-185 $template->param( Link Here
179
    name         => $bookseller->name,
180
    name         => $bookseller->name,
180
);
181
);
181
output_and_exit( $input, $cookie, $template, 'order_cannot_be_edited' )
182
output_and_exit( $input, $cookie, $template, 'order_cannot_be_edited' )
182
    if $ordernumber and ( $basketobj->closedate || $data->{orderstatus} eq "complete" );
183
    if $ordernumber and undef($relink) and ( $basketobj->closedate || $data->{orderstatus} eq "complete" );
183
184
184
my $contract = GetContract({
185
my $contract = GetContract({
185
    contractnumber => $basket->{contractnumber}
186
    contractnumber => $basket->{contractnumber}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-3 / +1 lines)
Lines 719-730 Link Here
719
                                                        </td>
719
                                                        </td>
720
                                                        [% IF ( active && !closedate ) %]
720
                                                        [% IF ( active && !closedate ) %]
721
                                                            <td>
721
                                                            <td>
722
                                                                <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>
722
                                                                [% UNLESS (books_loo.order_received) %]
723
                                                                [% UNLESS (books_loo.order_received) %]
723
                                                                    <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
724
                                                                    <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Modify</a>
724
                                                                    <br />
725
                                                                    <br />
725
                                                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
726
                                                                    <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
726
                                                                    <br>
727
                                                                    <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>
728
                                                                [% END %]
727
                                                                [% END %]
729
                                                            </td>
728
                                                            </td>
730
                                                        [% END %]
729
                                                        [% END %]
731
- 

Return to bug 27063