Revision e286e6ca
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
381 | 381 |
$TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} }; |
382 | 382 |
|
383 | 383 |
# currencies and exchangerate |
384 |
my @values = map { $_ } @{ $form->{ALL_CURRENCIES} }; |
|
385 |
my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} }; |
|
386 | 384 |
$form->{currency} = $form->{defaultcurrency} unless $form->{currency}; |
387 | 385 |
$TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; |
388 |
$TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, |
|
389 |
'-values' => \@values, '-labels' => \%labels, |
|
390 |
'-onchange' => "document.getElementById('update_button').click();" |
|
391 |
)) if scalar @values; |
|
392 | 386 |
push @custom_hiddens, "forex"; |
393 | 387 |
push @custom_hiddens, "exchangerate" if $form->{forex}; |
394 | 388 |
|
... | ... | |
1497 | 1491 |
|
1498 | 1492 |
require "bin/mozilla/$form->{script}"; |
1499 | 1493 |
|
1500 |
map { $form->{"select$_"} = "" } ($form->{vc}, "currency"); |
|
1501 |
|
|
1502 | 1494 |
my $currency = $form->{currency}; |
1503 | 1495 |
&invoice_links; |
1504 | 1496 |
|
templates/webpages/oe/form_header.html | ||
---|---|---|
110 | 110 |
</td> |
111 | 111 |
</tr> |
112 | 112 |
[%- END %] |
113 |
[%- IF currencies %] |
|
114 | 113 |
<tr> |
115 | 114 |
<th align="right">[% 'Currency' | $T8 %]</th> |
116 |
<td>[% currencies %]</td>
|
|
115 |
<td>[% L.select_tag("currency", ALL_CURRENCIES, value_key="name", default=currency, onchange="document.getElementById('update_button').click();") %]</td>
|
|
117 | 116 |
</tr> |
118 |
[%- END %] |
|
119 | 117 |
[%- IF show_exchangerate %] |
120 | 118 |
<tr> |
121 | 119 |
<th align="right">[% 'Exchangerate' | $T8 %]</th> |
Auch abrufbar als: Unified diff
Angebote/Aufträge: Währungsauswahl via L.select_tag