Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030739Openbravo ERP02. Master data managementpublic2015-09-02 12:492016-06-28 16:06
shuehner 
Sanjota 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q3 
aferraz
Core
No
0030739: pl function m_copy_product_template has datatype bug (storing number in a varchar(32) variable)
That pl function defines a variable like this:

    v_Discount VARCHAR2(32);


The assigned it like this, with all ride-side being numeric values.

      v_Discount:=(v_Pricelist - v_Pricestd) /v_Pricelist;

Then stores the result into c_orderline.discount which again is numeric.

So it looks like that variable definition is wrong and should be some numeric type also
Read code of that pl-function
or run plpgsql_check analyzer
change datatype of v_discount from varchar(32) to numeric
No tags attached.
related to feature request 0017329 new jonalegriaesarte Add (hidden by default) button to launch m_copy_product_template (pl) to sales order (was in removed simple sales order) 
Issue History
2015-09-02 12:49shuehnerNew Issue
2015-09-02 12:49shuehnerAssigned To => Triage Finance
2015-09-02 12:49shuehnerModules => Core
2015-09-02 12:49shuehnerTriggers an Emergency Pack => No
2015-09-02 12:49shuehnerRelationship addedrelated to 0017329
2016-06-06 18:36aferrazAssigned ToTriage Finance => Sanjota
2016-06-10 14:24SanjotaStatusnew => scheduled
2016-06-10 14:25SanjotaNote Added: 0087161
2016-06-27 12:38hgbotCheckin
2016-06-27 12:38hgbotNote Added: 0087975
2016-06-27 12:38hgbotStatusscheduled => resolved
2016-06-27 12:38hgbotResolutionopen => fixed
2016-06-27 12:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4ca0c8b4d18299c26c73e652580b6a4124d0da3d [^]
2016-06-27 12:43aferrazReview Assigned To => aferraz
2016-06-27 12:43aferrazNote Added: 0087978
2016-06-27 12:43aferrazStatusresolved => closed
2016-06-27 12:43aferrazFixed in Version => 3.0PR16Q3
2016-06-28 16:06hudsonbotCheckin
2016-06-28 16:06hudsonbotNote Added: 0088054

Notes
(0087161)
Sanjota   
2016-06-10 14:25   
Test Plan:

Run the pl function m_copy_product_template and check that v_discount will accept only numeric values
(0087975)
hgbot   
2016-06-27 12:38   
Repository: erp/devel/pi
Changeset: 4ca0c8b4d18299c26c73e652580b6a4124d0da3d
Author: Sanjota <sanjota.nelagi <at> promantia.com>
Date: Fri Jun 10 17:52:55 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/4ca0c8b4d18299c26c73e652580b6a4124d0da3d [^]

Fixes issue 30739: pl function m_copy_product_template has datatype bug

Changed the datatype of v_documentNo from var char(30) to Numeric.

---
M src-db/database/model/functions/M_COPY_PRODUCT_TEMPLATE.xml
---
(0087978)
aferraz   
2016-06-27 12:43   
Code review OK
(0088054)
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