X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/42ed89f33e7f38dcf9bba8983a070e59b5b61a47..c9860c6f7dcb7dd0ec6c42735028e89e6a5c0a0b:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index 7f2583366..5c6cec658 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -201,10 +201,13 @@ sub transactions_for_todo_list { $query = qq|SELECT oe.id, oe.transdate, oe.reqdate, oe.quonumber, oe.transaction_description, oe.amount, + CASE WHEN (COALESCE(0, oe.customer_id) = 0) THEN 'vendor' ELSE 'customer' END AS vc, c.name AS customer, + v.name AS vendor, e.name AS employee FROM oe LEFT JOIN customer c ON (oe.customer_id = c.id) + LEFT JOIN vendor v ON (oe.vendor_id = v.id) LEFT JOIN employee e ON (oe.employee_id = e.id) WHERE (COALESCE(quotation, FALSE) = TRUE) AND (COALESCE(closed, FALSE) = FALSE)