X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fis.pl;h=459e1b9446ef40f03b7c6807360c497df5b9540a;hb=d25bd6ec1709f3c8ef07e1dab1f69469893ab6dc;hp=fef4a3edfda11744df808e80c349daef323953ce;hpb=9caaa245e1bc3309a7d8f198228dbfd9d4555bee;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index fef4a3edf..459e1b944 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -172,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} }); } @@ -189,7 +189,7 @@ sub invoice_links { map { $form->{selectdepartment} .= - "\n" } (@{ $form->{all_departments} }); } @@ -198,7 +198,7 @@ sub invoice_links { # sales staff if ($form->{all_employees}) { $form->{selectemployee} = ""; - map { $form->{selectemployee} .= "\n" } (@{ $form->{all_employees} }); } @@ -208,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") { @@ -433,6 +434,9 @@ sub form_header { #quote customer Bug 133 $form->{selectcustomer} = $form->quote($form->{selectcustomer}); + + #substitute \n and \r to \s (bug 543) + $form->{selectcustomer} =~ s/[\n\r]/ /g; if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) { $creditwarning = 1; @@ -468,7 +472,10 @@ sub form_header { $customer = ($form->{selectcustomer}) - ? qq|\n| + ? qq|\n| : qq||; $department = qq| @@ -784,8 +791,7 @@ $jsscript | ; map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } - qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry - shiptocontact shiptophone shiptofax shiptoemail)); + qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2)); print qq| |; map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(message email subject cc bcc taxaccounts)); @@ -1065,7 +1071,7 @@ if ($form->{type} eq "credit_note") { |; - &print_options; + print_options(); print qq| @@ -1618,11 +1624,20 @@ sub yes { sub e_mail { $lxdebug->enter_sub(); - $print_post = 1; + if (!$form->{id}) { + $print_post = 1; + + my $saved_form = save_form(); - &post; + post(); + + my %saved_vars; + map({ $saved_vars{$_} = $form->{$_}; } qw(id invnumber)); + restore_form($saved_form); + map({ $form->{$_} = $saved_vars{$_}; } qw(id invnumber)); + } - &edit_e_mail; + edit_e_mail(); $lxdebug->leave_sub(); }