From: Moritz Bunkus Date: Tue, 5 Dec 2006 12:12:20 +0000 (+0000) Subject: Die Steuersätze richten sich nach dem Ertrags- bzw. dem Aufwands- und nicht nach... X-Git-Tag: release-2.4.0^2~120 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=80ec19fe41dfa899593655963628334ab656ae54;p=kivitendo-erp.git Die Steuersätze richten sich nach dem Ertrags- bzw. dem Aufwands- und nicht nach dem Bestandskonto, weil beim Bestandskonto ja nicht danach unterschieden wird, woher man etwas bezogen hat. --- diff --git a/SL/IR.pm b/SL/IR.pm index 702c9f5e9..025c65f2e 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -925,21 +925,9 @@ sub retrieve_invoice { $stw->finish; } - - - #set expense_accno=inventory_accno if they are different => bilanz - $vendor_accno = - ($ref->{expense_accno} != $ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - $vendor_accno = - ($ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - # get tax rates and description $accno_id = - ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno; + ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber FROM tax t LEFT join chart c ON (c.id=t.chart_id) WHERE t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id') @@ -1190,19 +1178,9 @@ sub retrieve_item { } delete($ref->{inventory_accno_id}); - #set expense_accno=inventory_accno if they are different => bilanz - $vendor_accno = - ($ref->{expense_accno} != $ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - $vendor_accno = - ($ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - # get tax rates and description $accno_id = - ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno; + ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber FROM tax t LEFT JOIN chart c ON (c.id=t.chart_id) WHERE t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id') diff --git a/SL/IS.pm b/SL/IS.pm index 67a1fe5e2..f9b95ec8b 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1570,9 +1570,6 @@ sub retrieve_invoice { } delete($ref->{"part_inventory_accno_id"}); - #set expense_accno=inventory_accno if they are different => bilanz - - while ($ref->{inventory_new_chart} && ($ref->{inventory_valid} >=0)) { my $query = qq| SELECT accno AS inventory_accno, new_chart_id AS inventory_new_chart, date($transdate) - valid_from AS inventory_valid FROM chart WHERE id = $ref->{inventory_new_chart}|; my $stw = $dbh->prepare($query); @@ -1597,14 +1594,9 @@ sub retrieve_invoice { $stw->finish; } - $vendor_accno = - ($ref->{expense_accno} != $ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - # get tax rates and description $accno_id = - ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno; + ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber FROM tax t LEFT join chart c ON (c.id=t.chart_id) WHERE t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id') @@ -1961,15 +1953,9 @@ sub retrieve_item { } } - - $vendor_accno = - ($ref->{expense_accno} != $ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - # get tax rates and description $accno_id = - ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno; + ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber FROM tax t LEFT JOIN chart c on (c.id=t.chart_id) WHERE t.taxkey in (SELECT c2.taxkey_id from chart c2 where c2.accno = '$accno_id') diff --git a/SL/OE.pm b/SL/OE.pm index 888f422be..18e48bdd6 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -869,15 +869,9 @@ sub retrieve { # delete orderitems_id in collective orders, so that they get cloned no matter what delete $ref->{orderitems_id} if (@ids); - #set expense_accno=inventory_accno if they are different => bilanz - $vendor_accno = - ($ref->{expense_accno} != $ref->{inventory_accno}) - ? $ref->{inventory_accno} - : $ref->{expense_accno}; - # get tax rates and description $accno_id = - ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno; + ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber FROM tax t LEFT JOIN chart c ON (c.id=t.chart_id) WHERE t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')