diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-04 21:29:12 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-04 21:29:12 +0000 |
commit | 9962480601cef59d4637bb4360e3808be3c9f320 (patch) | |
tree | ace6f3d5b735d005afaceae4d2ca06db53b5c069 | |
parent | f7bc0cb1fa77b34187f92b486733529a6124e2cf (diff) |
Getting most of AR and AP to work with new contact management scheme
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1252 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/AA.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm index 1165b232..ed49c986 100644 --- a/LedgerSMB/AA.pm +++ b/LedgerSMB/AA.pm @@ -720,16 +720,19 @@ sub transactions { SELECT a.id, a.invnumber, a.ordnumber, a.transdate, a.duedate, a.netamount, a.amount, ($paid) AS paid, a.invoice, a.datepaid, a.terms, a.notes, - a.shipvia, a.shippingpoint, e.name AS employee, - vc.name, - a.$form->{vc}_id, a.till, m.name AS manager, a.curr, + a.shipvia, a.shippingpoint, ee.name AS employee, + vce.name, + a.entity_id, a.till, me.name AS manager, a.curr, ex.$buysell AS exchangerate, d.description AS department, a.ponumber $acc_trans_flds FROM $table a - JOIN $form->{vc} vc ON (a.$form->{vc}_id = vc.id) - LEFT JOIN employees e ON (a.employee_id = e.id) - LEFT JOIN employees m ON (e.managerid = m.id) + JOIN $form->{vc} vc USING (entity_id) + LEFT JOIN employee e ON (a.person_id = e.entity_id) + LEFT JOIN employee m ON (e.managerid = m.id) + JOIN entity ee ON (e.entity_id = ee.id) + JOIN entity me ON (m.entity_id = me.id) + JOIN entity vce ON (vc.entity_id = vce.id) LEFT JOIN exchangerate ex ON (ex.curr = a.curr AND ex.transdate = a.transdate) LEFT JOIN department d ON (a.department_id = d.id) |