summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-07 23:06:25 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-07 23:06:25 +0000
commitd0a768c8d1d03468892c12ee0224f70c1586d9aa (patch)
tree1959e1286a830b94a2359493316c9bae88511945 /sql
parent168f6163adc860f2a476f683397b153552bfe976 (diff)
Correcting get_billing_info function
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2241 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r--sql/modules/Company.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/modules/Company.sql b/sql/modules/Company.sql
index 45eebee7..ec530841 100644
--- a/sql/modules/Company.sql
+++ b/sql/modules/Company.sql
@@ -267,8 +267,8 @@ BEGIN
a.city, a.state, a.mail_code, cc.name
into out_var
FROM company c
- JOIN company eca ON (eca.entity_id = c.entity_id)
- JOIN company_to_location cl ON (eca.id = cl.credit_id)
+ JOIN entity_credit_account eca ON (eca.entity_id = c.entity_id)
+ JOIN eca_to_location cl ON (eca.id = cl.credit_id)
JOIN location a ON (a.id = cl.location_id)
JOIN country cc ON (cc.id = a.country_id)
WHERE eca.id = in_id AND location_class = 1;