[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5358] trunk/sql/modules/Report.sql



Revision: 5358
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5358&view=rev
Author:   einhverfr
Date:     2012-12-15 10:22:09 +0000 (Sat, 15 Dec 2012)
Log Message:
-----------
Outstanding reports now return results

Modified Paths:
--------------
    trunk/sql/modules/Report.sql

Modified: trunk/sql/modules/Report.sql
===================================================================
--- trunk/sql/modules/Report.sql	2012-12-15 09:28:26 UTC (rev 5357)
+++ trunk/sql/modules/Report.sql	2012-12-15 10:22:09 UTC (rev 5358)
@@ -403,8 +403,7 @@
       GROUP BY trans_id) p ON p.trans_id = a.id
   JOIN entity_credit_account eca ON a.entity_credit_account = eca.id
   JOIN entity eeca ON eca.entity_id = eeca.id
-  JOIN person ON a.person_id = person.id
-  JOIN entity_employee ON entity_employee.entity_id = person.entity_id
+  JOIN entity_employee ON entity_employee.entity_id = a.person_id
   JOIN entity ee ON entity_employee.entity_id = ee.id
   LEFT
   JOIN entity me ON entity_employee.manager_id = me.id
@@ -415,7 +414,7 @@
            OR eeca.name @@ plainto_tsquery(in_entity_name))
        AND (in_meta_number IS NULL 
           OR eca.meta_number ilike in_meta_number || '%')
-       AND (in_employee_id IS NULL OR ee.entity_id = in_employee_id)
+       AND (in_employee_id IS NULL OR ee.id = in_employee_id)
        AND (in_ship_via IS NULL
           OR a.shipvia @@ plainto_tsquery(in_ship_via))
        AND (in_on_hold IS NULL OR in_on_hold = a.on_hold)

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.