From 94915eda8e84805b5745b81fefc67be9ecde55f8 Mon Sep 17 00:00:00 2001 From: Niclas Zimmermann Date: Tue, 18 Dec 2012 17:44:10 +0100 Subject: [PATCH] Fehler beim Schreiben von tax_id Bei Kreditorenbuchungen wurde noch die falsche Steuer-id geschrieben, wenn man den Steuersatz in einer Position selbst anpasst. --- SL/AP.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index 804c9b478..9e3888c96 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -211,10 +211,10 @@ sub post_transaction { qq|INSERT INTO acc_trans | . qq| (trans_id, chart_id, amount, transdate, project_id, taxkey, tax_id)| . qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), | . - qq| ?, ?, ?, ?, (SELECT tax_id FROM taxkeys WHERE taxkey_id= (SELECT taxkey_id FROM chart WHERE accno = ?) AND startdate <= ? ORDER BY startdate DESC LIMIT 1))|; + qq| ?, ?, ?, ?, ?)|; @values = ($form->{id}, $form->{AP_amounts}{"amount_$i"}, $form->{"amount_$i"}, conv_date($form->{transdate}), - $project_id, $form->{"taxkey_$i"}, $form->{AP_amounts}{"amount_$i"}, conv_date($form->{transdate})); + $project_id, $form->{"taxkey_$i"}, conv_i($form->{"tax_id_$i"})); do_query($form, $dbh, $query, @values); if ($form->{"tax_$i"} != 0) { @@ -223,10 +223,10 @@ sub post_transaction { qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, | . qq| project_id, taxkey, tax_id) | . qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), | . - qq| ?, ?, ?, ?, (SELECT tax_id FROM taxkeys WHERE taxkey_id= (SELECT taxkey_id FROM chart WHERE accno = ?) AND startdate <= ? ORDER BY startdate DESC LIMIT 1))|; + qq| ?, ?, ?, ?, ?)|; @values = ($form->{id}, $form->{AP_amounts}{"tax_$i"}, $form->{"tax_$i"}, conv_date($form->{transdate}), - $project_id, $form->{"taxkey_$i"}, $form->{AP_amounts}{"tax_$i"}, conv_date($form->{transdate})); + $project_id, $form->{"taxkey_$i"}, conv_i($form->{"tax_id_$i"})); do_query($form, $dbh, $query, @values); } -- 2.20.1