From: Sven Schöling Date: Thu, 3 Sep 2009 14:30:15 +0000 (+0200) Subject: Bugfix: Auftragssuche: Bei niedrigen vclimit muss nach projectNUMMER und nicht nach... X-Git-Tag: release-2.6.1beta1~301 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=777d9b30c494c0a6dfd86e638c16ef8b27658ed9;p=kivitendo-erp.git Bugfix: Auftragssuche: Bei niedrigen vclimit muss nach projectNUMMER und nicht nach id gesucht werden. Fix für Bug 1108 --- diff --git a/SL/OE.pm b/SL/OE.pm index df634afb2..f5f439fce 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -111,7 +111,18 @@ sub transactions { qq|AND ((globalproject_id = ?) OR EXISTS | . qq| (SELECT * FROM orderitems oi | . qq| WHERE oi.project_id = ? AND oi.trans_id = o.id))|; - push(@values, $form->{"project_id"}, $form->{"project_id"}); + push(@values, conv_i($form->{"project_id"}), conv_i($form->{"project_id"})); + } + + if ($form->{"projectnumber"}) { + $query .= <{"projectnumber"} . "%", "%" . $form->{"projectnumber"} . "%" ; } if ($form->{"${vc}_id"}) { diff --git a/templates/webpages/oe/search_de.html b/templates/webpages/oe/search_de.html index 946e678a6..0358b0b01 100644 --- a/templates/webpages/oe/search_de.html +++ b/templates/webpages/oe/search_de.html @@ -87,7 +87,7 @@ Projektnummer [%- INCLUDE 'generic/multibox.html' - name = 'project_id', + name = vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id', style = "width: 250px", DATA = ALL_PROJECTS, id_key = 'id', diff --git a/templates/webpages/oe/search_master.html b/templates/webpages/oe/search_master.html index 705bf71cd..32d766f74 100644 --- a/templates/webpages/oe/search_master.html +++ b/templates/webpages/oe/search_master.html @@ -87,7 +87,7 @@ Project Number [%- INCLUDE 'generic/multibox.html' - name = 'project_id', + name = vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id', style = "width: 250px", DATA = ALL_PROJECTS, id_key = 'id',