X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/bc40bcabc425b99f3b79a5544684a6fe8674adfe..bbf5c662c1c707852b30d0fb6985efdf6148f14f:/SL/AP.pm diff --git a/SL/AP.pm b/SL/AP.pm index 9e108a1ca..594728546 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -482,7 +482,7 @@ sub ap_transactions { } if ($form->{project_id}) { $where .= - qq|AND ((a.globalproject_id = ?) OR EXISTS | . + qq| AND ((a.globalproject_id = ?) OR EXISTS | . qq| (SELECT * FROM invoice i | . qq| WHERE i.project_id = ? AND i.trans_id = a.id) | . qq| OR EXISTS | . @@ -507,6 +507,33 @@ sub ap_transactions { } } + if ($form->{parts_partnumber}) { + $where .= <{parts_partnumber}); + } + + if ($form->{parts_description}) { + $where .= <{parts_description}); + } + if ($where) { substr($where, 0, 4, " WHERE "); $query .= $where;