From 164b344bd5b79c4187c3e82dd47a5c9230115650 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 4 May 2009 15:35:32 +0000 Subject: [PATCH] Pruefung auf Dienstleistung ist vom Meister Bunkus gesegnet --- SL/Common.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SL/Common.pm b/SL/Common.pm index f42676a70..cb381591d 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -57,6 +57,8 @@ sub retrieve_parts { $filter .= qq| AND ($_ ILIKE ?)|; push @filter_values, '%' . $form->{$_} . '%'; } +$main::lxdebug->dump(0, "assemblies in common", $form->{assemblies}); +$main::lxdebug->dump(0, "no assemblies in common", $form->{no_assemblies}); if ($form->{no_assemblies}) { $filter .= qq| AND (NOT COALESCE(assembly, FALSE))|; @@ -69,8 +71,7 @@ sub retrieve_parts { } if ($form->{no_services}) { - #$filter .= qq| AND (COALESCE(inventory_accno_id, 0) > 0) AND (COALESCE (assembly, FALSE))|; - $filter .= qq| AND (inventory_accno_id is not NULL or assembly=TRUE)|; # @mb hier nochmal optimieren ... + $filter .= qq| AND (inventory_accno_id is not NULL or assembly=TRUE)|; # @mb hier nochmal optimieren ... nach kurzer ruecksprache alles i.o. } substr($filter, 1, 3) = "WHERE" if ($filter); @@ -84,6 +85,12 @@ sub retrieve_parts { qq|ORDER BY $order_by $order_dir|; my $sth = $dbh->prepare($query); $sth->execute(@filter_values) || $form->dberror($query . " (" . join(", ", @filter_values) . ")"); + +$main::lxdebug->dump(0, "query", $query); + +$main::lxdebug->dump(0, "values", @filter_values); + + my $parts = []; while (my $ref = $sth->fetchrow_hashref()) { push(@{$parts}, $ref); -- 2.20.1