Lines 26-31
use CGI qw ( -utf8 );
Link Here
|
26 |
use YAML::XS; |
26 |
use YAML::XS; |
27 |
use List::MoreUtils; |
27 |
use List::MoreUtils; |
28 |
use Encode; |
28 |
use Encode; |
|
|
29 |
use Scalar::Util qw( looks_like_number ); |
29 |
|
30 |
|
30 |
use C4::Context; |
31 |
use C4::Context; |
31 |
use C4::Auth qw( get_template_and_user ); |
32 |
use C4::Auth qw( get_template_and_user ); |
Lines 168-176
if ($op eq ""){
Link Here
|
168 |
my $c_sort1 = $input->param( 'sort1_' . $import_record->import_record_id ) || $input->param('all_sort1') || ''; |
169 |
my $c_sort1 = $input->param( 'sort1_' . $import_record->import_record_id ) || $input->param('all_sort1') || ''; |
169 |
my $c_sort2 = $input->param( 'sort2_' . $import_record->import_record_id ) || $input->param('all_sort2') || ''; |
170 |
my $c_sort2 = $input->param( 'sort2_' . $import_record->import_record_id ) || $input->param('all_sort2') || ''; |
170 |
my $c_replacement_price = $input->param( 'replacementprice_' . $import_record->import_record_id ); |
171 |
my $c_replacement_price = $input->param( 'replacementprice_' . $import_record->import_record_id ); |
171 |
my $c_price = $input->param( 'price_' . $import_record->import_record_id ) |
172 |
my $c_price = $input->param( 'price_' . $import_record->import_record_id ); |
172 |
|| GetMarcPrice( $marcrecord, C4::Context->preference('marcflavour') ); |
|
|
173 |
|
174 |
# Insert the biblio, or find it through matcher |
173 |
# Insert the biblio, or find it through matcher |
175 |
if ( $biblionumber ) { # If matched during staging we can continue |
174 |
if ( $biblionumber ) { # If matched during staging we can continue |
176 |
$import_record->status('imported')->store; |
175 |
$import_record->status('imported')->store; |
Lines 501-507
sub import_biblios_list {
Link Here
|
501 |
my $marcrecord = $import_record->get_marc_record || die "couldn't translate marc information"; |
500 |
my $marcrecord = $import_record->get_marc_record || die "couldn't translate marc information"; |
502 |
|
501 |
|
503 |
my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2','replacementprice']); |
502 |
my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2','replacementprice']); |
504 |
my $price = $infos->{price}; |
503 |
my $price = looks_like_number($infos->{price}) ? $infos->{price} : GetMarcPrice( $marcrecord, C4::Context->preference('marcflavour') ); |
505 |
my $replacementprice = $infos->{replacementprice}; |
504 |
my $replacementprice = $infos->{replacementprice}; |
506 |
my $quantity = $infos->{quantity}; |
505 |
my $quantity = $infos->{quantity}; |
507 |
my $budget_code = $infos->{budget_code}; |
506 |
my $budget_code = $infos->{budget_code}; |
508 |
- |
|
|