From 96f9480b7c2d8a62e34133d6dfd16f1dee23a330 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 26 Jun 2008 17:19:35 +0000 Subject: Adding customer/vendor search capabilities to multiple payment interface. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2176 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/Payment.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql index e7e962b0..2ab6cf69 100644 --- a/sql/modules/Payment.sql +++ b/sql/modules/Payment.sql @@ -142,7 +142,7 @@ CREATE TYPE payment_contact_invoice AS ( 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 @@ BEGIN 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 -- cgit v1.2.3