Anordnung links wie auch die Firmennummer. Kam durch Entfernen der Gewichtseinheit.
[kivitendo-erp.git] / bin / mozilla / am.pl
index 7894f4c..48ed1cd 100644 (file)
@@ -364,7 +364,9 @@ sub account_header {
                <input name=category type=radio class=radio value=I $checked{I_}>&nbsp;|
     . $locale->text('Revenue') . qq|\n<br>
                <input name=category type=radio class=radio value=E $checked{E_}>&nbsp;|
-    . $locale->text('Expense') . qq|</td>
+    . $locale->text('Expense') . qq|<br>
+               <input name=category type=radio class=radio value=C $checked{C_}>&nbsp;|
+    . $locale->text('Costs') . qq|</td>
                <td width=50>&nbsp;</td>
                <td>
                <input name=charttype type=radio class=radio value="H" $checked{H}>&nbsp;|
@@ -1778,8 +1780,10 @@ sub add_buchungsgruppe {
     "$form->{script}?action=add_buchungsgruppe&path=$form->{path}&login=$form->{login}&password=$form->{password}"
     unless $form->{callback};
   AM->get_buchungsgruppe(\%myconfig, \%$form);
-  if ($eur) {
-    $form->{"inventory_accno_id"} = $form->{"std_inventory_accno_id"};
+  $form->{"inventory_accno_id"} = $form->{"std_inventory_accno_id"};
+  for (my $i = 0; 4 > $i; $i++) {
+    map({ $form->{"${_}_accno_id_$i"} = $form->{"std_${_}_accno_id"}; }
+        qw(income expense));
   }
 
   &buchungsgruppe_header;
@@ -2907,6 +2911,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 .=
+      "<option value=\"$item->{value}\"" .
+      ($item->{"value"} eq $myconfig{"template_format"} ?
+       " selected" : "") .
+       ">" . H($item->{"name"}) . "</option>";
+  }
+
   %countrycodes = User->country_codes;
   $countrycodes = '';
   foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
@@ -2958,8 +2993,13 @@ sub config {
 
   $form->header;
 
-  if ($myconfig{menustyle} eq "old") { $oldS = "checked"; }
-  else { $newS = "checked"; }
+  if ($myconfig{menustyle} eq "old") {
+    $menustyle_old = "checked";
+  } elsif ($myconfig{menustyle} eq "neu") {
+    $menustyle_neu = "checked";
+  } elsif ($myconfig{menustyle} eq "v3") {
+    $menustyle_v3 = "checked";
+  }
 
   print qq|
 <body>
@@ -3034,10 +3074,28 @@ sub config {
        </tr>
        <tr>
          <th align=right>| . $locale->text('Setup Menu') . qq|</th>
-         <td><input name=menustyle type=radio class=radio value=neu $newS>&nbsp;New
-                 <input name=menustyle type=radio class=radio value=old $oldS>&nbsp;Old</td>
+         <td><input name=menustyle type=radio class=radio value=v3 $menustyle_v3>&nbsp;| .
+    $locale->text("Top (CSS)") . qq|
+         <input name=menustyle type=radio class=radio value=neu $menustyle_neu>&nbsp;| .
+    $locale->text("Top (Javascript)") . qq|
+    <input name=menustyle type=radio class=radio value=old $menustyle_old>&nbsp;| .
+    $locale->text("Old (on the side)") . qq|</td>
        </tr>   
        <input name=printer type=hidden value="$myconfig{printer}">
+       <tr class=listheading>
+         <th colspan=2>| . $locale->text("Print options") . qq|</th>
+       </tr>
+       <tr>
+         <th align=right>| . $locale->text('Default template format') . qq|</th>
+         <td><select name="template_format">$template_format</select></td>
+       </tr>
+       <tr>
+         <th align=right>| . $locale->text('Number of copies') . qq|</th>
+         <td><input name="copies" size="10" value="| .
+    $form->quote($myconfig{"copies"}) . qq|"></td>
+       </tr>
+
+
        <tr class=listheading>
          <th colspan=2>&nbsp;</th>
        </tr>
@@ -3046,16 +3104,8 @@ sub config {
          <td><input name=businessnumber size=25 value="$myconfig{businessnumber}"></td>
        </tr>
        <tr>
-         <td colspan=2>
-           <table width=100%>
-             <tr>
                <th align=right>| . $locale->text('Year End') . qq| (mm/dd)</th>
                <td><input name=yearend size=5 value=$form->{defaults}{yearend}></td>
-               <th align=right>| . $locale->text('Weight Unit') . qq|</th>
-               <td><input name=weightunit size=5 value="$form->{defaults}{weightunit}"></td>
-             </tr>
-           </table>
-         </td>
        </tr>
        <tr class=listheading>
          <th colspan=2>|
@@ -3573,7 +3623,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"}) {