summaryrefslogtreecommitdiff
path: root/LedgerSMB/IC.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-11 04:54:33 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-06-11 04:54:33 +0000
commitfd63a4a63532aed40786de3f061796d17673eabe (patch)
tree146f2374b8fc71ed0d6ce6c78b2fc37a8cb07615 /LedgerSMB/IC.pm
parent19fe934f445c8f15b476f8cba1c3cbf449a59995 (diff)
Fixing error searching by address
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1263 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/IC.pm')
-rw-r--r--LedgerSMB/IC.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm
index 89f7d1cd..77736e11 100644
--- a/LedgerSMB/IC.pm
+++ b/LedgerSMB/IC.pm
@@ -1239,11 +1239,11 @@ sub all_parts {
ON (p.id = i.parts_id)
JOIN ar a ON (a.id = i.trans_id)
JOIN customer ct
- ON (a.customer_id = ct.id)
+ USING (entity_id)
LEFT JOIN partsgroup pg
ON (p.partsgroup_id = pg.id)
LEFT JOIN employees e
- ON (a.employee_id = e.id)
+ ON (a.person_id = e.entity_id)
$makemodeljoin
WHERE $invwhere|;
$union = "
@@ -1305,14 +1305,14 @@ sub all_parts {
JOIN parts p ON (i.parts_id = p.id)
JOIN oe a ON (i.trans_id = a.id)
JOIN customer ct
- ON (a.customer_id = ct.id)
+ USING (entity_id)
LEFT JOIN partsgroup pg
ON (p.partsgroup_id = pg.id)
LEFT JOIN employees e
ON (a.employee_id = e.id)
$makemodeljoin
WHERE $ordwhere
- AND a.customer_id > 0|;
+ AND a.entity_id IS NOT NULL|;
$union = "
UNION ALL";
}
@@ -1411,14 +1411,14 @@ sub all_parts {
JOIN parts p ON (i.parts_id = p.id)
JOIN oe a ON (i.trans_id = a.id)
JOIN customer ct
- ON (a.customer_id = ct.id)
+ USING (entity_id)
LEFT JOIN partsgroup pg
ON (p.partsgroup_id = pg.id)
LEFT JOIN employees e
ON (a.employee_id = e.id)
$makemodeljoin
WHERE $quowhere
- AND a.customer_id > 0|;
+ AND a.entity_id IS NOT NULL|;
$union = "
UNION ALL";
}