Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005136Openbravo ERP09. Financial managementpublic2008-09-22 10:372008-12-12 20:08
galderromo 
dalsasua 
normalmajoralways
closedfixed 
20Gentoo 2.6.24
2.35MP5 
2.40MP1 
Core
No
0005136: General Ledger: Accumulated amounts when using more than a range
When having more than 500 records, the report shows more than a view.
The break between ranges can happend during the same accounting date. On this cases, the new range's amounts are not proparly calculated.
Supposing you have this records on facct_acct:
Date: 11-08-08 fact_acct_id:1000 amount:1000
Date: 11-08-08 fact_acct_id:1001 amount:800
---------------- Range break ----------------
Date: 11:08-08 fact_acct_id:1002 amount:350
Date: 12-08-08 fact_acct_id:1003 amount:100

When the new range is loaded, you previous amount will be 2150 instead of 1800.

Change selectPrevious method on ReportGeneralLedger_data.xsql with:
  <SqlMethod name="selectPrevious" type="preparedStatement" return="multiple">
      <SqlMethodComment></SqlMethodComment>
      <Sql><![CDATA[
      SELECT COALESCE(SUM(AMTACCTDR),0) AS TOTALDR, COALESCE(SUM(AMTACCTCR),0) AS TOTALCR,
      COALESCE(SUM(AMTACCTDR-AMTACCTCR),0) AS TOTAL
      FROM FACT_ACCT
      WHERE 1=1
      AND FACT_ACCT.ACCOUNT_ID = ?
      AND (DATEACCT < ? OR (DATEACCT= ? AND FACT_ACCT_ID < ? ))
      AND FACT_ACCT.AD_ORG_ID IN ('1')
      AND 2=2
      ]]></Sql>
      <Parameter name="bpartner" optional="true" after="1=1"><![CDATA[ AND FACT_ACCT.C_BPARTNER_ID = ? ]]></Parameter>
      <Parameter name="project" optional="true" after="1=1"><![CDATA[ AND FACT_ACCT.C_PROJECT_ID = ? ]]></Parameter>
      <Parameter name="acctschema" optional="true" after="1=1"><![CDATA[ and fact_acct.C_ACCTSCHEMA_ID = ? ]]></Parameter>
      <Parameter name="account"/>
      <Parameter name="date"/>
      <Parameter name="date"/>
      <Parameter name="factacct"/>
      <Parameter name="orgs" type="replace" optional="true" after="AND FACT_ACCT.AD_ORG_ID IN (" text="'1'"/>
      <Parameter name="productId" optional="true" type="argument" after="2=2"><![CDATA[ AND FACT_ACCT.M_PRODUCT_ID IN ]]></Parameter>
      <Parameter name="user1" optional="true" after="2=2"><![CDATA[ AND fact_acct.USER1_ID = ? ]]></Parameter>
      <Parameter name="user2" optional="true" after="2=2"><![CDATA[ AND fact_acct.USER2_ID = ? ]]></Parameter>
   </SqlMethod>
No tags attached.
blocks defect 0005096 closed dalsasua General Ledger: Accumulated amounts when using more than a range 
Issue History
2008-09-22 10:37cromeroNew Issue
2008-09-22 10:37cromeroAssigned To => dalsasua
2008-09-22 10:37cromeroStatusnew => scheduled
2008-10-06 13:11dalsasuaStatusscheduled => resolved
2008-10-06 13:11dalsasuaFixed in Version => 2.40
2008-10-06 13:11dalsasuasvn_revision => 8266
2008-10-06 13:11dalsasuaResolutionopen => fixed
2008-10-06 13:11dalsasuaNote Added: 0009384
2008-10-06 13:17svnbotCheckin
2008-10-06 13:17svnbotNote Added: 0009385
2008-10-06 13:17svnbotsvn_revision8266 => 8267
2008-10-07 07:51svnbotCheckin
2008-10-07 07:51svnbotNote Added: 0009412
2008-10-07 07:51svnbotsvn_revision8267 => 8305
2008-11-06 18:49svnbotCheckin
2008-11-06 18:49svnbotNote Added: 0010056
2008-11-06 18:49svnbotsvn_revision8305 => 9768
2008-11-20 23:18svnbotCheckin
2008-11-20 23:18svnbotNote Added: 0010487
2008-11-20 23:18svnbotsvn_revision9768 => 10375
2008-11-24 16:59svnbotCheckin
2008-11-24 16:59svnbotNote Added: 0010576
2008-11-24 16:59svnbotsvn_revision10375 => 10478
2008-11-25 10:16svnbotCheckin
2008-11-25 10:16svnbotNote Added: 0010602
2008-11-25 10:16svnbotsvn_revision10478 => 10510
2008-11-25 15:06svnbotCheckin
2008-11-25 15:06svnbotNote Added: 0010647
2008-11-25 15:06svnbotsvn_revision10510 => 10549
2008-11-26 08:51svnbotCheckin
2008-11-26 08:51svnbotNote Added: 0010683
2008-11-26 08:51svnbotsvn_revision10549 => 10589
2008-11-26 17:19svnbotCheckin
2008-11-26 17:19svnbotNote Added: 0010726
2008-11-26 17:19svnbotsvn_revision10589 => 10625
2008-11-26 18:30svnbotCheckin
2008-11-26 18:30svnbotNote Added: 0010741
2008-11-26 18:30svnbotsvn_revision10625 => 10637
2008-12-12 20:08psarobeRegression testing => No
2008-12-12 20:08psarobeStatusresolved => closed
2008-12-12 20:08psarobeFixed in Version2.40 => 2.40MP1

Notes
(0009384)
dalsasua   
2008-10-06 13:11   
Repository: openbravo
Revision: 8266
Author: davidalsasua
Date: 2008-10-06 13:09:49 +0200 (Mon, 06 Oct 2008)

Fixes Bug 0005096: General Ledger: Accumulated amounts when using more than a range

---
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=8266&sc=1 [^]
(0009385)
svnbot   
2008-10-06 13:17   
Repository: openbravo
Revision: 8267
Author: davidalsasua
Date: 2008-10-06 13:17:38 +0200 (Mon, 06 Oct 2008)

Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=8267&sc=1 [^]
(0009412)
svnbot   
2008-10-07 07:51   
Repository: openbravo
Revision: 8305
Author: villind
Date: 2008-10-07 07:51:20 +0200 (Tue, 07 Oct 2008)

Merged change 8267. Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
_U branches/bonware/r2.40/
_U branches/bonware/r2.40/eclipse.install.source.launch
_U branches/bonware/r2.40/export.database.launch
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
_U branches/bonware/r2.40/src-core/src/org/openbravo/database/OpenbravoDriverManagerConnectionFactory.java
_U branches/bonware/r2.40/update.database.launch
---

https://dev.openbravo.com/websvn/openbravo/?rev=8305&sc=1 [^]
(0010056)
svnbot   
2008-11-06 18:49   
Repository: openbravo
Revision: 9768
Author: davidalsasua
Date: 2008-11-06 18:49:08 +0100 (Thu, 06 Nov 2008)

Fixes bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=9768&sc=1 [^]
(0010487)
svnbot   
2008-11-20 23:18   
Repository: openbravo
Revision: 10375
Author: villind
Date: 2008-11-20 23:18:11 +0100 (Thu, 20 Nov 2008)

Merged r9768. Fixes bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
_U branches/bonware/r2.40/
_U branches/bonware/r2.40/config/setup-tool/
_U branches/bonware/r2.40/eclipse.install.source.launch
_U branches/bonware/r2.40/export.database.launch
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.xml
_U branches/bonware/r2.40/src-core/src/org/openbravo/database/OpenbravoDriverManagerConnectionFactory.java
_U branches/bonware/r2.40/update.database.launch
---

https://dev.openbravo.com/websvn/openbravo/?rev=10375&sc=1 [^]
(0010576)
svnbot   
2008-11-24 16:59   
Repository: openbravo
Revision: 10478
Author: davidalsasua
Date: 2008-11-24 16:59:40 +0100 (Mon, 24 Nov 2008)

Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
U branches/r2.40/config/Format.xml
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.xml
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/Totals.srpt
U branches/r2.40/web/skins/Default/Openbravo_ERP_240.css
---

https://dev.openbravo.com/websvn/openbravo/?rev=10478&sc=1 [^]
(0010602)
svnbot   
2008-11-25 10:16   
Repository: openbravo
Revision: 10510
Author: davidalsasua
Date: 2008-11-25 10:16:30 +0100 (Tue, 25 Nov 2008)

Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=10510&sc=1 [^]
(0010647)
svnbot   
2008-11-25 15:06   
Repository: openbravo
Revision: 10549
Author: villind
Date: 2008-11-25 15:06:19 +0100 (Tue, 25 Nov 2008)

Merged r10478. Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
_U branches/bonware/r2.40/
U branches/bonware/r2.40/config/Format.xml
_U branches/bonware/r2.40/config/setup-tool/
_U branches/bonware/r2.40/eclipse.install.source.launch
_U branches/bonware/r2.40/export.database.launch
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.html
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.xml
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/Totals.srpt
_U branches/bonware/r2.40/src-core/src/org/openbravo/database/OpenbravoDriverManagerConnectionFactory.java
_U branches/bonware/r2.40/update.database.launch
U branches/bonware/r2.40/web/skins/Default/Openbravo_ERP_240.css
---

https://dev.openbravo.com/websvn/openbravo/?rev=10549&sc=1 [^]
(0010683)
svnbot   
2008-11-26 08:51   
Repository: openbravo
Revision: 10589
Author: davidalsasua
Date: 2008-11-26 08:51:20 +0100 (Wed, 26 Nov 2008)

Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
U branches/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=10589&sc=1 [^]
(0010726)
svnbot   
2008-11-26 17:19   
Repository: openbravo
Revision: 10625
Author: villind
Date: 2008-11-26 17:19:36 +0100 (Wed, 26 Nov 2008)

Merged r10510. Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
_U branches/bonware/r2.40/
_U branches/bonware/r2.40/config/setup-tool/
_U branches/bonware/r2.40/eclipse.install.source.launch
_U branches/bonware/r2.40/export.database.launch
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
_U branches/bonware/r2.40/src-core/src/org/openbravo/database/OpenbravoDriverManagerConnectionFactory.java
_U branches/bonware/r2.40/update.database.launch
---

https://dev.openbravo.com/websvn/openbravo/?rev=10625&sc=1 [^]
(0010741)
svnbot   
2008-11-26 18:30   
Repository: openbravo
Revision: 10637
Author: villind
Date: 2008-11-26 18:30:47 +0100 (Wed, 26 Nov 2008)

Merged r10589. Fixes Bug 0005136: General Ledger: Accumulated amounts when using more than a range

---
_U branches/bonware/r2.40/
_U branches/bonware/r2.40/config/setup-tool/
_U branches/bonware/r2.40/eclipse.install.source.launch
_U branches/bonware/r2.40/export.database.launch
U branches/bonware/r2.40/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger_data.xsql
_U branches/bonware/r2.40/src-core/src/org/openbravo/database/OpenbravoDriverManagerConnectionFactory.java
_U branches/bonware/r2.40/update.database.launch
---

https://dev.openbravo.com/websvn/openbravo/?rev=10637&sc=1 [^]