Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002498Openbravo ERP07. Sales managementpublic2008-01-11 17:442008-11-06 15:36
egoitz 
rafaroda 
normalminoralways
closedfixed 
5
 
2.40alpha-r2 
No
Core
No
0002498: Error in the group by and order by on OrderEdition_data.xsql
Steps:
Sales Managament>Analysis tool>Sales Order Report

Description:


In the query to generate a report for sales orders the fields in the group by clause
are not in a correct order. The result is a wrong report when different sales orders
with different prices for the same products occur. These sales orders are split up
into more entries. The SOLUTION is to change the group by clause (OrderEdition_data.xsql) with:

      GROUP BY C_BPARTNER.NAME, C_ORDER.DOCUMENTNO, M_PRODUCT.NAME,C_ORDERLINE.PRICEACTUAL, C_UOM.NAME, C_ORDER.DATEORDERED
      ORDER BY C_BPARTNER.NAME, C_ORDER.DOCUMENTNO, M_PRODUCT.NAME,C_ORDERLINE.PRICEACTUAL, C_UOM.NAME, C_ORDER.DATEORDERED

Enviroment:
v2.35
oracle xe 10
windows xp
firefox 2.0


No tags attached.
depends on backport 0003593 closed rafaroda Error in OrderEdition_data.xsql 
Issue History
2008-11-06 15:36psarobeRegression testing => No
2008-11-06 15:36psarobeStatusresolved => closed

Notes
(0006087)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1869432 [^]
(0002997)
rafaroda   
2008-01-14 10:50   
(edited on: 2008-06-12 09:24)
Logged In: YES
user_id=1892190
Originator: NO

*Steps to reproduce this bug
1. Sales Management > Transactions > Sales Order
2. Create a new 'Standar Order' selecting a Business Partner.
3. Add some product lines within 'Lines' tab.
4. Come back to 'Header' tab and create a new 'Standar Order' selecting the same Business Partner (no need to 'Complete' previous 'Sale Order').
5. Add some product lines within 'Lines' tab including one product of the previous Sale Order.
6. Sales Management > Analysis Tools > Sales Order Report
7. After selecting the mentioned Business Partner, generate the HTML report without any extra filter.

Notice that sale orders lines are split within the report that is an incorrect behaviour. See attach.
File Added: SOReport.png
(0002998)
rafaroda   
2008-01-14 12:47   
(edited on: 2008-06-12 09:24)
Logged In: YES
user_id=1892190
Originator: NO

Changed 'GROUP BY' and 'ORDER BY' clause in 'OrderEdition_data.xsql'.