diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-29 07:37:44 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-29 07:37:44 +0000 |
commit | adcdb4574294942cee0efeeb7bc805a265b1c9d9 (patch) | |
tree | dfa65b7a1a94682180563e41d75e75aca389bc6f /sql | |
parent | c5733b59242a43f386a2e5cf5be35b80e8ba93d4 (diff) |
Removing duplicate drawer open
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1917 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r-- | sql/Pg-database.sql | 3 | ||||
-rw-r--r-- | sql/modules/Payment.sql | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index 61edb2e7..96dea912 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -614,6 +614,7 @@ CREATE TABLE ar ( on_hold bool default false, reverse bool default false, approved bool default true, + credit_account int references entity_credit_account(id) not null, description text ); @@ -649,7 +650,7 @@ CREATE TABLE ap ( reverse bool default false, terms int2 DEFAULT 0, description text, - credit_account int + credit_account int references entity_credit_account(id) ); COMMENT ON COLUMN ap.entity_id IS $$ Used to be customer_id, but customer is now metadata. You need to push to entity $$; diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql index 7accdae1..b2f643ab 100644 --- a/sql/modules/Payment.sql +++ b/sql/modules/Payment.sql @@ -61,7 +61,7 @@ CREATE TYPE payment_invoice AS ( ); CREATE OR REPLACE FUNCTION payment_get_open_invoices -(in_account_class int, in_entity_id int, in_curr char(3)) +(in_account_class int, in_entity_credit_id int, in_curr char(3)) RETURNS SETOF payment_invoice AS $$ DECLARE payment_inv payment_invoice; |