Lines 128-133
use C4::Budgets qw( GetBudget GetBudgetSpent GetBudgetOrdered FieldsForCalcu
Link Here
|
128 |
use C4::Items qw( AddItemFromMarc ); |
128 |
use C4::Items qw( AddItemFromMarc ); |
129 |
use C4::Log qw( logaction ); |
129 |
use C4::Log qw( logaction ); |
130 |
use C4::Output qw( output_html_with_http_headers ); |
130 |
use C4::Output qw( output_html_with_http_headers ); |
|
|
131 |
use C4::Search qw( FindDuplicate ); |
131 |
use C4::Suggestions qw( ModSuggestion ); |
132 |
use C4::Suggestions qw( ModSuggestion ); |
132 |
use Koha::Acquisition::Baskets; |
133 |
use Koha::Acquisition::Baskets; |
133 |
use Koha::Acquisition::Currencies qw( get_active ); |
134 |
use Koha::Acquisition::Currencies qw( get_active ); |
Lines 147-152
my $op = $input->param('op') // q{};
Link Here
|
147 |
if ( $op eq 'cud-order' ) { |
148 |
if ( $op eq 'cud-order' ) { |
148 |
my $use_ACQ_framework = $input->param('use_ACQ_framework'); |
149 |
my $use_ACQ_framework = $input->param('use_ACQ_framework'); |
149 |
|
150 |
|
|
|
151 |
my $confirm_not_duplicate = $input->param('confirm_not_duplicate') || 0; |
152 |
|
150 |
# Check if order total amount exceed allowed budget |
153 |
# Check if order total amount exceed allowed budget |
151 |
my $confirm_budget_exceeding = $input->param('confirm_budget_exceeding'); |
154 |
my $confirm_budget_exceeding = $input->param('confirm_budget_exceeding'); |
152 |
unless ($confirm_budget_exceeding) { |
155 |
unless ($confirm_budget_exceeding) { |
Lines 328-333
if ( $op eq 'cud-order' ) {
Link Here
|
328 |
} |
331 |
} |
329 |
C4::Acquisition::FillWithDefaultValues($record); |
332 |
C4::Acquisition::FillWithDefaultValues($record); |
330 |
|
333 |
|
|
|
334 |
if ( !$confirm_not_duplicate ) { |
335 |
my ( $dupe_biblionumber, $dupe_title ) = FindDuplicate($record); |
336 |
|
337 |
if ($dupe_biblionumber) { |
338 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
339 |
{ |
340 |
template_name => "acqui/neworderempty_duplicate.tt", |
341 |
query => $input, |
342 |
type => "intranet", |
343 |
flagsrequired => { acquisition => 'order_manage' }, |
344 |
} |
345 |
); |
346 |
|
347 |
my $vars = $input->Vars; |
348 |
my @vars_loop; |
349 |
foreach ( keys %$vars ) { |
350 |
push @vars_loop, { name => $_, values => [ $input->multi_param($_) ] }; |
351 |
} |
352 |
|
353 |
my $booksellerid = $input->param('booksellerid') // ''; |
354 |
my $basketno = $input->param('basketno') // ''; |
355 |
|
356 |
$template->param( |
357 |
biblionumber => $dupe_biblionumber, |
358 |
duplicatetitle => $dupe_title, |
359 |
booksellerid => $booksellerid, |
360 |
basketno => $basketno, |
361 |
vars_loop => \@vars_loop, |
362 |
); |
363 |
|
364 |
output_html_with_http_headers $input, $cookie, $template->output; |
365 |
exit; |
366 |
} |
367 |
} |
368 |
|
331 |
# create the record in catalogue, with framework '' |
369 |
# create the record in catalogue, with framework '' |
332 |
my ( $biblionumber, $bibitemnum ) = AddBiblio( $record, '' ); |
370 |
my ( $biblionumber, $bibitemnum ) = AddBiblio( $record, '' ); |
333 |
|
371 |
|