From 584599b21272c3422b729fe4368d31409c7195b5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 12 Dec 2006 14:49:04 +0000 Subject: [PATCH] Datenbankupgrade Buchungsgruppen: Wenn EUR gesetzt ist, dann erwartet das Query einen Parameter mehr. --- sql/Pg-upgrade/Pg-upgrade-2.2.0.33-2.2.0.34.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/Pg-upgrade/Pg-upgrade-2.2.0.33-2.2.0.34.pl b/sql/Pg-upgrade/Pg-upgrade-2.2.0.33-2.2.0.34.pl index 89f42cf7c..2b0765f9c 100644 --- a/sql/Pg-upgrade/Pg-upgrade-2.2.0.33-2.2.0.34.pl +++ b/sql/Pg-upgrade/Pg-upgrade-2.2.0.33-2.2.0.34.pl @@ -186,8 +186,10 @@ sub update_known_buchungsgruppen { foreach my $bg (@{$buchungsgruppen}) { if (($ref->{"income_accno_id"} == $bg->{"income_accno_id_0"}) && ($ref->{"expense_accno_id"} == $bg->{"expense_accno_id_0"})) { - $sth_update->execute($bg->{"id"}, $ref->{"id"}) || - mydberror($query_update . " ($bg->{id}, $ref->{id})"); + my @values = ($bg->{"id"}, $ref->{"id"}); + splice(@values, 1, 0, undef) if ($main::eur); + $sth_update->execute(@values) || + mydberror($query_update . " (" . join(", ", @values) . ")"); last; } } -- 2.20.1