summaryrefslogtreecommitdiff
path: root/sql/modules/Company.sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-21 01:07:57 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-21 01:07:57 +0000
commit27e466198957d4d5f6ed3b08bf8f8de191389e3f (patch)
treebc55ec1beec9767cb1c8ed03ee31eaeb3e8d1571 /sql/modules/Company.sql
parent5ead0207f91dfecac4cafa8eb95cf7c50866d71f (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.sql15
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
$$