From: Jan Büren Date: Mon, 25 Apr 2011 05:59:25 +0000 (+0200) Subject: Bugfix für 1614 X-Git-Tag: release-2.6.3~34 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8ef312a73d7d2e2db8274a9ab9d88bfd387bfc4c;p=kivitendo-erp.git Bugfix für 1614 Created attachment 293 [details] RP.pm.patch Das Problem war, dass unterschiedliche Kostenstellen innerhalb desselben Lieferanten nicht gefiltert wurden. Sprich: 1.) Finde offene Verbindlichkeiten mit Abteilung x 2.) Lieferant A Treffer 3.) Hole alle offenen Verbindlichkeiten zu Lieferant A Anbei der Hotfix für dieses Verhalten. 3.patch) Hole alle offenen Verbindlichkeiten zu Lieferant A die Abteilung x gebucht haben ... --- diff --git a/SL/RP.pm b/SL/RP.pm index d875fb162..113e9dd42 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1193,10 +1193,12 @@ sub aging { } my $dpt_join; + my $where_dpt; if ($form->{department}) { my ($null, $department_id) = split /--/, $form->{department}; $dpt_join = qq| JOIN department d ON (a.department_id = d.id) |; $where .= qq| AND (a.department_id = | . conv_i($department_id, 'NULL') . qq|)|; + $where_dpt = qq| AND (${arap}.department_id = | . conv_i($department_id, 'NULL') . qq|)|; } my $review_of_aging_list; if ($form->{review_of_aging_list}) { @@ -1226,6 +1228,7 @@ sub aging { WHERE ((paid != amount) OR (datepaid > (date $todate) AND datepaid is not null)) AND NOT COALESCE (${arap}.storno, 'f') AND (${arap}.${ct}_id = ${ct}.id) + $where_dpt AND (${ct}.id = ?) AND (transdate <= (date $todate) $fromwhere ) $review_of_aging_list