commit for MIFOSX-1941 (Incorrect GL Account running balance figures)
This commit is contained in:
+4
-2
@@ -111,8 +111,10 @@ public class GLAccountReadPlatformServiceImpl implements GLAccountReadPlatformSe
|
|||||||
String sql = "select " + rm.schema();
|
String sql = "select " + rm.schema();
|
||||||
// append SQL statement for fetching account totals
|
// append SQL statement for fetching account totals
|
||||||
if (associationParametersData.isRunningBalanceRequired()) {
|
if (associationParametersData.isRunningBalanceRequired()) {
|
||||||
sql = sql + " and gl_j.id in (select t1.id from (SELECT t2.id , max(concat(t2.entry_date,t2.id)) "
|
sql = sql + " and gl_j.id in (select t1.id from (select t2.account_id, max(t2.id) as id from "
|
||||||
+ "FROM acc_gl_journal_entry t2 WHERE is_running_balance_calculated = 1 GROUP BY t2.account_id DESC) t1)";
|
+ "(select id, max(entry_date) as entry_date, account_id from acc_gl_journal_entry where is_running_balance_calculated = 1 "
|
||||||
|
+ "group by account_id desc) t3 inner join acc_gl_journal_entry t2 on t2.account_id = t3.account_id and t2.entry_date = t3.entry_date "
|
||||||
|
+ "group by t2.account_id desc) t1)";
|
||||||
}
|
}
|
||||||
final Object[] paramaterArray = new Object[3];
|
final Object[] paramaterArray = new Object[3];
|
||||||
int arrayPos = 0;
|
int arrayPos = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user