Revision bce93dd4
Von Sven Schöling vor mehr als 3 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
42 | 42 |
use SL::DB::PurchaseInvoice; |
43 | 43 |
use SL::DB::Vendor; |
44 | 44 |
use List::MoreUtils qw(uniq); |
45 |
use SL::Presenter::Tag qw(select_tag); |
|
46 |
use DateTime; |
|
45 | 47 |
use List::Util qw(max sum); |
46 | 48 |
use List::UtilsBy qw(sort_by); |
47 | 49 |
|
... | ... | |
380 | 382 |
my $form = $main::form; |
381 | 383 |
my %myconfig = %main::myconfig; |
382 | 384 |
my $locale = $main::locale; |
383 |
my $cgi = $::request->{cgi}; |
|
384 | 385 |
|
385 | 386 |
my %TMPL_VAR = (); |
386 | 387 |
my @custom_hiddens; |
... | ... | |
417 | 418 |
]); |
418 | 419 |
|
419 | 420 |
# currencies and exchangerate |
420 |
my @values = map { $_ } @{ $form->{ALL_CURRENCIES} }; |
|
421 |
my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} }; |
|
422 | 421 |
$form->{currency} = $form->{defaultcurrency} unless $form->{currency}; |
423 | 422 |
# show_exchangerate is also later needed in another template |
424 | 423 |
$form->{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; |
425 |
$TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"},
|
|
426 |
'-values' => \@values, '-labels' => \%labels,
|
|
427 |
'-onchange' => "document.getElementById('update_button').click();"
|
|
428 |
)) if scalar @values;
|
|
424 |
$TMPL_VAR{currencies} = select_tag('currency', $form->{ALL_CURRENCIES},
|
|
425 |
id => 'currency', default => $form->{currency},
|
|
426 |
onchange => "document.getElementById('update_button').click();"
|
|
427 |
) if @{ $form->{ALL_CURRENCIES} // [] };
|
|
429 | 428 |
push @custom_hiddens, "forex"; |
430 | 429 |
push @custom_hiddens, "exchangerate" if $form->{forex}; |
431 | 430 |
|
Auch abrufbar als: Unified diff
CGI.pm nicht mehr als html Generator verwenden
Die restlichen Vorkommen sind jetzt noch
- header
- redirect
- cookie
und sind alle der Form: $::request->cgi->...