X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=da1a265acbd80c2ac2ca30d80345e0cb1b874b54;hb=f36eb9fca78c4940b486b7dafa4ab636cdaf99cd;hp=d7413ed36360457510572d812980a4a4eaad44f0;hpb=a200453a04fc89fdf02dbe39e1d951cb1b55191c;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index d7413ed36..da1a265ac 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -147,7 +147,7 @@ sub report { '-labels' => \%project_labels)); # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{report} eq "ustva") { $department = ""; @@ -1947,8 +1947,6 @@ sub e_mail { sub send_email { $lxdebug->enter_sub(); - $form->{OUT} = "$sendmail"; - $form->{subject} = $locale->text('Statement') . qq| - $form->{todate}| unless $form->{subject}; @@ -1956,10 +1954,10 @@ sub send_email { $form->{"statement_1"} = 1; - &print_form; + $form->{media} = 'email'; + print_form(); - $form->redirect( - $locale->text('Statement sent to') . " $form->{$form->{ct}}"); + $form->redirect($locale->text('Statement sent to') . " $form->{$form->{ct}}"); $lxdebug->leave_sub(); } @@ -1983,7 +1981,6 @@ sub print { $form->error($locale->text('Nothing selected!')) unless $selected; if ($form->{media} eq 'printer') { - $form->{OUT} = "| $myconfig{printer}"; $form->{"$form->{ct}_id"} = ""; } else { $form->{"statement_1"} = 1; @@ -1991,7 +1988,7 @@ sub print { RP->aging(\%myconfig, \%$form); - &print_form; + print_form(); $form->redirect($locale->text('Statements sent to printer!')) if ($form->{media} eq 'printer'); @@ -2031,8 +2028,10 @@ sub print_form { $attachment_suffix = "pdf"; } - $form->{IN} = "$form->{type}.$suffix"; - + $form->{IN} = "$form->{type}.$suffix"; + $form->{OUT} = + $form->{media} eq 'email' ? $sendmail : + $form->{media} eq 'printer' ? "| $myconfig{printer}" : ""; # Save $form->{email} because it will be overwritten. $form->{EMAIL_RECIPIENT} = $form->{email};