|
Lines 307-319
$template->param( "statusselected_$$suggestion_ref{'STATUS'}" =>1);
Link Here
|
| 307 |
# get currencies and rates |
307 |
# get currencies and rates |
| 308 |
my @rates = GetCurrencies(); |
308 |
my @rates = GetCurrencies(); |
| 309 |
my $count = scalar @rates; |
309 |
my $count = scalar @rates; |
|
|
310 |
my $active_currency = GetCurrency(); |
| 311 |
my $selected_currency; |
| 312 |
if ($$suggestion_ref{'currency'}) { |
| 313 |
$selected_currency = $$suggestion_ref{'currency'}; |
| 314 |
} |
| 315 |
else { |
| 316 |
$selected_currency = $active_currency->{currency}; |
| 317 |
} |
| 310 |
|
318 |
|
| 311 |
my @loop_currency = (); |
319 |
my @loop_currency = (); |
| 312 |
for ( my $i = 0 ; $i < $count ; $i++ ) { |
320 |
for ( my $i = 0 ; $i < $count ; $i++ ) { |
| 313 |
my %line; |
321 |
my %line; |
| 314 |
$line{currcode} = $rates[$i]->{'currency'}; |
322 |
$line{currcode} = $rates[$i]->{'currency'}; |
| 315 |
$line{rate} = $rates[$i]->{'rate'}; |
323 |
$line{rate} = $rates[$i]->{'rate'}; |
| 316 |
$line{selected} = 1 if ($$suggestion_ref{'currency'} && $line{'currcode'} eq $$suggestion_ref{'currency'}); |
324 |
$line{selected} = 1 if ($line{'currcode'} eq $selected_currency); |
| 317 |
push @loop_currency, \%line; |
325 |
push @loop_currency, \%line; |
| 318 |
} |
326 |
} |
| 319 |
|
327 |
|
| 320 |
- |
|
|