diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-07 17:23:00 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-07 17:23:00 +0000 |
commit | b3a2eb9f716913a36e8e8dc382f5ebc376f45ce0 (patch) | |
tree | fc85c0675602cb5aba07c899d066968b675ba605 /LedgerSMB | |
parent | 93307bb7725a770afe28916dab82381477ac0e12 (diff) |
Fixing recurring transactions
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1532 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/AM.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm index bdfc1aa2..4f063c56 100644 --- a/LedgerSMB/AM.pm +++ b/LedgerSMB/AM.pm @@ -1290,7 +1290,7 @@ sub recurring_transactions { $query = qq| SELECT 'ar' AS module, 'ar' AS transaction, a.invoice, - n.name AS description, a.amount, + e.name AS description, a.amount, s.*, se.formname AS recurringemail, sp.formname AS recurringprint, s.nextdate - current_date AS overdue, @@ -1300,7 +1300,7 @@ sub recurring_transactions { AS expired FROM recurring s JOIN ar a ON (a.id = s.id) - JOIN customer n USING (entity_id) + JOIN entity e ON (a.entity_id = e.id) LEFT JOIN recurringemail se ON (se.id = s.id) LEFT JOIN recurringprint sp ON (sp.id = s.id) LEFT JOIN exchangerate ex @@ -1309,7 +1309,7 @@ sub recurring_transactions { UNION SELECT 'ap' AS module, 'ap' AS transaction, a.invoice, - n.name AS description, a.amount, + e.name AS description, a.amount, s.*, se.formname AS recurringemail, sp.formname AS recurringprint, s.nextdate - current_date AS overdue, 'vendor' AS vc, @@ -1318,7 +1318,7 @@ sub recurring_transactions { AS expired FROM recurring s JOIN ap a ON (a.id = s.id) - JOIN vendor n ON (n.id = a.vendor_id) + JOIN entity e ON (a.entity_id = e.id) LEFT JOIN recurringemail se ON (se.id = s.id) LEFT JOIN recurringprint sp ON (sp.id = s.id) LEFT JOIN exchangerate ex ON @@ -1345,7 +1345,7 @@ sub recurring_transactions { UNION SELECT 'oe' AS module, 'so' AS transaction, FALSE AS invoice, - n.name AS description, a.amount, + e.name AS description, a.amount, s.*, se.formname AS recurringemail, sp.formname AS recurringprint, s.nextdate - current_date AS overdue, @@ -1355,7 +1355,7 @@ sub recurring_transactions { AS expired FROM recurring s JOIN oe a ON (a.id = s.id) - JOIN customer USING (entity_id) + JOIN entity e ON (a.entity_id = e.id) LEFT JOIN recurringemail se ON (se.id = s.id) LEFT JOIN recurringprint sp ON (sp.id = s.id) LEFT JOIN exchangerate ex ON @@ -1365,7 +1365,7 @@ sub recurring_transactions { UNION SELECT 'oe' AS module, 'po' AS transaction, FALSE AS invoice, - n.name AS description, a.amount, + e.name AS description, a.amount, s.*, se.formname AS recurringemail, sp.formname AS recurringprint, s.nextdate - current_date AS overdue, 'vendor' AS vc, @@ -1374,7 +1374,7 @@ sub recurring_transactions { AS expired FROM recurring s JOIN oe a ON (a.id = s.id) - JOIN vendor n ON (n.id = a.vendor_id) + JOIN entity e ON (a.entity_id = e.id) LEFT JOIN recurringemail se ON (se.id = s.id) LEFT JOIN recurringprint sp ON (sp.id = s.id) LEFT JOIN exchangerate ex ON |