From e9e28dd26de569ab7b721560d84ea8ddb0c1dda1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 23 Nov 2009 17:33:09 +0100 Subject: [PATCH] Partieller revert von 452974ed95bccca90fe3991d46c081e46413b643: MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit "Revert "Einkaufsrechnung -> Zahlung buchen: sinnlosen Quark gefixt."" Die ursprüngliche Änderung bleibt erhalten, bis auf eine Zeile, die Probleme mit der Darstellung von Kontenlisten im Dialogbuchen machte. --- SL/AP.pm | 18 ++++++++++-------- bin/mozilla/ap.pl | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index ad8749f56..aaf2d5e6e 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -38,6 +38,8 @@ use SL::DBUtils; use SL::IO; use SL::MoreCommon; +use Data::Dumper; + use strict; sub post_transaction { @@ -68,7 +70,7 @@ sub post_transaction { (split(/--/, $form->{"AP_amount_$i"}))[0]; } ($form->{AP_amounts}{payables}) = split(/--/, $form->{APselected}); - ($form->{AP}{payables}) = split(/--/, $form->{APselected}); + ($form->{AP_payables}) = split(/--/, $form->{APselected}); # reverse and parse amounts for my $i (1 .. $form->{rowcount}) { @@ -270,7 +272,7 @@ sub post_transaction { # get paid account - ($form->{AP}{"paid_$i"}) = split(/--/, $form->{"AP_paid_$i"}); + ($form->{"AP_paid_account_$i"}) = split(/--/, $form->{"AP_paid_$i"}); $form->{"datepaid_$i"} = $form->{transdate} unless ($form->{"datepaid_$i"}); @@ -287,9 +289,9 @@ sub post_transaction { qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id, taxkey) | . qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, | . qq| (SELECT taxkey_id FROM chart WHERE accno = ?))|; - @values = ($form->{id}, $form->{AP}{payables}, $amount, + @values = ($form->{id}, $form->{AP_payables}, $amount, conv_date($form->{"datepaid_$i"}), $project_id, - $form->{AP}{payables}); + $form->{AP_payables}); do_query($form, $dbh, $query, @values); } $form->{payables} = $amount; @@ -299,9 +301,9 @@ sub post_transaction { qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo, project_id, taxkey) | . qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?, ?, | . qq| (SELECT taxkey_id FROM chart WHERE accno = ?))|; - @values = ($form->{id}, $form->{AP}{"paid_$i"}, $form->{"paid_$i"}, + @values = ($form->{id}, $form->{"AP_paid_account_$i"}, $form->{"paid_$i"}, conv_date($form->{"datepaid_$i"}), $form->{"source_$i"}, - $form->{"memo_$i"}, $project_id, $form->{AP}{"paid_$i"}); + $form->{"memo_$i"}, $project_id, $form->{"AP_paid_account_$i"}); do_query($form, $dbh, $query, @values); # add exchange rate difference @@ -313,9 +315,9 @@ sub post_transaction { qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, fx_transaction, cleared, project_id, taxkey) | . qq|VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, 't', 'f', ?, | . qq| (SELECT taxkey_id FROM chart WHERE accno = ?))|; - @values = ($form->{id}, $form->{AP}{"paid_$i"}, $amount, + @values = ($form->{id}, $form->{"AP_paid_account_$i"}, $amount, conv_date($form->{"datepaid_$i"}), $project_id, - $form->{AP}{"paid_$i"}); + $form->{"AP_paid_account_$i"}); do_query($form, $dbh, $query, @values); } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 49dc1589e..e593083d4 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1070,8 +1070,8 @@ sub post { my ($debitaccno, $debittaxkey) = split /--/, $form->{AP_amountselected}; my ($taxkey, $NULL) = split /--/, $form->{taxchartselected}; my ($payablesaccno, $payablestaxkey) = split /--/, $form->{APselected}; - $form->{AP}{amount_1} = $debitaccno; - $form->{AP}{payables} = $payablesaccno; +# $form->{AP_amount_1} = $debitaccno; + $form->{AP_payables} = $payablesaccno; $form->{taxkey} = $taxkey; $form->{storno} = 0; -- 2.20.1