From: Thomas Kasulke Date: Fri, 27 Apr 2007 10:46:17 +0000 (+0000) Subject: Währungs-popup auf cgi umgestellt X-Git-Tag: release-2.4.3^2~428 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=83d48a07af73da318458780e40814cf89579cb94;p=kivitendo-erp.git Währungs-popup auf cgi umgestellt --- diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index f3d02605f..faaa3cc64 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -120,11 +120,6 @@ sub invoice_links { $form->{taxzone_id} = $taxzone_id; } - # currencies - @curr = split(/:/, $form->{currencies}); - chomp $curr[0]; - $form->{defaultcurrency} = $curr[0]; - map { $form->{selectcurrency} .= "\n" } @curr; - $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; if (@{ $form->{all_customer} }) { @@ -344,7 +337,8 @@ sub form_header { "all" => 0, "old_id" => \@old_project_ids }, "employees" => "ALL_SALESMEN", - "taxzones" => "ALL_TAXZONES"); + "taxzones" => "ALL_TAXZONES", + "currencies" => "ALL_CURRENCIES"); my %labels; my @values = (undef); @@ -372,6 +366,23 @@ sub form_header { '-labels' => \%labels, '-default' => $form->{"shipto_id"})) . qq||; + %labels = (); + @values = (); + foreach my $item (@{ $form->{"ALL_CURRENCIES"} }) { + push(@values, $item->{"currency"}); + $labels{$item->{"currency"}} = $item->{"currency"}; + } + + $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; + my $currencies = qq| + + | . $locale->text('Currency') . qq| + | . + NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, + '-values' => \@values, '-labels' => \%labels)) . qq| + + |; + %labels = (); @values = (""); foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { @@ -676,10 +687,7 @@ print qq| $taxzone $department - | . $locale->text('Currency') . qq| - - - + $currencies $exchangerate diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index e076691a1..bdb6946cb 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -254,14 +254,6 @@ sub order_links { (@{ $form->{"all_$form->{vc}"} }); } - # currencies - @curr = split(/:/, $form->{currencies}); - chomp $curr[0]; - $form->{defaultcurrency} = $curr[0]; - $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; - - map { $form->{selectcurrency} .= "\n" } @curr; - $form->{taxincluded} = $taxincluded if ($form->{id}); # departments @@ -361,12 +353,12 @@ sub form_header { # with JavaScript Calendar $button1 = qq| - {transdate} onBlur=\"check_right_date_format(this)\"> + text('button') . qq|> |; $button2 = qq| - {reqdate} onBlur=\"check_right_date_format(this)\"> + text('button') . qq|> |; @@ -380,9 +372,9 @@ sub form_header { # without JavaScript Calendar $button1 = qq| - {transdate} onBlur=\"check_right_date_format(this)\">|; + |; $button2 = qq| - {reqdate} onBlur=\"check_right_date_format(this)\">|; + |; } my @tmp; @@ -432,7 +424,8 @@ sub form_header { "all" => 0, "old_id" => \@old_project_ids }, "employees" => "ALL_SALESMEN", - "taxzones" => "ALL_TAXZONES"); + "taxzones" => "ALL_TAXZONES", + "currencies" => "ALL_CURRENCIES"); my %labels; my @values = (undef); @@ -507,6 +500,24 @@ sub form_header { |; + %labels = (); + @values = (); + foreach my $item (@{ $form->{"ALL_CURRENCIES"} }) { + push(@values, $item->{"currency"}); + $labels{$item->{"currency"}} = $item->{"currency"}; + } + + $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; + my $currencies = qq| + + | . $locale->text('Currency') . qq| + | . + NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, + '-values' => \@values, '-labels' => \%labels)) . qq| + + |; + + $form->{exchangerate} = $form->format_amount(\%myconfig, $form->{exchangerate}); @@ -792,10 +803,7 @@ onchange="document.getElementById('update_button').click();">| . $taxzone $department - | . $locale->text('Currency') . qq| - - - {defaultcurrency}> + $currencies $exchangerate