X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fir.pl;h=9102b43774dc4e7e8e7369ec5f3b5b84324bef1b;hb=e6ef45f2d8a980a68bd54df8c2afce4e0203c289;hp=343804690fd413895a8a923ab40f5291a312a762;hpb=5cfd34f0459bf58cee93d28a2cbe7e9f2684d1ca;p=kivitendo-erp.git
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index 343804690..9102b4377 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.pl
@@ -35,9 +35,9 @@ 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;
@@ -78,10 +78,8 @@ sub invoice_links {
$lxdebug->enter_sub();
# create links
- $form->{webdav} = $webdav;
-
- # set jscalendar
- $form->{jscalendar} = $jscalendar;
+ $form->{webdav} = $webdav;
+ $form->{jsscript} = 1;
$form->create_links("AP", \%myconfig, "vendor");
@@ -120,11 +118,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_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|
+ |
+
|;
- $taxzone = qq|
-
- | . $locale->text('Steuersatz') . qq| |
- |
-
-
|;
+ %labels = ();
+ @values = ();
+ my $i = 0;
+ foreach my $item (@{ $form->{"ALL_VENDORS"} }) {
+ push(@values, $item->{name}.qq|--|.$item->{"id"});
+ $labels{$item->{name}.qq|--|.$item->{"id"}} = $item->{"name"};
+ }
+ 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, '-style' => 'width: 250px')) . 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, '-style' => 'width: 250px')) . 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};
@@ -348,36 +402,28 @@ sub form_header {
$n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
# use JavaScript Calendar or not
- $form->{jsscript} = $form->{jscalendar};
+ $form->{jsscript} = 1;
$jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
- {invdate}> |
- text('button') . qq|> |
- |;
- $button2 = qq|
- {duedate}> |
- text('button') . qq|> |
- |;
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
- "duedate", "BL", "trigger2");
- } else {
+ $button1 = qq|
+
+ text('button') . qq|> |
+ |;
+ $button2 = qq|
+
+ text('button') . qq|> |
+ |;
- # without JavaScript Calendar
- $button1 =
- qq|{invdate}> | |;
- $button2 =
- qq|{duedate}> | |;
- }
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
+ "duedate", "BL", "trigger2");
$form->{"javascript"} .= qq||;
+ $form->{"javascript"} .= qq||;
+ $form->{javascript} .= qq||;
$jsscript .=
$form->write_trigger(\%myconfig, 2,
@@ -385,83 +431,55 @@ 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|
-
+