X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fam.pl;h=e39d1193a1b38312ac80fee5fbb25728db6d5ddc;hb=1936914faa606aa5114592851c0d94913f6a005d;hp=7894f4cd2a7bf20f5e3bda699633368b1fe1cd6b;hpb=9ceafde6395689d82f625f1d63ff6eb384b87b96;p=kivitendo-erp.git diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 7894f4cd2..e39d1193a 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -2907,6 +2907,37 @@ sub config { $myconfig{$item} =~ s/\\n/\r\n/g; } + @formats = (); + if ($opendocument_templates && $openofficeorg_writer_bin && + $xvfb_bin && (-x $openofficeorg_writer_bin) && (-x $xvfb_bin)) { + push(@formats, { "name" => $locale->text("PDF (OpenDocument/OASIS)"), + "value" => "opendocument_pdf" }); + } + if ($latex_templates) { + push(@formats, { "name" => $locale->text("PDF"), "value" => "pdf" }); + } + push(@formats, { "name" => "HTML", "value" => "html" }); + if ($latex_templates) { + push(@formats, { "name" => $locale->text("Postscript"), + "value" => "postscript" }); + } + if ($opendocument_templates) { + push(@formats, { "name" => $locale->text("OpenDocument/OASIS"), + "value" => "opendocument" }); + } + + if (!$myconfig{"template_format"}) { + $myconfig{"template_format"} = "pdf"; + } + $template_format = ""; + foreach $item (@formats) { + $template_format .= + ""; + } + %countrycodes = User->country_codes; $countrycodes = ''; foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } @@ -3038,6 +3069,20 @@ sub config {  Old + + | . $locale->text("Print options") . qq| + + + | . $locale->text('Default template format') . qq| + + + + | . $locale->text('Number of copies') . qq| + + + +   @@ -3573,7 +3618,8 @@ sub add_unit { $form->isblank("new_name", $locale->text("The name is missing.")); $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}); - $form->show_generic_error($locale->text("A unit with this name does already exist.")) if ($units->{$form->{"new_name"}}); + $all_units = AM->retrieve_units(\%myconfig, $form); + $form->show_generic_error($locale->text("A unit with this name does already exist.")) if ($all_units->{$form->{"new_name"}}); my ($base_unit, $factor); if ($form->{"new_base_unit"}) {