X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fir.pl;h=f4345c1fe1cf3dc549a6531fee8638aae2b47e7b;hb=ab1df08bfae3ef3361c7b5e4e16d91ae3cb34961;hp=3851492eac5656db31a9adf21dd529331838a31b;hpb=a05eead353b55ba228a5eec40f90c0f2c330092a;p=kivitendo-erp.git
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index 3851492ea..f4345c1fe 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.pl
@@ -34,8 +34,10 @@
use SL::IR;
use SL::IS;
use SL::PE;
+use List::Util qw(max);
require "bin/mozilla/io.pl";
+require "bin/mozilla/invoice_io.pl";
require "bin/mozilla/arap.pl";
require "bin/mozilla/common.pl";
require "bin/mozilla/drafts.pl";
@@ -46,7 +48,6 @@ require "bin/mozilla/drafts.pl";
sub add {
$lxdebug->enter_sub();
- $form->{"Watchdog::invdate,duedate,vendor,vendor_id"} = 1;
return $lxdebug->leave_sub() if (load_draft_maybe());
@@ -61,7 +62,7 @@ sub add {
sub edit {
$lxdebug->enter_sub();
-
+
# show history button
$form->{javascript} = qq||;
#/show hhistory button
@@ -217,8 +218,7 @@ sub form_header {
# set option selected
foreach $item (qw(AP vendor currency department)) {
$form->{"select$item"} =~ s/ selected//;
- $form->{"select$item"} =~
- s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
}
$form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
@@ -233,10 +233,10 @@ sub form_header {
if ($form->{currency} ne $form->{defaultcurrency}) {
if ($form->{forex}) {
$exchangerate .= qq|
| . $locale->text('Exchangerate') . qq| |
- $form->{exchangerate}{exchangerate}> | \n|;
+ $form->{exchangerate}{exchangerate}> | \n|;
} else {
$exchangerate .= qq| | . $locale->text('Exchangerate') . qq| |
- {exchangerate}> | \n|;
+ {exchangerate}> | \n|;
}
}
$exchangerate .= qq| {forex}>\n|;
@@ -244,14 +244,15 @@ sub form_header {
my @old_project_ids = ($form->{"globalproject_id"});
map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"};
- $form->get_lists("contacts" => "ALL_CONTACTS",
- "projects" => { "key" => "ALL_PROJECTS",
- "all" => 0,
- "old_id" => \@old_project_ids },
- "taxzones" => "ALL_TAXZONES",
- "employees" => "ALL_SALESMEN",
- "currencies" => "ALL_CURRENCIES",
- "vendors" => "ALL_VENDORS");
+ $form->get_lists("contacts" => "ALL_CONTACTS",
+ "projects" => { "key" => "ALL_PROJECTS",
+ "all" => 0,
+ "old_id" => \@old_project_ids },
+ "taxzones" => "ALL_TAXZONES",
+ "employees" => "ALL_SALESMEN",
+ "currencies" => "ALL_CURRENCIES",
+ "vendors" => "ALL_VENDORS",
+ "price_factors" => "ALL_PRICE_FACTORS");
my %labels;
my @values = (undef);
@@ -331,8 +332,8 @@ sub form_header {
(($myconfig{vclimit} <= scalar(@values))
? qq||
: (NTI($cgi->popup_menu('-name' => 'vendor', '-default' => $form->{oldvendor},
- '-onChange' => 'document.getElementById(\'update_button\').click();',
- '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq|
+ '-onChange' => 'document.getElementById(\'update_button\').click();',
+ '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq|
|;
@@ -368,8 +369,7 @@ sub form_header {
|
-
-| if $form->{selectdepartment};
+ \n| if $form->{selectdepartment};
$n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
@@ -379,24 +379,25 @@ sub form_header {
$button1 = qq|
- text('button') . qq|> | \n|;
+ text('button') . qq|>\n|;
$button2 = qq|
- text('button') . qq|> | \n|;
+ text('button') . qq|>\n|;
#write Trigger
$jsscript =
- Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
+ Form->write_trigger(\%myconfig, "2",
+ "invdate", "BL", "trigger1",
"duedate", "BL", "trigger2");
- $form->{"javascript"} .= qq||;
- $form->{"javascript"} .= qq||;
- $form->{javascript} .= qq||;
+ $form->{javascript} .= qq||;
+ $form->{javascript} .= qq||;
+ $form->{javascript} .= qq||;
$jsscript .= $form->write_trigger(\%myconfig, 2, "orddate", "BL", "trigger_orddate", "quodate", "BL", "trigger_quodate");
$form->header;
- $onload = qq|focus()|;
+ $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|
@@ -405,9 +406,10 @@ sub form_header {