Ermöglichen, keinen Drucker als Standarddrucker auszuwählen
[kivitendo-erp.git] / bin / mozilla / am.pl
index 19bb23a..368a627 100644 (file)
@@ -46,8 +46,6 @@ use SL::Printer;
 use CGI::Ajax;
 use CGI;
 
-use Data::Dumper;
-
 require "bin/mozilla/common.pl";
 
 use strict;
@@ -1392,17 +1390,18 @@ sub buchungsgruppe_header {
   }
 
   my $linkaccounts;
-  if (!$::lx_office_conf{system}->{eur}) {
+  if ( $::instance_conf->get_inventory_system eq 'perpetual' ) { # was !$::lx_office_conf{system}->{eur}) {
     $linkaccounts = qq|
                <tr>
                 <th align=right>| . $locale->text('Inventory') . qq|</th>
                 <td><select name=inventory_accno_id>$form->{selectIC}</select></td>
                 <input name=selectIC type=hidden value="$form->{selectIC}">
               </tr>|;
-  } else {
+  } elsif ( $::instance_conf->get_inventory_system eq 'periodic' ) {
+    # don't allow choice of inventory accno and don't show that line
     $linkaccounts = qq|
                 <input type=hidden name=inventory_accno_id value=$form->{inventory_accno_id}>|;
-  }
+  };
 
 
   $linkaccounts .= qq|
@@ -1550,6 +1549,11 @@ sub edit_defaults {
 
   map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
 
+  # default language
+  my $all_languages = SL::DB::Manager::Language->get_all;
+
+# EÜR = cash, Bilanzierung = accrual
+
   foreach my $key (keys %{ $form->{IC} }) {
     foreach my $accno (sort keys %{ $form->{IC}->{$key} }) {
       my $array = "ACCNOS_" . uc($key);
@@ -1567,7 +1571,8 @@ sub edit_defaults {
   $form->{title} = $locale->text('Ranges of numbers and default accounts');
 
   $form->header();
-  print $form->parse_html_template('am/edit_defaults');
+  print $form->parse_html_template('am/edit_defaults',
+                                   { ALL_LANGUAGES => $all_languages, });
 
   $main::lxdebug->leave_sub();
 }
@@ -1655,14 +1660,7 @@ sub config {
     { 'name' => $locale->text('Queue'),   'value' => 'queue',   'selected' => $selected{queue}, },
     ];
 
-  $form->{PRINTERS} = [];
-  foreach my $printer (SL::Printer->all_printers(%::myconfig)) {
-    push @{ $form->{PRINTERS} }, {
-      'name'     => $printer->{printer_description},
-      'value'    => $printer->{id},
-      'selected' => $printer->{id} == $myconfig{default_printer_id},
-    };
-  }
+  $form->{PRINTERS} = [ SL::Printer->all_printers(%::myconfig) ];
 
   my %countrycodes = User->country_codes;