From 52c9a08d4fc28b6027b8f6044e85043ec9e75335 Mon Sep 17 00:00:00 2001
From: Philip Reetz
Date: Tue, 7 Aug 2007 09:33:01 +0000
Subject: [PATCH] Wenn bei Kundenberichten Rechnungen etc ausgewaehlt waren,
wurden nicht genug Variablen ins Query gesteckt
---
SL/CT.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/SL/CT.pm b/SL/CT.pm
index dfbbee6cf..db715ba01 100644
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -638,6 +638,7 @@ sub search {
qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
qq|WHERE $where|;
+ my @saved_values = @values;
# redo for invoices, orders and quotations
if ($form->{l_invnumber} || $form->{l_ordnumber} || $form->{l_quonumber}) {
my ($ar, $union, $module);
@@ -661,6 +662,9 @@ sub search {
}
if ( $form->{l_ordnumber} ) {
+ if ($union eq "UNION") {
+ push(@values, @saved_values);
+ }
$query .=
qq| $union | .
qq|SELECT ct.*, b.description AS business,| .
@@ -675,6 +679,9 @@ sub search {
}
if ( $form->{l_quonumber} ) {
+ if ($union eq "UNION") {
+ push(@values, @saved_values);
+ }
$query .=
qq| $union | .
qq|SELECT ct.*, b.description AS business, | .
--
2.20.1