summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-08 03:54:36 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-08 03:54:36 +0000
commite964c302d019f30476b62c6111f05e6ca9d966fe (patch)
tree8e34f99eb600775b82df8a9c75ad4235af561a11
parent9b4ea8318ecaa22f73dd807da119d3ee0acbe95e (diff)
Correcting customer/vendor views
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1540 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--sql/Pg-database.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index 39c08f4c..d4df3ea5 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -489,7 +489,7 @@ CREATE VIEW customer AS
ein.note as invoice_notes
FROM entity_credit_account emd
join entity_bank_account eba on emd.entity_id = eba.entity_id
- join entity_note ein on ein.ref_key = emd.entity_id
+ Left join entity_note ein on ein.ref_key = emd.entity_id
join company c on c.entity_id = emd.entity_id
where emd.entity_class = 2;
@@ -517,7 +517,7 @@ CREATE VIEW vendor AS
invoice_notes
FROM entity_credit_account emd
join entity_bank_account eba on emd.entity_id = eba.entity_id
- join entity_note ein on ein.ref_key = emd.entity_id
+ left join entity_note ein on ein.ref_key = emd.entity_id
join company c on c.entity_id = emd.entity_id
where emd.entity_class = 1;