|
Lines 160-166
if ($op eq ""){
Link Here
|
| 160 |
my @quantities = $input->param('quantity'); |
160 |
my @quantities = $input->param('quantity'); |
| 161 |
my @prices = $input->param('price'); |
161 |
my @prices = $input->param('price'); |
| 162 |
my @budgets_id = $input->param('budget_id'); |
162 |
my @budgets_id = $input->param('budget_id'); |
| 163 |
my @rrp = $input->param('rrp'); |
|
|
| 164 |
my @discount = $input->param('discount'); |
163 |
my @discount = $input->param('discount'); |
| 165 |
my @sort1 = $input->param('sort1'); |
164 |
my @sort1 = $input->param('sort1'); |
| 166 |
my @sort2 = $input->param('sort2'); |
165 |
my @sort2 = $input->param('sort2'); |
|
Lines 174-180
if ($op eq ""){
Link Here
|
| 174 |
my $biblionumber=$#$match > -1?$match->[0]->{'biblionumber'}:0; |
173 |
my $biblionumber=$#$match > -1?$match->[0]->{'biblionumber'}:0; |
| 175 |
my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1; |
174 |
my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1; |
| 176 |
my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id; |
175 |
my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id; |
| 177 |
my $c_rrp = shift( @rrp ); # rrp include tax |
|
|
| 178 |
my $c_discount = shift ( @discount); |
176 |
my $c_discount = shift ( @discount); |
| 179 |
$c_discount = $c_discount / 100 if $c_discount > 100; |
177 |
$c_discount = $c_discount / 100 if $c_discount > 100; |
| 180 |
my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || ''; |
178 |
my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || ''; |
|
Lines 405-415
sub import_biblios_list {
Link Here
|
| 405 |
); |
403 |
); |
| 406 |
my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} ); |
404 |
my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} ); |
| 407 |
my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information"; |
405 |
my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information"; |
| 408 |
my $infos = get_infos_syspref($marcrecord, ['price', 'quantity', 'budget_code', 'rrp', 'discount', 'sort1', 'sort2']); |
406 |
my $infos = get_infos_syspref($marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2']); |
| 409 |
my $price = $infos->{price}; |
407 |
my $price = $infos->{price}; |
| 410 |
my $quantity = $infos->{quantity}; |
408 |
my $quantity = $infos->{quantity}; |
| 411 |
my $budget_code = $infos->{budget_code}; |
409 |
my $budget_code = $infos->{budget_code}; |
| 412 |
my $rrp = $infos->{rrp}; |
|
|
| 413 |
my $discount = $infos->{discount}; |
410 |
my $discount = $infos->{discount}; |
| 414 |
my $sort1 = $infos->{sort1}; |
411 |
my $sort1 = $infos->{sort1}; |
| 415 |
my $sort2 = $infos->{sort2}; |
412 |
my $sort2 = $infos->{sort2}; |
|
Lines 423-429
sub import_biblios_list {
Link Here
|
| 423 |
$cellrecord{price} = $price || ''; |
420 |
$cellrecord{price} = $price || ''; |
| 424 |
$cellrecord{quantity} = $quantity || ''; |
421 |
$cellrecord{quantity} = $quantity || ''; |
| 425 |
$cellrecord{budget_id} = $budget_id || ''; |
422 |
$cellrecord{budget_id} = $budget_id || ''; |
| 426 |
$cellrecord{rrp} = $rrp || ''; |
|
|
| 427 |
$cellrecord{discount} = $discount || ''; |
423 |
$cellrecord{discount} = $discount || ''; |
| 428 |
$cellrecord{sort1} = $sort1 || ''; |
424 |
$cellrecord{sort1} = $sort1 || ''; |
| 429 |
$cellrecord{sort2} = $sort2 || ''; |
425 |
$cellrecord{sort2} = $sort2 || ''; |