Related to Issue 40623. Use proper date to filter the max aggregated period
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 25 Apr 2019 09:53:25 +0200
changeset 36062 516c6b7277a0
parent 36053 1fbbfb4e42f7
child 36063 b8db7c601aee
Related to Issue 40623. Use proper date to filter the max aggregated period
src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java	Wed Apr 24 13:21:07 2019 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java	Thu Apr 25 09:53:25 2019 +0200
@@ -196,7 +196,7 @@
       String strDateNext = DateTimeData.nDaysAfter(readOnlyCP, strDate, "1");
       String strMaxAggDate = ReportValuationStockData.selectMaxAggregatedDate(readOnlyCP,
           OBDal.getReadOnlyInstance().get(Organization.class, strLegalEntity).getClient().getId(),
-          strDate, orgIds);
+          strDateNext, orgIds);
       if (StringUtils.isEmpty(strMaxAggDate)) {
         DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
         Date maxAggDate = formatter.parse("01-01-0000");