projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
form_footer in ic.pl in Template ausgelagert.
[kivitendo-erp.git]
/
bin
/
mozilla
/
io.pl
diff --git
a/bin/mozilla/io.pl
b/bin/mozilla/io.pl
index
87cb3ea
..
ea8b203
100644
(file)
--- a/
bin/mozilla/io.pl
+++ b/
bin/mozilla/io.pl
@@
-1366,7
+1366,8
@@
sub print_form {
IS->invoice_details(\%myconfig, \%$form, $locale);
}
IS->invoice_details(\%myconfig, \%$form, $locale);
}
- $form->get_salesman(\%myconfig, $salesman_id_saved);
+ $form->get_employee_data('prefix' => 'employee', 'id' => $form->{employee_id});
+ $form->get_employee_data('prefix' => 'salesman', 'id' => $salesman_id_saved);
if ($form->{shipto_id}) {
$form->get_shipto(\%myconfig);
if ($form->{shipto_id}) {
$form->get_shipto(\%myconfig);
@@
-1464,22
+1465,24
@@
sub print_form {
reformat_numbers($output_numberformat, $precision, @{ $field_list });
}
reformat_numbers($output_numberformat, $precision, @{ $field_list });
}
-
$form->{IN} = "$form->{formname}$form->{language}${printer_code}.html"
;
+
my $extension = ''
;
if ($form->{format} eq 'postscript') {
if ($form->{format} eq 'postscript') {
- $form->{postscript} = 1;
- $form->{IN} =~ s/html$/tex/;
+ $form->{postscript} = 1;
+ $extension = 'tex';
+
} elsif ($form->{"format"} =~ /pdf/) {
} elsif ($form->{"format"} =~ /pdf/) {
- $form->{pdf} = 1;
- if ($form->{"format"} =~ /opendocument/) {
- $form->{IN} =~ s/html$/odt/;
- } else {
- $form->{IN} =~ s/html$/tex/;
- }
+ $form->{pdf} = 1;
+ $extension = $form->{'format'} =~ m/opendocument/i ? 'odt' : 'tex';
+
} elsif ($form->{"format"} =~ /opendocument/) {
} elsif ($form->{"format"} =~ /opendocument/) {
- $form->{
"opendocument"
} = 1;
- $
form->{"IN"} =~ s/html$/odt/
;
+ $form->{
opendocument
} = 1;
+ $
extension = 'odt'
;
}
}
+ my $email_extension = '_email' if (($form->{media} eq 'email') && (-f "$myconfig{templates}/$form->{formname}_email$form->{language}${printer_code}.${extension}"));
+
+ $form->{IN} = "$form->{formname}${email_extension}$form->{language}${printer_code}.${extension}";
+
delete $form->{OUT};
if ($form->{media} eq 'printer') {
delete $form->{OUT};
if ($form->{media} eq 'printer') {
@@
-1849,7
+1852,7
@@
sub set_duedate {
$form->get_duedate(\%myconfig);
$form->get_duedate(\%myconfig);
- print $
cgi->
header() . $form->{duedate};
+ print $
form->ajax_response_
header() . $form->{duedate};
$lxdebug->leave_sub();
}
$lxdebug->leave_sub();
}