X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=459e1b9446ef40f03b7c6807360c497df5b9540a;hb=1514a9d0b358fad627d81e8c88f71536c4e0aaba;hp=f210457284dd8968db733bbc791aea3e5d22cf2a;hpb=2b89ec9756dc1d3525b6163fe4cf4f38af83f9d8;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index f21045728..459e1b944 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -37,6 +37,7 @@ use Data::Dumper; require "$form->{path}/io.pl"; require "$form->{path}/arap.pl"; +require "bin/mozilla/drafts.pl"; 1; @@ -44,7 +45,9 @@ require "$form->{path}/arap.pl"; sub add { $lxdebug->enter_sub(); - + + return $lxdebug->leave_sub() if (load_draft_maybe()); + if ($form->{type} eq "credit_note") { $form->{title} = $locale->text('Add Credit Note'); @@ -118,6 +121,7 @@ sub invoice_links { if ($form->{all_customer}) { unless ($form->{customer_id}) { $form->{customer_id} = $form->{all_customer}->[0]->{id}; + $form->{salesman_id} = $form->{all_customer}->[0]->{salesman_id}; } } @@ -168,13 +172,13 @@ sub invoice_links { chomp $curr[0]; $form->{defaultcurrency} = $curr[0]; - map { $form->{selectcurrency} .= "\n" } @curr; $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; if (@{ $form->{all_customer} }) { $form->{customer} = "$form->{customer}--$form->{customer_id}"; - map { $form->{selectcustomer} .= "\n" } (@{ $form->{all_customer} }); } @@ -185,7 +189,7 @@ sub invoice_links { map { $form->{selectdepartment} .= - "\n" } (@{ $form->{all_departments} }); } @@ -194,7 +198,7 @@ sub invoice_links { # sales staff if ($form->{all_employees}) { $form->{selectemployee} = ""; - map { $form->{selectemployee} .= "\n" } (@{ $form->{all_employees} }); } @@ -204,7 +208,8 @@ sub invoice_links { foreach $key (keys %{ $form->{AR_links} }) { foreach $ref (@{ $form->{AR_links}{$key} }) { - $form->{"select$key"} .= "\n"; } if ($key eq "AR_paid") { @@ -345,15 +350,15 @@ sub form_header { } else { $form->{selecttaxzone} =~ s/ selected//g; if ($form->{taxzone_id} ne "") { - $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/; + $form->{selecttaxzone} =~ s/value=\"$form->{taxzone_id}\"/value=\"$form->{taxzone_id}\" selected/; } } $taxzone = qq|
| . $locale->text('Max. Dunning Level') . qq|: | +| . $locale->text('Max. Dunning Level') . qq|: | $form->{max_dunning_level} | -| . $locale->text('Dunning Amount') . qq|: | +| . $locale->text('Dunning Amount') . qq|: | | . $form->format_amount(\%myconfig, $form->{dunning_amount},2) . qq| | @@ -502,11 +531,10 @@ sub form_header { # with JavaScript Calendar $button1 = qq| -{invdate}> | -text('button') . qq|> | - |; - ++ | |; + #write Trigger $jsscript = Form->write_trigger(\%myconfig, "1", @@ -516,28 +544,28 @@ sub form_header { # without JavaScript Calendar $button1 = - qq| | {invdate}> | |; + qq||; $button2 = - qq| | {duedate}> | |; + qq||; } } else { if ($form->{jsscript}) { # with JavaScript Calendar $button1 = qq| - | {invdate}> | -text('button') . qq|> | ++ | |; $button2 = qq| - | {duedate}> | -text('button') . qq|> | ++ | |; $button3 = qq| - | {deliverydate}> | -text('button') . qq|> | ++ | |; #write Trigger @@ -552,7 +580,7 @@ sub form_header { # without JavaScript Calendar $button1 = - qq| | {invdate}> | |; + qq||; $button2 = qq| | {duedate}> | |; } @@ -589,69 +617,45 @@ sub form_header { -
---|