Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0004829Openbravo ERP03. Procurement managementpublic2008-09-05 16:392008-12-03 18:43
rafaroda 
Hennadzi 
highmajoralways
closedfixed 
20Ubuntu 7.10
pi 
2.50 
Core
No
0004829: Requisition To Order does not work
While trying to add a requisition to make and order, you get this error in the log:
15:38:13 [http-8382-Processor22] ERROR org.openbravo.erpCommon.ad_forms.RequisitionToOrderData - SQL error in query: UPDATE M_REQUISITIONLINE SET LOCKEDBY = ?, LOCKDATE = now(), LOCKQTY = null, LOCKPRICE = null, LOCKCAUSE = 'M' WHERE M_REQUISITIONLINE_ID IN ('C9E5ABAC118D4DC19DA0A49A09601793')Exception:org.postgresql.util.PSQLException: ERROR: COALESCE types character varying and integer cannot be matched
15:38:13 [http-8382-Processor22] ERROR org.openbravo.base.secureApp.HttpSecureAppServlet - Error captured: javax.servlet.ServletException: @CODE=0@ERROR: COALESCE types character varying and integer cannot be matched
1) Create a requisition and complete it: Procurement Management || Transactions || Requisition
2) Add this requisition line to an order: Procurement Management || Transactions || Requisition To Order

You can not: ERROR: COALESCE types character varying and integer cannot be matched
No tags attached.
diff patch.diff (1,935) 2008-09-07 23:55
https://issues.openbravo.com/file_download.php?file_id=243&type=bug
Issue History
2008-09-05 16:39rafarodaNew Issue
2008-09-05 16:39rafarodaAssigned To => gorkaion
2008-09-05 16:39rafarodasf_bug_id0 => 2095125
2008-09-05 16:39rafarodaRegression testing => No
2008-09-07 23:07gkfabsNote Added: 0008904
2008-09-07 23:55gkfabsFile Added: patch.diff
2008-09-07 23:56gkfabsNote Added: 0008905
2008-09-08 10:53psarobePrioritynormal => high
2008-09-08 10:53psarobeStatusnew => scheduled
2008-09-08 10:53psarobeTarget Versiontrunk => 2.50
2008-11-13 23:09rafarodaAssigned Togorkaion => Hennadzi
2008-11-20 16:20svnbotCheckin
2008-11-20 16:20svnbotNote Added: 0010453
2008-11-20 16:20svnbotStatusscheduled => resolved
2008-11-20 16:20svnbotResolutionopen => fixed
2008-11-20 16:20svnbotsvn_revision => 10335
2008-11-25 11:37psarobeNote Added: 0010617
2008-12-03 18:43psarobeStatusresolved => closed

Notes
(0008904)
gkfabs   
2008-09-07 23:07   
After running the query manually on my database, I get

ERROR: COALESCE types character varying and integer cannot be matched

CONTEXT: SQL statement "SELECT ((COALESCE( $1 , '0') <> COALESCE( $2 ,'0')) OR (COALESCE( $3 , -1) <> COALESCE( $4 , '-1')) OR (COALESCE( $5 , -1) <> COALESCE( $6 , '-1')) OR (COALESCE( $7 , -1) <> COALESCE( $8 , '-1')) OR (COALESCE( $9 , -1) <> COALESCE( $10 , -1)) OR (COALESCE( $11 , -1) <> COALESCE( $12 , -1)) OR (COALESCE( $13 , -1) <> COALESCE( $14 , -1 )) OR (COALESCE( $15 , -1) <> COALESCE( $16 , -1 )) OR (COALESCE( $17 , -1) <> COALESCE( $18 , -1 )) OR (COALESCE( $19 , '0') <> COALESCE( $20 , '0' )) OR (COALESCE( $21 , '0') <> COALESCE( $22 , '0' )) OR (COALESCE( $23 , '0') <> COALESCE( $24 , '0' )) OR (COALESCE( $25 , -1) <> COALESCE( $26 , -1 )) OR (COALESCE( $27 , -1) <> COALESCE( $28 , '-1' )) OR (COALESCE( $29 , TO_DATE('01-01-1900', 'DD-MM-YYYY')) <> COALESCE( $30 , TO_DATE('01-01-1900', 'DD-MM-YYYY'))))"

PL/pgSQL function "m_requisitionline_trg" line 55 at IF
(0008905)
gkfabs   
2008-09-07 23:56   
The patch I just added should solved this issue.
(0010453)
svnbot   
2008-11-20 16:20   
Repository: openbravo
Revision: 10335
Author: hennadzi
Date: 2008-11-20 16:20:09 +0100 (Thu, 20 Nov 2008)

Fixed bug 0004829: Requisition To Order does not work

---
U trunk/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql
U trunk/src-db/database/model/triggers/M_REQUISITIONLINE_TRG.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=10335&sc=1 [^]
(0010617)
psarobe   
2008-11-25 11:37   
To create the requisition do the same as in 0004718 but not create the purchase

After that next steps:

1. The requisition must be completed to be able to see it in the requisition to order window
2. Move the line from up to down using the ADD button
3. Then select and click create button.
4. Select a date and click Ok. If the order has been created, then the bug is fixed