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

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



Revision: 3852
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3852&view=rev
Author:   einhverfr
Date:     2011-10-12 19:18:09 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Merged fix for upgrade to 1.2-1.3-manual.sql

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

Property Changed:
----------------
    branches/1.3/sql/upgrade/1.2-1.3-manual.sql

Modified: branches/1.3/sql/upgrade/1.2-1.3-manual.sql
===================================================================
--- branches/1.3/sql/upgrade/1.2-1.3-manual.sql	2011-10-12 19:01:37 UTC (rev 3851)
+++ branches/1.3/sql/upgrade/1.2-1.3-manual.sql	2011-10-12 19:18:09 UTC (rev 3852)
@@ -26,6 +26,7 @@
 \i sql/modules/Payment.sql
 \i sql/modules/Person.sql
 \i sql/modules/Reconciliation.sql
+
 BEGIN;
 
 -- adding mapping info for import.
@@ -81,7 +82,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
@@ -94,7 +96,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
 


Property changes on: branches/1.3/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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