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

SF.net SVN: ledger-smb:[3849] branches/1.3/sql/upgrade/1.2-1.3.sql



Revision: 3849
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3849&view=rev
Author:   einhverfr
Date:     2011-10-12 18:50:24 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Correcting filter on customer/vendor import

Modified Paths:
--------------
    branches/1.3/sql/upgrade/1.2-1.3.sql

Modified: branches/1.3/sql/upgrade/1.2-1.3.sql
===================================================================
--- branches/1.3/sql/upgrade/1.2-1.3.sql	2011-10-12 13:58:53 UTC (rev 3848)
+++ branches/1.3/sql/upgrade/1.2-1.3.sql	2011-10-12 18:50:24 UTC (rev 3849)
@@ -79,7 +79,8 @@
 
 UPDATE lsmb12.vendor SET credit_id = 
 	(SELECT id FROM entity_credit_account e 
-	WHERE e.meta_number = vendornumber);
+	WHERE e.meta_number = vendornumber and entity_class = 1
+        and e.entity_id = vendor.entity_id);
 
 
 INSERT INTO entity_credit_account
@@ -92,7 +93,7 @@
 
 UPDATE lsmb12.customer SET credit_id = 
 	(SELECT id FROM entity_credit_account e 
-	WHERE e.meta_number = customernumber AND customer.entity_id = e.entity_id);
+	WHERE e.meta_number = customernumber AND customer.entity_id = e.entity_id and entity_class = 2);
 
 --Company
 

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