Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027440Openbravo ERP07. Sales managementpublic2014-08-23 17:032015-09-11 06:33
shuehner 
AtulOpenbravo 
normalminorhave not tried
closedfixed 
5
 
 
dmiguelez
Core
No
0027440: pl-function c_order_status is broken: uuid bug
This function is broken and fails if it is called and should return '2' for a process order with a line which has no associated shipment of invoice or payment.

Technically error is the v_CountNotPaid variable being varchar2 where it should be NUMBER.

Technically this is a regression as that variable was changed accidently when introducing uuid's in 2.50 (commit: 8a0fe0193bef).

Create a new sales order with one line and book it.
Look up c_order_id of that order
run select c_order_status('this-uuid');

See following error:
ERROR: operator does not exist: character varying <> integer
LINE 1: ...ed <> 0 AND v_CountNotInvoiced <> 0 AND v_CountNotPaid <> 0)
                                                                  ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
QUERY: SELECT (v_CountNotDelivered <> 0 AND v_CountNotInvoiced <> 0 AND v_CountNotPaid <> 0)
CONTEXT: PL/pgSQL function c_order_status(character varying) line 80 at IF

Change variable back to NUMBER
No tags attached.
related to defect 0027441 closed shuehner Remove 2 unused/obsolete pl-functions of old-flow/pre-aprm time: c_order_status & c_debt_payment_paid 
Issue History
2014-08-23 17:03shuehnerNew Issue
2014-08-23 17:03shuehnerAssigned To => dmiguelez
2014-08-23 17:03shuehnerModules => Core
2014-08-23 17:03shuehnerTriggers an Emergency Pack => No
2014-08-23 17:06shuehnerRelationship addedrelated to 0027441
2014-08-23 17:06shuehnerNote Added: 0069652
2014-09-03 13:55eduardo_ArgalAssigned Todmiguelez => eduardo_Argal
2015-07-15 19:57AtulOpenbravoAssigned Toeduardo_Argal => AtulOpenbravo
2015-07-15 19:57AtulOpenbravoStatusnew => scheduled
2015-09-09 18:09hgbotCheckin
2015-09-09 18:09hgbotNote Added: 0080289
2015-09-09 18:09hgbotStatusscheduled => resolved
2015-09-09 18:09hgbotResolutionopen => fixed
2015-09-09 18:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/16ed86fcdf7f0c17d54790cfeeda0546617d7001 [^]
2015-09-09 18:10dmiguelezReview Assigned To => dmiguelez
2015-09-09 18:10dmiguelezNote Added: 0080290
2015-09-09 18:10dmiguelezStatusresolved => closed
2015-09-11 06:33hudsonbotCheckin
2015-09-11 06:33hudsonbotNote Added: 0080322

Notes
(0069652)
shuehner   
2014-08-23 17:06   
Note see related 27441 issue talking about deleting the pl-function completely.
(0080289)
hgbot   
2015-09-09 18:09   
Repository: erp/devel/pi
Changeset: 16ed86fcdf7f0c17d54790cfeeda0546617d7001
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Jul 15 23:48:05 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/16ed86fcdf7f0c17d54790cfeeda0546617d7001 [^]

Fixes Issue 27440:pl-function c_order_status is broken: uuid bug

Variable v_CountNotPaid wrongly set as VARCHAR during merge r2.5x
into trunk

---
M src-db/database/model/functions/C_ORDER_STATUS.xml
---
(0080290)
dmiguelez   
2015-09-09 18:10   
Code Review + Testing Ok
(0080322)
hudsonbot   
2015-09-11 06:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/2828f6cbe752 [^]
Maturity status: Test