[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3007] trunk/LedgerSMB/GL.pm
- Subject: SF.net SVN: ledger-smb:[3007] trunk/LedgerSMB/GL.pm
- From: ..hidden..
- Date: Tue, 25 May 2010 21:45:47 +0000
Revision: 3007
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3007&view=rev
Author: einhverfr
Date: 2010-05-25 21:45:47 +0000 (Tue, 25 May 2010)
Log Message:
-----------
Alexey's fixes for GL report fialures when running via project
Modified Paths:
--------------
trunk/LedgerSMB/GL.pm
Modified: trunk/LedgerSMB/GL.pm
===================================================================
--- trunk/LedgerSMB/GL.pm 2010-05-25 21:16:55 UTC (rev 3006)
+++ trunk/LedgerSMB/GL.pm 2010-05-25 21:45:47 UTC (rev 3007)
@@ -449,11 +449,12 @@
$approved = $dbh->quote($form->{approved});
}
- my $query = qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference::int,
+ my $query = qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference,
g.description, ac.transdate, ac.source,
ac.amount, c.accno, c.gifi_accno, g.notes, c.link,
'' AS till, ac.cleared, d.description AS department,
- ac.memo, c.description AS accname, ac.trans_id, ac.chart_id, ac.entry_id
+ ac.memo, c.description AS accname, ac.trans_id,
+ ac.chart_id, ac.entry_id
FROM gl AS g
JOIN acc_trans ac ON (g.id = ac.trans_id)
JOIN chart c ON (ac.chart_id = c.id)
@@ -467,15 +468,17 @@
UNION ALL
- SELECT a.id, 'ar' AS type, a.invoice, a.invnumber::int,
+ SELECT a.id, 'ar' AS type, a.invoice, a.invnumber,
e.name, ac.transdate, ac.source,
ac.amount, c.accno, c.gifi_accno, a.notes, c.link,
a.till, ac.cleared, d.description AS department,
- ac.memo, c.description AS accname, ac.trans_id, ac.chart_id, ac.entry_id
+ ac.memo, c.description AS accname, ac.trans_id,
+ ac.chart_id, ac.entry_id
FROM ar a
JOIN acc_trans ac ON (a.id = ac.trans_id)
JOIN chart c ON (ac.chart_id = c.id)
- JOIN entity_credit_account ec ON (a.entity_credit_account = ec.id)
+ JOIN entity_credit_account ec ON
+ (a.entity_credit_account = ec.id)
JOIN entity e ON (ec.entity_id = e.id)
LEFT JOIN department d ON (d.id = a.department_id)
WHERE $arwhere
@@ -487,15 +490,17 @@
UNION ALL
- SELECT a.id, 'ap' AS type, a.invoice, a.invnumber::int,
+ SELECT a.id, 'ap' AS type, a.invoice, a.invnumber,
e.name, ac.transdate, ac.source,
ac.amount, c.accno, c.gifi_accno, a.notes, c.link,
a.till, ac.cleared, d.description AS department,
- ac.memo, c.description AS accname, ac.trans_id, ac.chart_id, ac.entry_id
+ ac.memo, c.description AS accname, ac.trans_id,
+ ac.chart_id, ac.entry_id
FROM ap a
JOIN acc_trans ac ON (a.id = ac.trans_id)
JOIN chart c ON (ac.chart_id = c.id)
- JOIN entity_credit_account ec ON (a.entity_credit_account = ec.id)
+ JOIN entity_credit_account ec ON
+ (a.entity_credit_account = ec.id)
JOIN entity e ON (ec.entity_id = e.id)
LEFT JOIN department d ON (d.id = a.department_id)
WHERE $apwhere
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.