From 62f99e30c191d86af9249b6ec61f410dbe46466d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 15 Jan 2007 08:07:20 +0000 Subject: [PATCH] =?utf8?q?Beim=20Anlegen=20von=20Buchungsgruppen=20die=20i?= =?utf8?q?n=20den=20Benutzereinstellungen=20ausgew=C3=A4hlten=20Standardko?= =?utf8?q?nten=20vorselektieren.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AM.pm | 6 ++++-- bin/mozilla/am.pl | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index a9179e65d..a9018d74c 100644 --- 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, diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 5b43c787c..d8d034ed2 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -1780,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; -- 2.20.1