From f28ef48d4304d921830a0beff4598fb4b25120e5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 20 Feb 2007 09:14:22 +0000 Subject: [PATCH] =?utf8?q?Kreditorenrechnungen:=20Projektnummern=20f=C3=BC?= =?utf8?q?r=20jede=20Zeile=20bei=20den=20Zahlungsausg=C3=A4ngen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AP.pm | 14 ++++++++------ bin/mozilla/ap.pl | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index 3522e6261..f6478d39d 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -570,10 +570,11 @@ sub post_payment { do_query($form, $dbh, $query, @values); $query = - qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate) | . - qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?)|; + qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, project_id) | . + qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?, ?)|; @values = ($form->{id}, $form->{AP}, $amount, - conv_date($form->{"datepaid_$i"})); + conv_date($form->{"datepaid_$i"}), + conv_i($form->{"paid_project_id_$i"})); do_query($form, $dbh, $query, @values); $query = @@ -587,11 +588,12 @@ sub post_payment { do_query($form, $dbh, $query, @values); $query = - qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo) | . - qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?, ?, ?)|; + qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo, project_id) | . + qq|VALUES (?, (SELECT c.id FROM chart c WHERE c.accno = ?), ?, ?, ?, ?, ?)|; @values = ($form->{id}, $accno, $form->{"paid_$i"}, $form->{"datepaid_$i"}, - $form->{"source_$i"}, $form->{"memo_$i"}); + $form->{"source_$i"}, $form->{"memo_$i"}, + conv_i($form->{"paid_project_id_$i"})); do_query($form, $dbh, $query, @values); # gain/loss diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index c4c513a34..60a104887 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -193,6 +193,7 @@ sub create_links { $form->{"forex_$j"} = $form->{"exchangerate_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{exchangerate}; $form->{"AP_paid_$j"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}"; + $form->{"paid_project_id_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{project_id}; $form->{paidaccounts}++; } else { @@ -637,7 +638,7 @@ $jsscript - + |; -- 2.20.1
| . $locale->text('Payments') . qq|| . $locale->text('Payments') . qq|