Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030740Openbravo ERP05. Production managementpublic2015-09-02 12:562016-06-28 16:06
shuehner 
Sanjota 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q3 
aferraz
Core
No
0030740: pl-function ma_copy_version does not work with non (only-numeric' document numbers)
That function has a datatype bug.

It contains the following variable declaration:
    v_DocumentNo NUMERIC;

Assigned like this:
    SELECT * INTO v_DocumentNo FROM Ad_Sequence_Doc('DocumentNo_MA_ProcessPlan_Version', v_Client_ID, 'Y') ;

used for insert into MA_Processplan_Version.documentno

Both teh ad_sequence_doc + the documentno field are varchar's are document number definition can and do contain prefixes & suffixes.

So that variable declaration in the pl function is looks just wrong.

Found using plpgsql_check tool
Read sourcecode of that pl function or run plpgsql_check tool
No tags attached.
Issue History
2015-09-02 12:56shuehnerNew Issue
2015-09-02 12:56shuehnerAssigned To => Triage Finance
2015-09-02 12:56shuehnerModules => Core
2015-09-02 12:56shuehnerTriggers an Emergency Pack => No
2016-06-06 18:36aferrazAssigned ToTriage Finance => Sanjota
2016-06-10 14:11SanjotaNote Added: 0087154
2016-06-27 12:38hgbotCheckin
2016-06-27 12:38hgbotNote Added: 0087976
2016-06-27 12:38hgbotStatusnew => resolved
2016-06-27 12:38hgbotResolutionopen => fixed
2016-06-27 12:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f8552f6b006ede6e412370d4a5e268f938b60724 [^]
2016-06-27 12:38hgbotCheckin
2016-06-27 12:38hgbotNote Added: 0087977
2016-06-27 12:44aferrazReview Assigned To => aferraz
2016-06-27 12:44aferrazNote Added: 0087980
2016-06-27 12:44aferrazStatusresolved => closed
2016-06-27 12:44aferrazFixed in Version => 3.0PR16Q3
2016-06-28 16:06hudsonbotCheckin
2016-06-28 16:06hudsonbotNote Added: 0088055
2016-06-28 16:06hudsonbotCheckin
2016-06-28 16:06hudsonbotNote Added: 0088056

Notes
(0087154)
Sanjota   
2016-06-10 14:11   
Test Plan:
*Changed the datatype of v_documentNo from Numeric to var char(30).
* So pl-Function ma_copy_version() will accept NoN also.
(0087976)
hgbot   
2016-06-27 12:38   
Repository: erp/devel/pi
Changeset: f8552f6b006ede6e412370d4a5e268f938b60724
Author: Sanjota <sanjota.nelagi <at> promantia.com>
Date: Fri Jun 10 17:30:18 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/f8552f6b006ede6e412370d4a5e268f938b60724 [^]

Fixes issue 30740: pl-function ma_copy_version does not work with non

Changed the datatype of v_documentNo from Numeric to var char(30).
Since the function fails incase of insert MA_Processplan_Version statemment

---
M src-db/database/model/functions/MA_COPY_VERSION.xml
---
(0087977)
hgbot   
2016-06-27 12:38   
Repository: erp/devel/pi
Changeset: f138f3edc459ceef5d595f30625e21b950f9f405
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jun 27 12:27:02 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f138f3edc459ceef5d595f30625e21b950f9f405 [^]

Related to issue 30740: Code review improvements

---
M src-db/database/model/functions/MA_COPY_VERSION.xml
---
(0087980)
aferraz   
2016-06-27 12:44   
Code review OK
(0088055)
hudsonbot   
2016-06-28 16:06   
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/865878a5d292 [^]
Maturity status: Test
(0088056)
hudsonbot   
2016-06-28 16:06   
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/865878a5d292 [^]
Maturity status: Test