summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-12 23:14:13 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-12 23:14:13 +0000
commit8cf90bc4e677ea04ea73b718b64d59f83c2ec01c (patch)
treeef1edc0474e2a4b5c22447bbb5455a70d95fc4d7
parente6b2f50939b78d5f181070b3aedcd528f5393833 (diff)
Adding control code and account description to multiple payment interface.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2322 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--UI/payments/payments_detail.html5
-rw-r--r--sql/modules/Payment.sql9
2 files changed, 10 insertions, 4 deletions
diff --git a/UI/payments/payments_detail.html b/UI/payments/payments_detail.html
index 6fabf8ca..b63b696a 100644
--- a/UI/payments/payments_detail.html
+++ b/UI/payments/payments_detail.html
@@ -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' ;
diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql
index 19e8530d..24d1d730 100644
--- a/sql/modules/Payment.sql
+++ b/sql/modules/Payment.sql
@@ -169,6 +169,8 @@ Returns all open invoices for the entity in question. $$;
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 @@ BEGIN
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