admin muss mit login.pl nicht mit am.pl verknuepft werden.
[kivitendo-erp.git] / SL / AM.pm
index a9179e6..fc7bb73 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -1050,8 +1050,10 @@ sub get_buchungsgruppe {
 
   }
 
-  $query = "SELECT inventory_accno_id FROM defaults";
-  ($form->{"std_inventory_accno_id"}) = $dbh->selectrow_array($query);
+  $query = "SELECT inventory_accno_id, income_accno_id, expense_accno_id ".
+    "FROM defaults";
+  ($form->{"std_inventory_accno_id"}, $form->{"std_income_accno_id"},
+   $form->{"std_expense_accno_id"}) = $dbh->selectrow_array($query);
 
   my $module = "IC";
   $query = qq|SELECT c.accno, c.description, c.link, c.id,
@@ -1164,6 +1166,7 @@ sub printer {
   $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
 
+  $form->{"ALL"} = [];
   while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
     push @{ $form->{ALL} }, $ref;
   }
@@ -1535,7 +1538,6 @@ sub save_preferences {
                  servicenumber = '$form->{servicenumber}',
                  yearend = '$form->{yearend}',
                 curr = '$form->{curr}',
-                weightunit = '$form->{weightunit}',
                 businessnumber = '$form->{businessnumber}'
                |;
   $dbh->do($query) || $form->dberror($query);