|
Lines 134-140
if ( $ordernumber eq '' and defined $params->{'breedingid'}){
Link Here
|
| 134 |
|
134 |
|
| 135 |
my $duplicatetitle; |
135 |
my $duplicatetitle; |
| 136 |
#look for duplicates |
136 |
#look for duplicates |
| 137 |
if (! (($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord))){ |
137 |
($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord); |
|
|
138 |
if($biblionumber && !$input->param('use_external_source')) { |
| 139 |
#if duplicate record found and user did not decide yet, first warn user |
| 140 |
#and let him choose between using new record or existing record |
| 141 |
Load_Duplicate($duplicatetitle); |
| 142 |
exit; |
| 143 |
} |
| 144 |
#from this point: add a new record |
| 138 |
if (C4::Context->preference("BiblioAddsAuthorities")){ |
145 |
if (C4::Context->preference("BiblioAddsAuthorities")){ |
| 139 |
my ($countlinked,$countcreated)=BiblioAddAuthorities($marcrecord, $params->{'frameworkcode'}); |
146 |
my ($countlinked,$countcreated)=BiblioAddAuthorities($marcrecord, $params->{'frameworkcode'}); |
| 140 |
} |
147 |
} |
|
Lines 163-169
if ( $ordernumber eq '' and defined $params->{'breedingid'}){
Link Here
|
| 163 |
} |
170 |
} |
| 164 |
} |
171 |
} |
| 165 |
SetImportRecordStatus($params->{'breedingid'}, 'imported'); |
172 |
SetImportRecordStatus($params->{'breedingid'}, 'imported'); |
| 166 |
} |
|
|
| 167 |
} |
173 |
} |
| 168 |
|
174 |
|
| 169 |
|
175 |
|
|
Lines 471-473
sub MARCfindbreeding {
Link Here
|
| 471 |
return -1; |
477 |
return -1; |
| 472 |
} |
478 |
} |
| 473 |
|
479 |
|
|
|
480 |
sub Load_Duplicate { |
| 481 |
my ($duplicatetitle)= @_; |
| 482 |
($template, $loggedinuser, $cookie) = get_template_and_user( |
| 483 |
{ |
| 484 |
template_name => "acqui/neworderempty_duplicate.tmpl", |
| 485 |
query => $input, |
| 486 |
type => "intranet", |
| 487 |
authnotrequired => 0, |
| 488 |
flagsrequired => { acquisition => 'order_manage' }, |
| 489 |
# debug => 1, |
| 490 |
} |
| 491 |
); |
| 492 |
|
| 493 |
$template->param( |
| 494 |
biblionumber => $biblionumber, |
| 495 |
basketno => $basketno, |
| 496 |
booksellerid => $basket->{'booksellerid'}, |
| 497 |
breedingid => $params->{'breedingid'}, |
| 498 |
duplicatetitle => $duplicatetitle, |
| 499 |
); |
| 500 |
|
| 501 |
output_html_with_http_headers $input, $cookie, $template->output; |
| 502 |
} |