Lines 87-94
if ($op eq ""){
Link Here
|
87 |
# |
87 |
# |
88 |
} elsif ($op eq "batch_details"){ |
88 |
} elsif ($op eq "batch_details"){ |
89 |
#display lines inside the selected batch |
89 |
#display lines inside the selected batch |
|
|
90 |
# get currencies (for change rates calcs if needed) |
91 |
my $active_currency = GetCurrency(); |
92 |
my $default_currency; |
93 |
if (! $data->{currency} ) { # New order no currency set |
94 |
if ( $bookseller->{listprice} ) { |
95 |
$default_currency = $bookseller->{listprice}; |
96 |
} |
97 |
else { |
98 |
$default_currency = $active_currency->{currency}; |
99 |
} |
100 |
} |
101 |
my @rates = GetCurrencies(); |
102 |
|
103 |
# ## @rates |
104 |
|
105 |
my @loop_currency = (); |
106 |
for my $curr ( @rates ) { |
107 |
my $selected; |
108 |
if ($data->{currency} ) { |
109 |
$selected = $curr->{currency} eq $data->{currency}; |
110 |
} |
111 |
else { |
112 |
$selected = $curr->{currency} eq $default_currency; |
113 |
} |
114 |
push @loop_currency, { |
115 |
currcode => $curr->{currency}, |
116 |
rate => $curr->{rate}, |
117 |
selected => $selected, |
118 |
} |
119 |
} |
120 |
|
90 |
$template->param("batch_details" => 1, |
121 |
$template->param("batch_details" => 1, |
91 |
"basketno" => $cgiparams->{'basketno'}); |
122 |
"basketno" => $cgiparams->{'basketno'}, |
|
|
123 |
loop_currencies => \@loop_currency, |
124 |
); |
92 |
import_biblios_list($template, $cgiparams->{'import_batch_id'}); |
125 |
import_biblios_list($template, $cgiparams->{'import_batch_id'}); |
93 |
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber ) { |
126 |
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber ) { |
94 |
# prepare empty item form |
127 |
# prepare empty item form |
Lines 166-171
if ($op eq ""){
Link Here
|
166 |
"budget_id", $budget_id, "uncertainprice", 1, |
199 |
"budget_id", $budget_id, "uncertainprice", 1, |
167 |
"sort1", $cgiparams->{'sort1'},"sort2", $cgiparams->{'sort2'}, |
200 |
"sort1", $cgiparams->{'sort1'},"sort2", $cgiparams->{'sort2'}, |
168 |
"notes", $cgiparams->{'notes'}, "budget_id", $cgiparams->{'budget_id'}, |
201 |
"notes", $cgiparams->{'notes'}, "budget_id", $cgiparams->{'budget_id'}, |
|
|
202 |
"currency",$cgiparams->{'currency'}, |
169 |
); |
203 |
); |
170 |
# get the price if there is one. |
204 |
# get the price if there is one. |
171 |
# filter by storing only the 1st number |
205 |
# filter by storing only the 1st number |