X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fir.pl;h=e5b698db83cfb9b08f0fff5336e10ce0a6487736;hb=e9e216f571e214e1d19c43a2b47f04525f4aaddf;hp=e088def44288c74aa448bd4b70290043b49b3c8f;hpb=5ceaf343f897027dff7edcde6315824b8dc64db7;p=kivitendo-erp.git
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index e088def44..e5b698db8 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.pl
@@ -32,11 +32,12 @@
#======================================================================
use SL::IR;
+use SL::IS;
use SL::PE;
-require "$form->{path}/io.pl";
-require "$form->{path}/arap.pl";
-require "$form->{path}/common.pl";
+require "bin/mozilla/io.pl";
+require "bin/mozilla/arap.pl";
+require "bin/mozilla/common.pl";
require "bin/mozilla/drafts.pl";
1;
@@ -119,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} .= "";
- } else {
- $form->{selecttaxzone} .=
- "";
- }
-
- }
- } else {
- $form->{selecttaxzone} =~ s/ selected//g;
- if ($form->{taxzone_id} ne "") {
- $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/;
- }
+
+ %labels = ();
+ @values = ();
+ my $i = 0;
+ foreach my $item (@{ $form->{"ALL_CURRENCIES"} }) {
+ push(@values, $item);
+ $labels{$item} = $item;
}
+
+ $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 = ();
+ my $i = 0;
+ foreach my $item (@{ $form->{"ALL_SALESMEN"} }) {
+ push(@values, $item->{"id"});
+ $labels{$item->{"id"}} = $item->{"name"};
+ }
+ my $employees = qq|
+
+ | . $locale->text('Employee') . qq| |
+ | .
+ NTI($cgi->popup_menu('-name' => 'employee_id', '-default' => $form->{"employee_id"},
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ |
+
|;
+
+ %labels = ();
+ @values = ();
+ my $i = 0;
+ foreach my $item (@{ $form->{"ALL_VENDORS"} }) {
+ push(@values, $item->{name}.qq|--|.$item->{"id"});
+ $labels{$item->{"id"}} = $item->{"name"}.qq|--|.$item->{"id"};
+ }
+ my $vendors = qq|
+ | . $locale->text('Vendor') . qq| |
+ | .
+ NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{"vendor"},
+ '-onChange' => 'document.getElementById(\'update_button\').click();',
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ | |;
- $taxzone = qq|
-
- | . $locale->text('Steuersatz') . qq| |
- |
-
-
|;
-
+ %labels = ();
+ @values = ();
+ foreach my $item (@{ $form->{"ALL_TAXZONES"} }) {
+ push(@values, $item->{"id"});
+ $labels{$item->{"id"}} = $item->{"description"};
+ }
+ if (!$form->{"id"}) {
+ $taxzone = qq|
+
+ | . $locale->text('Steuersatz') . qq| |
+ | .
+ NTI($cgi->popup_menu('-name' => 'taxzone_id', '-default' => $form->{"taxzone_id"},
+ '-values' => \@values, '-labels' => \%labels)) . qq|
+ |
+
|;
- $vendor =
- ($form->{selectvendor})
- ? qq|\n|
- : qq||;
+ } else {
+ $taxzone = qq|
+
+ | . $locale->text('Steuersatz') . qq| |
+
+
+ | . H($labels{$form->{"taxzone_id"}}) . qq|
+ |
+
|;
+ }
$department = qq|
| . $locale->text('Department') . qq| |
-
-
+ |
+
|
| if $form->{selectdepartment};
@@ -349,12 +396,12 @@ sub form_header {
# with JavaScript Calendar
$button1 = qq|
- {invdate}> |
+ |
text('button') . qq|> |
|;
$button2 = qq|
- {duedate}> |
+ |
text('button') . qq|> |
|;
@@ -367,12 +414,13 @@ sub form_header {
# without JavaScript Calendar
$button1 =
- qq|{invdate}> | |;
+ qq| | |;
$button2 =
- qq|{duedate}> | |;
+ qq| | |;
}
$form->{"javascript"} .= qq||;
+ $form->{"javascript"} .= qq||;
$jsscript .=
$form->write_trigger(\%myconfig, 2,
@@ -380,9 +428,11 @@ sub form_header {
"quodate", "BL", "trigger_quodate");
$form->header;
-
+ $onload = qq|focus()|;
+ $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
+ $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
print qq|
-
+