Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010334Openbravo ERP09. Financial managementpublic2009-08-19 13:122009-08-27 00:00
networkb 
dalsasua 
immediatemajoralways
closedfixed 
20rPath Linux
pi 
2.50MP4main 
Core
No
0010334: Date range build in Cash Flow Statement Report not working for mm/dd/yyyy date formats
Cash Flow Statement Report doesn't work for date formats different from dd/mm/yyyy.
Go To: Financial Management || Accounting || Analysis Tools || User Defined Accounting Report Setup || User Defined Accounting Report Setup
Create one report on a monthly basis.
  Structure proposed for a report with just two nodes:
    Root - Check Active, Shown, Report, Reporting Interval Monthly, Summary
      |-> Node - Check just Active, Shown. Choose expenses account (60000 in SmallBazaar)
Go To: Financial Management || Accounting || Analysis Tools || Generate Cash Flow Statement > Generate Cash Flow Statement and run the process
Go to: Financial Management || Accounting || Analysis Tools || Cash Flow Statement > Cash Flow Statement
Obtain the report for a concrete month.
Realize that no data is obtained.
Change report to annually
Repeat process
Obtain the report.
Check that data is obtained.
Go To org.openbravo.erpCommon.ad_reports.ReportCashFlow
Change lines 200-215 in order to obtain the ranges for non-annual reports in a generic way. Currently, the code is like:

    if (strAccountingType.equals("Q")) {
      String strAux = ReportCashFlowData.selectMax(this, strPeriod);
      strPeriodFrom = "01/" + ReportCashFlowData.selectMin(this, strPeriod) + "/" + strYear;
      strPeriodTo = ReportCashFlowData.lastDay(this, "01/" + strAux + "/" + strYear, vars
          .getSqlDateFormat());
      strPeriodTo = DateTimeData.nDaysAfter(this, strPeriodTo, "1");
    } else if (strAccountingType.equals("M")) {
      strPeriodFrom = "01/" + strPeriod + "/" + strYear;
      strPeriodTo = ReportCashFlowData.lastDay(this, strPeriodFrom, vars.getSqlDateFormat());
      strPeriodTo = DateTimeData.nDaysAfter(this, strPeriodTo, "1");
    } else {
      strPeriodFrom = "01/01/" + strPeriod;
      strPeriodTo = DateTimeData.nDaysAfter(this, "31/12/" + strPeriod, "1");
    }
No tags attached.
Issue History
2009-08-19 13:12networkbNew Issue
2009-08-19 13:12networkbAssigned To => rafaroda
2009-08-19 13:14rafarodaAssigned Torafaroda => dalsasua
2009-08-19 13:14rafarodaStatusnew => scheduled
2009-08-19 14:03networkbPriorityurgent => immediate
2009-08-20 09:25networkbTarget Versionpi => 2.50MP4
2009-08-21 00:29hgbotCheckin
2009-08-21 00:29hgbotNote Added: 0019158
2009-08-21 00:29hgbotStatusscheduled => resolved
2009-08-21 00:29hgbotResolutionopen => fixed
2009-08-21 00:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd26cb28278ae937c9c74aabf2984cc021d86fe9 [^]
2009-08-26 11:23sureshbabuStatusresolved => closed
2009-08-26 11:23sureshbabuNote Added: 0019229
2009-08-26 11:23sureshbabuFixed in Version => main
2009-08-27 00:00anonymoussf_bug_id0 => 2845205

Notes
(0019158)
hgbot   
2009-08-21 00:29   
Repository: erp/devel/pi
Changeset: cd26cb28278ae937c9c74aabf2984cc021d86fe9
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Fri Aug 21 00:29:38 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd26cb28278ae937c9c74aabf2984cc021d86fe9 [^]

Fixes issue 10334: Date range build in Cash Flow Statement Report not working for mm/dd/yyyy date formats

---
M src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java
M src/org/openbravo/erpCommon/ad_reports/ReportCashFlow_data.xsql
---
(0019229)
sureshbabu   
2009-08-26 11:23   
Tested working fine