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

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



Revision: 2176
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2176&view=rev
Author:   einhverfr
Date:     2008-06-26 10:19:35 -0700 (Thu, 26 Jun 2008)

Log Message:
-----------
Adding customer/vendor search capabilities to multiple payment interface.

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

Modified: trunk/UI/payments/payments_filter.html
===================================================================
--- trunk/UI/payments/payments_filter.html	2008-06-26 17:02:41 UTC (rev 2175)
+++ trunk/UI/payments/payments_filter.html	2008-06-26 17:19:35 UTC (rev 2176)
@@ -58,6 +58,20 @@
 </div>
 <?lsmb END ?>
 
+<?lsmb IF account_class == 1 ?>
+<?lsmb vendor_customer_code = text("Vendor Number") # " ?>
+<?lsmb ELSIF account_class == 2 ?>
+<?lsmb vendor_customer_code = text("Customer Number") # " ?>
+<?lsmb END ?>
+
+<?lsmb PROCESS input element_data = {
+	name = "meta_number"
+	type = "text"
+	value = meta_number
+	label = vendor_customer_code
+	size = '15'
+} ?>
+
 <?lsmb IF businesses ?>
 <div id = "payments-filter-businesses" class="input">
   <label for="businesses"><?lsmb text('Business Class') ?></label>

Modified: trunk/sql/modules/Payment.sql
===================================================================
--- trunk/sql/modules/Payment.sql	2008-06-26 17:02:41 UTC (rev 2175)
+++ trunk/sql/modules/Payment.sql	2008-06-26 17:19:35 UTC (rev 2176)
@@ -142,7 +142,7 @@
 CREATE OR REPLACE FUNCTION payment_get_all_contact_invoices
 (in_account_class int, in_business_id int, in_currency char(3),
 	in_date_from date, in_date_to date, in_batch_id int, 
-	in_ar_ap_accno text)
+	in_ar_ap_accno text, in_meta_number text)
 RETURNS SETOF payment_contact_invoice AS
 $$
 DECLARE payment_item payment_contact_invoice;
@@ -215,6 +215,8 @@
 			 AND p.due <> 0
 		         AND a.amount <> a.paid 
 			 AND NOT a.on_hold
+			 AND (in_meta_number IS NULL 
+				OR in_meta_number = c.meta_number)
 			 AND NOT (t.locked_by IS NOT NULL AND t.locked_by IN 
 				(select "session_id" FROM "session"
 				WHERE users_id IN 


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