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

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



Revision: 5481
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5481&view=rev
Author:   einhverfr
Date:     2013-01-05 06:03:57 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Associating customer and vendor accounts with the same entity in trunk now works again

Modified Paths:
--------------
    trunk/UI/Contact/divs/credit.html
    trunk/sql/modules/Company.sql

Modified: trunk/UI/Contact/divs/credit.html
===================================================================
--- trunk/UI/Contact/divs/credit.html	2013-01-04 13:40:23 UTC (rev 5480)
+++ trunk/UI/Contact/divs/credit.html	2013-01-05 06:03:57 UTC (rev 5481)
@@ -49,13 +49,24 @@
                     ec=entity_class;
                  END;
               END;
-              PROCESS input element_data = {
-		type = "hidden"
-		name = "entity_class"
-		value = ec
-	} ?>	
+	?>	
         <table>
 	<tr class="eca_row">
+        <td>
+        <?lsmb 
+
+        PROCESS select element_data = {
+                   id = 'eca-entity-class-id'
+                 name = 'entity_class'
+                 name = "entity_class"
+              options = entity_classes
+       default_values = [ec]
+            text_attr = 'class'
+           value_attr = 'id'
+                label = text('Class')
+        } ?></td>
+
+                
 	<td>
  	<?lsmb PROCESS input element_data = {
 		label = text("$entity_classname Number"), #fixme for i18n

Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql	2013-01-04 13:40:23 UTC (rev 5480)
+++ trunk/sql/modules/Company.sql	2013-01-05 06:03:57 UTC (rev 5481)
@@ -589,11 +589,6 @@
 		FROM entity e 
 		JOIN entity_credit_account ec ON (e.id = ec.entity_id)
 		WHERE e.id = in_entity_id
-			AND ec.entity_class = 
-				CASE WHEN in_entity_class = 3 THEN 2
-				     WHEN in_entity_class IS NULL 
-					THEN ec.entity_class
-				ELSE in_entity_class END
 	LOOP
 
 		RETURN NEXT out_row;

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