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

SF.net SVN: ledger-smb:[6945] trunk/sql/modules/Payment.sql



Revision: 6945
          http://sourceforge.net/p/ledger-smb/code/6945
Author:   einhverfr
Date:     2014-03-19 08:20:08 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Final fixes for natural persons and payments/receipts

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

Modified: trunk/sql/modules/Payment.sql
===================================================================
--- trunk/sql/modules/Payment.sql	2014-03-19 08:01:59 UTC (rev 6944)
+++ trunk/sql/modules/Payment.sql	2014-03-19 08:20:08 UTC (rev 6945)
@@ -54,7 +54,9 @@
  		FROM entity_credit_account ec
  		JOIN entity e ON (ec.entity_id = e.id)
 		WHERE ec.entity_class = in_account_class
-		AND (e.name ilike coalesce('%'||in_vc_name||'%','%%') OR cp.tax_id = in_vc_idn)
+		AND (e.name ilike coalesce('%'||in_vc_name||'%','%%') 
+                    OR EXISTS (select 1 FROM company 
+                                WHERE entity_id = e.id AND tax_id = in_vc_idn))
 	LOOP
 		RETURN NEXT out_entity;
 	END LOOP;

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


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits