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

SF.net SVN: ledger-smb:[3851] trunk



Revision: 3851
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3851&view=rev
Author:   einhverfr
Date:     2011-10-12 19:01:37 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/sql/upgrade/1.2-1.3.sql

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/employee.pm


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3847
   + /branches/1.3:3711-3850

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2011-10-12 18:54:50 UTC (rev 3850)
+++ trunk/Changelog	2011-10-12 19:01:37 UTC (rev 3851)
@@ -17,6 +17,8 @@
 * String standardization in employee/user management (Herman V)
 * Fixed Employee record duplicted on save (Herman V)
 * Fixed upgrade script not bringing in entity.name for employees (Chris T)
+* Fixed upgrade script error importing duplicate customer/vendor numbers
+(Chris T2)
 
 Changelog for LedgerSMB 1.3.0
 


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3843-3847
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3843-3850
/branches/1.3/scripts/employee.pl:3842-3843

Modified: trunk/sql/upgrade/1.2-1.3.sql
===================================================================
--- trunk/sql/upgrade/1.2-1.3.sql	2011-10-12 18:54:50 UTC (rev 3850)
+++ trunk/sql/upgrade/1.2-1.3.sql	2011-10-12 19:01:37 UTC (rev 3851)
@@ -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.