diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-21 01:07:57 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-21 01:07:57 +0000 |
commit | 27e466198957d4d5f6ed3b08bf8f8de191389e3f (patch) | |
tree | bc55ec1beec9767cb1c8ed03ee31eaeb3e8d1571 /sql/modules/Company.sql | |
parent | 5ead0207f91dfecac4cafa8eb95cf7c50866d71f (diff) |
More batch, vendor, and payment reversal fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1987 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules/Company.sql')
-rw-r--r-- | sql/modules/Company.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/modules/Company.sql b/sql/modules/Company.sql index ff2795af..bcb0599e 100644 --- a/sql/modules/Company.sql +++ b/sql/modules/Company.sql @@ -97,6 +97,21 @@ BEGIN END; $$ LANGUAGE PLPGSQL; +CREATE OR REPLACE FUNCTION entity_credit_get_id_by_meta_number +(in_meta_number text, in_account_class int) +returns int AS +$$ +DECLARE out_credit_id int; +BEGIN + SELECT id INTO out_credit_id + FROM entity_credit_account + WHERE meta_number = in_meta_number + AND entity_class = in_account_class; + + RETURN out_credit_id; +END; +$$ LANGUAGE plpgsql; + CREATE OR REPLACE FUNCTION entity_list_contact_class() RETURNS SETOF contact_class AS $$ |