From: Moritz Bunkus Date: Tue, 20 Feb 2007 09:14:22 +0000 (+0000) Subject: Kreditorenrechnungen: Projektnummern für jede Zeile bei den Zahlungsausgängen. X-Git-Tag: release-2.4.2~74 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f28ef48d4304d921830a0beff4598fb4b25120e5;p=kivitendo-erp.git Kreditorenrechnungen: Projektnummern für jede Zeile bei den Zahlungsausgängen. --- 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 - + |;
| . $locale->text('Payments') . qq|| . $locale->text('Payments') . qq|