Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0004859
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementminoralways2008-09-08 17:362008-12-03 13:56
ReporterrafarodaView Statuspublic 
Assigned Tocromero 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision7352
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.5
OS VersionUbuntu 7.10Database version8.3Ant version1.7
Product VersionpiSCM revision7008 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0004859: 'Purchase Order Report' does not work in PostgreSQL

Description'Purchase Order Report' does not work in PostgreSQL if you select any of the filters that points to an ID. In Oracle it works. Take into account that this filter window is WAD generated.

This is a regression since in Openbravo ERP 2.40 production it worked both in PostgreSQL and Oracle.

Steps To Reproduce1) Go to 'Procurement Management || Analysis Tools || Purchase Order Report', do not select any filter and click on 'OK' button.
Report works correctly.

2) Launch the same report selecting any of the filters that points to an ID (e.g., Business Partner or Project).
Report breaks with error: ERROR org.openbravo.erpCommon.utility.PrintJR - Error captured: javax.servlet.ServletException: Error executing SQL statement for : ReportPurchaseOrder

Take into account that this filter window is WAD generated.
Proposed SolutionThe problem is in the dates, that it is always using them in the query even when you don't specify anything.

As easy workaround you can set always the dates with any value and it will work fine.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0005066 closedcromero 'Purchase Order Report' does not work in PostgreSQL 
related to defect 0005408 closedHennadzi Date filters do no work in 'Purchase Order Report' 

-  Notes
(0009034)
cromero (reporter)
2008-09-16 13:09

This is the DB error:
SELECT C_ORDER.DOCUMENTNO AS DOCUMENTNO, C_ORDER.DATEORDERED AS DATEORDERED, C_BPARTNER.NAME AS CLIENT_NAME, SUM(C_ORDERLINE.QTYORDERED) AS QUANTITYORDER,
          C_ORDERLINE.PRICEACTUAL AS PRICEACTUAL, SUM(C_ORDERLINE.LINENETAMT) AS PRICELIST, M_PRODUCT.NAME AS PRODUCT_NAME, C_UOM.NAME AS UOMNAME
        FROM C_ORDER, C_ORDERLINE, C_BPARTNER, M_PRODUCT, C_UOM
        WHERE C_ORDER.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
          AND C_ORDER.C_ORDER_ID = C_ORDERLINE.C_ORDER_ID
          AND C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
          AND C_ORDERLINE.C_UOM_ID = C_UOM.C_UOM_ID
          AND 1=1 AND C_ORDER.C_BPARTNER_ID = 1000008


          AND C_ORDER.DATEORDERED >= $1
          AND C_ORDER.DATEORDERED <= $2
          AND C_ORDER.ISSOTRX = 'N'
        GROUP BY C_BPARTNER.NAME, C_ORDERLINE.PRICEACTUAL, M_PRODUCT.NAME, C_UOM.NAME, C_ORDER.DOCUMENTNO, C_ORDER.DATEORDERED
        ORDER BY C_BPARTNER.NAME, C_ORDER.DATEORDERED


The problem is in the ReportPurchaseOrder.jrxml where it is harcoded:
  AND C_ORDER.DATEORDERED >= $P{DateFrom}
  AND C_ORDER.DATEORDERED <= $P{DateTo}

It could be replace by:
  AND C_ORDER.DATEORDERED >= TO_DATE($P{DateFrom})
  AND C_ORDER.DATEORDERED <= TO_DATE($P{DateTo})

but both parameters should be also optionals.
(0009035)
svnbot (reporter)
2008-09-16 13:56

Repository: openbravo
Revision: 7352
Author: cromeroherrero
Date: 2008-09-16 13:56:17 +0200 (Tue, 16 Sep 2008)

Fixed bug 4859: 'Purchase Order Report' does not work in PostgreSQL

---
U trunk/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml
---

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

- Issue History
Date Modified Username Field Change
2008-09-08 17:36 rafaroda New Issue
2008-09-08 17:36 rafaroda Assigned To => cromero
2008-09-08 17:36 rafaroda sf_bug_id 0 => 2100474
2008-09-08 17:36 rafaroda Regression testing => No
2008-09-16 13:09 cromero Note Added: 0009034
2008-09-16 13:53 cromero Status new => scheduled
2008-09-16 13:53 cromero fix_in_branch => trunk
2008-09-16 13:55 cromero Severity major => minor
2008-09-16 13:55 cromero fix_in_branch trunk =>
2008-09-16 13:55 cromero Steps to Reproduce Updated
2008-09-16 13:56 svnbot Checkin
2008-09-16 13:56 svnbot Note Added: 0009035
2008-09-16 13:56 svnbot Status scheduled => resolved
2008-09-16 13:56 svnbot Resolution open => fixed
2008-09-16 13:56 svnbot svn_revision => 7352
2008-10-03 16:03 rafaroda Relationship added related to 0005408
2008-12-03 13:56 krishna Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker