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} |