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

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



Revision: 2322
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2322&view=rev
Author:   einhverfr
Date:     2008-09-12 23:14:13 +0000 (Fri, 12 Sep 2008)

Log Message:
-----------
Adding control code and account description to multiple payment interface.

Modified Paths:
--------------
    trunk/UI/payments/payments_detail.html
    trunk/sql/modules/Payment.sql

Modified: trunk/UI/payments/payments_detail.html
===================================================================
--- trunk/UI/payments/payments_detail.html	2008-09-12 22:57:58 UTC (rev 2321)
+++ trunk/UI/payments/payments_detail.html	2008-09-12 23:14:13 UTC (rev 2322)
@@ -162,7 +162,7 @@
     </div>
     <table id="payments_table">
     <tr class="listheading">
-	<th class="account_number"><?lsmb text('Account_number') ?></th>
+	<th class="account"><?lsmb text('Account') ?></th>
 	<th class="entity_name"><?lsmb text('Name') ?></th>
 	<th class="invoice"><?lsmb text('Invoice Total') ?></th>
         <th class="payment"><?lsmb text('Payment') ?></th>
@@ -191,7 +191,8 @@
 			checked = (r.unselected) ? undef : "checked" 
 			
 		} ?>
-		<?lsmb r.account_number ?>
+		<?lsmb r.econtrol_code ?> -- 
+		<?lsmb r.account_number ?> -- <?lsmb r.eca_description ?>
 	</td>
 	<td class="entity_name"><span class="<?lsmb
 		IF r.has_vouchers; 'name_has_vouchers' ; 

Modified: trunk/sql/modules/Payment.sql
===================================================================
--- trunk/sql/modules/Payment.sql	2008-09-12 22:57:58 UTC (rev 2321)
+++ trunk/sql/modules/Payment.sql	2008-09-12 23:14:13 UTC (rev 2322)
@@ -169,6 +169,8 @@
 
 CREATE TYPE payment_contact_invoice AS (
 	contact_id int,
+	econtrol_code text,
+	eca_description text,
 	contact_name text,
 	account_number text,
 	total_due numeric,
@@ -185,7 +187,9 @@
 DECLARE payment_item payment_contact_invoice;
 BEGIN
 	FOR payment_item IN
-		  SELECT c.id AS contact_id, e.name AS contact_name,
+		  SELECT c.id AS contact_id, e.control_code as econtrol_code, 
+			c.description as eca_description, 
+			e.name AS contact_name,
 		         c.meta_number AS account_number,
 		              sum (coalesce(p.due, 0) -
 		              CASE WHEN c.discount_terms 
@@ -268,7 +272,8 @@
 		                                         WHERE accno
 		                                               = in_ar_ap_accno)
 		                    ))
-		GROUP BY c.id, e.name, c.meta_number, c.threshold
+		GROUP BY c.id, e.name, c.meta_number, c.threshold, 
+			e.control_code, c.description
 		  HAVING (in_meta_number IS NULL 
 				OR in_meta_number = c.meta_number) AND 
 			(sum(p.due) > c.threshold


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