From 8ef312a73d7d2e2db8274a9ab9d88bfd387bfc4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 25 Apr 2011 07:59:25 +0200 Subject: [PATCH] =?utf8?q?Bugfix=20f=C3=BCr=201614?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 ... --- SL/RP.pm | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.20.1