Revision e286e6ca
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
$TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} };
|
||
|
||
# currencies and exchangerate
|
||
my @values = map { $_ } @{ $form->{ALL_CURRENCIES} };
|
||
my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} };
|
||
$form->{currency} = $form->{defaultcurrency} unless $form->{currency};
|
||
$TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency};
|
||
$TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"},
|
||
'-values' => \@values, '-labels' => \%labels,
|
||
'-onchange' => "document.getElementById('update_button').click();"
|
||
)) if scalar @values;
|
||
push @custom_hiddens, "forex";
|
||
push @custom_hiddens, "exchangerate" if $form->{forex};
|
||
|
||
... | ... | |
|
||
require "bin/mozilla/$form->{script}";
|
||
|
||
map { $form->{"select$_"} = "" } ($form->{vc}, "currency");
|
||
|
||
my $currency = $form->{currency};
|
||
&invoice_links;
|
||
|
templates/webpages/oe/form_header.html | ||
---|---|---|
</td>
|
||
</tr>
|
||
[%- END %]
|
||
[%- IF currencies %]
|
||
<tr>
|
||
<th align="right">[% 'Currency' | $T8 %]</th>
|
||
<td>[% currencies %]</td>
|
||
<td>[% L.select_tag("currency", ALL_CURRENCIES, value_key="name", default=currency, onchange="document.getElementById('update_button').click();") %]</td>
|
||
</tr>
|
||
[%- END %]
|
||
[%- IF show_exchangerate %]
|
||
<tr>
|
||
<th align="right">[% 'Exchangerate' | $T8 %]</th>
|
Auch abrufbar als: Unified diff
Angebote/Aufträge: Währungsauswahl via L.select_tag