From: Sven Schöling Date: Thu, 20 Jun 2013 16:48:21 +0000 (+0200) Subject: Mehrere redefines entfernt, meist my $query X-Git-Tag: release-3.1.0beta1~288 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c4885ddf724ece6960bfc53015d55d4bf61c86c6;p=kivitendo-erp.git Mehrere redefines entfernt, meist my $query --- diff --git a/sql/Pg-upgrade2/add_more_constraints_fibu_projekt_xplace.pl b/sql/Pg-upgrade2/add_more_constraints_fibu_projekt_xplace.pl index 67e8e8d68..2ed31f33b 100644 --- a/sql/Pg-upgrade2/add_more_constraints_fibu_projekt_xplace.pl +++ b/sql/Pg-upgrade2/add_more_constraints_fibu_projekt_xplace.pl @@ -28,8 +28,8 @@ sub run { } } $sth_all_groups->finish(); - my $query = qq|select count(*) from acc_trans where trans_id is NULL|; - my $sth_all_groups = prepare_execute_query($::form, $self->dbh, $query); + $query = qq|select count(*) from acc_trans where trans_id is NULL|; + $sth_all_groups = prepare_execute_query($::form, $self->dbh, $query); while (my $hash_ref = $sth_all_groups->fetchrow_hashref()) { # Schleife if ($hash_ref->{count} eq 0){ # Falls wir keine alte buggy Installation haben, ist es super die diff --git a/sql/Pg-upgrade2/default_bin_parts.pl b/sql/Pg-upgrade2/default_bin_parts.pl index 948067cf7..87daefc2d 100644 --- a/sql/Pg-upgrade2/default_bin_parts.pl +++ b/sql/Pg-upgrade2/default_bin_parts.pl @@ -105,7 +105,7 @@ sub run { } # das alte textfeld entfernen # hier nochmal, da oben schon ein return 1 gesetzt ist - my $query = qq|ALTER TABLE parts drop COLUMN bin|; + $query = qq|ALTER TABLE parts drop COLUMN bin|; $self->db_query($query); return 1; } diff --git a/sql/Pg-upgrade2/rundungsfehler_korrigieren_BUG1328.pl b/sql/Pg-upgrade2/rundungsfehler_korrigieren_BUG1328.pl index a3f0fd209..950e023d8 100644 --- a/sql/Pg-upgrade2/rundungsfehler_korrigieren_BUG1328.pl +++ b/sql/Pg-upgrade2/rundungsfehler_korrigieren_BUG1328.pl @@ -25,9 +25,9 @@ ap.id) where ac.chart_id IN (select id from chart where link ='AP' OR link like $sth_all_groups->finish(); - my $query = qq|select distinct id,acamount from (select ar.id, ar.amount as aramount, ac.amount*-1 as acamount from ar left join acc_trans ac on (ac.trans_id = + $query = qq|select distinct id,acamount from (select ar.id, ar.amount as aramount, ac.amount*-1 as acamount from ar left join acc_trans ac on (ac.trans_id = ar.id) where ac.chart_id IN (select id from chart where link ='AR' OR link like '%:AR' OR link like 'AR:%')) as foo where aramount + 0.01 = abs(acamount)|; - my $sth_all_groups = prepare_execute_query($::form, $self->dbh, $query); + $sth_all_groups = prepare_execute_query($::form, $self->dbh, $query); while (my $hash_ref = $sth_all_groups->fetchrow_hashref()) { # Schleife # Falls wir keine alte buggy Installation haben, ist es super die # Gewissheit zu haben, dass kein acc_trans-Eintrag ohne trans_id vorhanden ist