From: Niclas Zimmermann Date: Fri, 1 Mar 2013 14:22:47 +0000 (+0100) Subject: Entfernt gifi und pos_ustva X-Git-Tag: release-3.1.0beta1~571^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0daf1633539ee37c7ba377aed1e82a7d65426048;p=kivitendo-erp.git Entfernt gifi und pos_ustva Dieser Commit entfernt die Tabelle gifi und die Spalten gifi_accno/ pos_ustva aus der Datenbank. Sie wurden nicht mehr benutzt. Behebt Bug #1966. --- diff --git a/SL/CA.pm b/SL/CA.pm index 577d6b98a..e24be69c3 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -113,7 +113,7 @@ sub all_accounts { LEFT JOIN tax tx ON (tk.tax_id = tx.id) WHERE 1=1 $where - GROUP BY c.accno, c.id, c.description, c.charttype, c.gifi_accno, + GROUP BY c.accno, c.id, c.description, c.charttype, c.category, c.link, c.pos_bwa, c.pos_bilanz, c.pos_eur, c.valid_from, c.datevautomatik ORDER BY c.accno diff --git a/SL/RP.pm b/SL/RP.pm index 4bb82f2b2..d448ba74e 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1829,89 +1829,6 @@ sub bwa { $main::lxdebug->leave_sub(); } -sub ustva { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form) = @_; - - # connect to database - my $dbh = $form->dbconnect($myconfig); - - my $last_period = 0; - my @categories_cent = qw(51r 511 86r 861 97r 971 93r 931 - 96 66 43 45 53 62 65 67); - my @categories_euro = qw(48 51 86 91 97 93 94); - $form->{decimalplaces} *= 1; - - foreach my $item (@categories_cent) { - $form->{"$item"} = 0; - } - foreach my $item (@categories_euro) { - $form->{"$item"} = 0; - } - - &get_accounts_g($dbh, $last_period, $form->{fromdate}, $form->{todate}, $form, "pos_ustva"); - - # foreach $item (@categories_cent) { - # if ($form->{$item}{"jetzt"} > 0) { - # $form->{$item} = $form->{$item}{"jetzt"}; - # delete $form->{$item}{"jetzt"}; - # } - # } - # foreach $item (@categories_euro) { - # if ($form->{$item}{"jetzt"} > 0) { - # $form->{$item} = $form->{$item}{"jetzt"}; - # delete $form->{$item}{"jetzt"}; - # } foreach $item (@categories_cent) { - # if ($form->{$item}{"jetzt"} > 0) { - # $form->{$item} = $form->{$item}{"jetzt"}; - # delete $form->{$item}{"jetzt"}; - # } - # } - # foreach $item (@categories_euro) { - # if ($form->{$item}{"jetzt"} > 0) { - # $form->{$item} = $form->{$item}{"jetzt"}; - # delete $form->{$item}{"jetzt"}; - # } - # } - # - # } - - # - # Berechnung der USTVA Formularfelder - # - $form->{"51r"} = $form->{"511"}; - $form->{"86r"} = $form->{"861"}; - $form->{"97r"} = $form->{"971"}; - $form->{"93r"} = $form->{"931"}; - - #$form->{"96"} = $form->{"94"} * 0.16; - $form->{"43"} = - $form->{"51r"} + $form->{"86r"} + $form->{"97r"} + $form->{"93r"} + - $form->{"96"}; - $form->{"45"} = $form->{"43"}; - $form->{"53"} = $form->{"43"}; - $form->{"62"} = $form->{"43"} - $form->{"66"}; - $form->{"65"} = $form->{"43"} - $form->{"66"}; - $form->{"67"} = $form->{"43"} - $form->{"66"}; - - foreach my $item (@categories_cent) { - $form->{$item} = - $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2), - 2, '0'); - } - - foreach my $item (@categories_euro) { - $form->{$item} = - $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0), - 0, '0'); - } - - $dbh->disconnect; - - $main::lxdebug->leave_sub(); -} - sub income_statement { $main::lxdebug->enter_sub(); diff --git a/sql/Pg-upgrade2/drop_gifi.sql b/sql/Pg-upgrade2/drop_gifi.sql new file mode 100644 index 000000000..987631c31 --- /dev/null +++ b/sql/Pg-upgrade2/drop_gifi.sql @@ -0,0 +1,13 @@ +-- @tag: drop_gifi +-- @description: Entfernt Spalten gifi_accno und pos_ustva aus der Tabelle chart. Tabelle gifi wird gelöscht. +-- @depends: release_3_0_0 +-- @charset: utf-8 + + --Lösche Tabelle gifi: + DROP TABLE gifi; + + --Lösche Spalte gifi_accno aus chart: + ALTER TABLE chart DROP COLUMN gifi_accno; + + --Lösche Spalte pos_ustva aus chart: + ALTER TABLE chart DROP COLUMN pos_ustva;