Script wird nicht mehr benötigt, da für den neuen Upgrademechanismus keine Versionsnu...
[kivitendo-erp.git] / SL / AM.pm
index 8fd79ad..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);
@@ -2098,7 +2100,6 @@ sub translate_units {
   my $units = $self->retrieve_units(\%main::myconfig, $form);
 
   my $h = $units->{$unit}->{"LANGUAGES"}->{$template_code};
-  $main::lxdebug->dump(0, "klaus", $h);
   my $new_unit = $unit;
   if ($h) {
     if (($amount != 1) && $h->{"localized_plural"}) {