From 62d77db4b9504fd0dd28a677bebb064fc584c79c Mon Sep 17 00:00:00 2001
From: einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>
Date: Sat, 8 Mar 2008 01:35:56 +0000
Subject: Correcting ambiguous join in payment_get_all_contact_invoices

git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2102 4979c152-3d1c-0410-bac9-87ea11338e46
---
 sql/modules/Payment.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sql/modules')

diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql
index a0a36b3c..1f31c697 100644
--- a/sql/modules/Payment.sql
+++ b/sql/modules/Payment.sql
@@ -185,7 +185,7 @@ BEGIN
 		            FROM ar
 			   WHERE in_account_class = 2
 			ORDER BY transdate
-		         ) a USING (entity_id)
+		         ) a ON (a.entity_credit_account = c.id)
 		    JOIN transactions t ON (a.id = t.id)
 		  LEFT JOIN voucher v ON (v.trans_id = a.id)
 		   WHERE v.batch_id = in_batch_id
-- 
cgit v1.2.3