Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0000598Openbravo ERPB. User interfacepublic2008-06-11 19:152008-12-02 13:02
mpeccorini 
cromero 
normalmajoralways
closedfixed 
10XP
2.40alpha-r2 
2.40pi 
No
Core
No
0000598: Sales order's detail line's filter fails and sales line items are not shown
After installing with the demo database, item lines in the sales order entry cannot be shown. Navigating to the screen will show a grid with 18 empty lines and the record counter showing (1-18/0) even though the sales order has one detail line.

When trying to use the filter it will show an alert saying "ERROR: el operador no existe: numeric >= character varying". Also note the error is in Spanish.

I tried the Purchase Order screen and it shows the same behaviour.
1. Go to Sales Management/Transactions/Sales Order
2. Open the first Sales Order (or any other order with line items)
3. Navigate to the "Lines" tab (a grid with 18 empty lines will show)
4. Click on the "Search" button
5. Enter the following filters: Line No. From = 10; To = 10; Line Net Amount From = 0; To 100000
6. Click Ok
No tags attached.
Issue History
2008-06-11 19:15mpeccoriniNew Issue
2008-06-11 19:15mpeccoriniAssigned To => cromero
2008-06-11 23:37jpabloaeNote Added: 0000507
2008-06-12 02:20cromeroStatusnew => scheduled
2008-06-12 02:20cromeroTarget Version => 2.40
2008-06-12 02:24svnbotCheckin
2008-06-12 02:24svnbotNote Added: 0000513
2008-06-12 02:24svnbotStatusscheduled => resolved
2008-06-12 02:24svnbotResolutionopen => fixed
2008-06-12 02:24svnbotsvn_revision => 4994
2008-08-20 18:56psarobeRegression testing => No
2008-08-20 18:56psarobeStatusresolved => closed
2008-08-20 18:56psarobeFixed in Version => trunk
2008-12-02 13:02jaimetorresf_bug_id0 => 2377055

Notes
(0000507)
jpabloae   
2008-06-11 23:37   
log4j message of the error:

18:36:18 [ajp-8009-2] ERROR org.openbravo.erpCommon.utility.ExecuteQuery - SQL error in query: SELECT CAST(C_OrderLine.Line AS INTEGER) AS Line , C_OrderLine.M_Product_ID AS M_Product_ID , TO_CHAR(td0.Name) AS M_Product_ID_R , TO_NUMBER(C_OrderLine.QtyOrdered) AS QtyOrdered , C_OrderLine.C_UOM_ID AS C_UOM_ID , (CASE WHEN td_trl2.Name IS NULL THEN TO_CHAR(td1.Name) ELSE TO_CHAR(td_trl2.Name) END) AS C_UOM_ID_R , TO_NUMBER(C_OrderLine.PriceActual) AS PriceActual , C_OrderLine.C_Tax_ID AS C_Tax_ID , (CASE WHEN td_trl4.Name IS NULL THEN TO_CHAR(td3.Name) ELSE TO_CHAR(td_trl4.Name) END) AS C_Tax_ID_R , TO_NUMBER(C_OrderLine.LineNetAmt) AS LineNetAmt , TO_CHAR(C_OrderLine.C_OrderLine_ID) AS C_OrderLine_ID
FROM C_OrderLine
left join (SELECT M_Product_ID, Name FROM M_Product) td0 on C_OrderLine.M_Product_ID = td0.M_Product_ID
 
left join (SELECT C_UOM_ID, Name FROM C_UOM) td1 on C_OrderLine.C_UOM_ID = td1.C_UOM_ID
 
left join (SELECT AD_Language, C_UOM_ID, Name FROM C_UOM_Trl) td_trl2 on td1.C_UOM_ID = td_trl2.C_UOM_ID AND td_trl2.AD_Language = ?
left join (SELECT C_Tax_ID, Name FROM C_Tax) td3 on C_OrderLine.C_Tax_ID = td3.C_Tax_ID
left join (SELECT AD_Language, C_Tax_ID, Name FROM C_Tax_Trl) td_trl4 on td3.C_Tax_ID = td_trl4.C_Tax_ID AND td_trl4.AD_Language = ?
WHERE (C_OrderLine.C_OrderLine_ID) IN (SELECT C_OrderLine.C_OrderLine_ID
 FROM C_OrderLine
left join (SELECT M_Product_ID, Name FROM M_Product) td0 on C_OrderLine.M_Product_ID = td0.M_Product_ID
 
 WHERE C_OrderLine.AD_Client_ID IN (0,1000000)
 AND C_OrderLine.AD_Org_ID IN (0,1000000,1000002,1000003,1000004,1000005,1000006,1000008,1000009,1000007)
 AND C_OrderLine.C_Order_ID = ?
 AND C_OrderLine.Line >= ?
ORDER BY TO_CHAR(td0.Name) DESC, C_OrderLine.C_OrderLine_ID LIMIT TO_NUMBER(?) OFFSET TO_NUMBER(?))
ORDER BY TO_CHAR(td0.Name) DESC, C_OrderLine.C_OrderLine_IDException:org.postgresql.util.PSQLException: ERROR: operator does not exist: numeric >= character varying
18:36:18 [ajp-8009-2] ERROR org.openbravo.base.secureApp.HttpSecureAppServlet - Error in print page data: javax.servlet.ServletException: @CODE=0@ERROR: operator does not exist: numeric >= character varying
18:36:18 [ajp-8009-2] ERROR org.openbravo.erpCommon.utility.ExecuteQuery - SQL error in query: SELECT COUNT(*) AS TOTAL FROM C_OrderLine
left join (SELECT M_Product_ID, Name FROM M_Product) td0 on C_OrderLine.M_Product_ID = td0.M_Product_ID
 
left join (SELECT C_UOM_ID, Name FROM C_UOM) td1 on C_OrderLine.C_UOM_ID = td1.C_UOM_ID
 
left join (SELECT AD_Language, C_UOM_ID, Name FROM C_UOM_Trl) td_trl2 on td1.C_UOM_ID = td_trl2.C_UOM_ID AND td_trl2.AD_Language = ?
left join (SELECT C_Tax_ID, Name FROM C_Tax) td3 on C_OrderLine.C_Tax_ID = td3.C_Tax_ID
left join (SELECT AD_Language, C_Tax_ID, Name FROM C_Tax_Trl) td_trl4 on td3.C_Tax_ID = td_trl4.C_Tax_ID AND td_trl4.AD_Language = ?
WHERE C_OrderLine.AD_Client_ID IN (0,1000000)
AND C_OrderLine.AD_Org_ID IN (0,1000000,1000002,1000003,1000004,1000005,1000006,1000008,1000009,1000007)
AND C_OrderLine.C_Order_ID = ?
AND C_OrderLine.Line >= ?
Exception:org.postgresql.util.PSQLException: ERROR: operator does not exist: numeric >= character varying
(0000513)
svnbot   
2008-06-12 02:24   
Repository: openbravo
Revision: 4994
Author: cromeroherrero
Date: 2008-06-12 02:24:54 +0200 (Thu, 12 Jun 2008)

Fixed bug 0000598: Sales order's detail line's filter fails and sales line items are not shown
Added explicit cast for numerics in the ModelSQLGeneration used in searchs

---
U trunk/src/org/openbravo/erpCommon/utility/ModelSQLGeneration.java
---

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