Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033066Openbravo ERP07. Sales managementpublic2016-05-27 10:172016-06-17 19:38
JONHM 
Sanjota 
highmajoralways
closedfixed 
5
 
3.0PR16Q3 
aferraz
Core
No
0033066: PL function "c_order_post1" does not take "recalculateDiscounts" parameter when passing a pInstance
When passing a pInstance to a c_order_post1 PL funciton, it calculates the discounts automatically, omitting the third parameter of the function.
As you can see in the c_order_post1 function, if you don't use a pInstance, you can pass the third parameter (calculate discounts), but if you use a pInstance instead the parameter is omitted. We need to check the parameter into the table if a pInstance is used.
Add a conditional checking the calculateDiscounts parameter into the table:

https://code.openbravo.com/erp/devel/pi/file/65a012587054/src-db/database/model/functions/C_ORDER_POST1.xml#l148 [^]

- LOOP
- v_Record_ID:=Cur_Parameter.Record_ID;
- v_User:=Cur_Parameter.AD_User_ID;
- END LOOP; -- Get Parameter

+ LOOP
+ v_Record_ID:=Cur_Parameter.Record_ID;
+ v_User:=Cur_Parameter.AD_User_ID;
+ IF(Cur_Parameter.ParameterName='recalculateDiscounts') THEN
+ v_recalculateDiscounts:=Cur_Parameter.P_String;
+ END IF;
+ END LOOP; -- Get Parameter
No tags attached.
Issue History
2016-05-27 10:17JONHMNew Issue
2016-05-27 10:17JONHMAssigned To => Triage Finance
2016-05-27 10:17JONHMModules => Core
2016-05-27 10:17JONHMResolution time => 1467151200
2016-05-27 10:17JONHMTriggers an Emergency Pack => No
2016-05-31 17:16aferrazAssigned ToTriage Finance => Sanjota
2016-06-08 17:09SanjotaStatusnew => scheduled
2016-06-08 17:14SanjotaNote Added: 0087095
2016-06-10 14:36hgbotCheckin
2016-06-10 14:36hgbotNote Added: 0087163
2016-06-10 14:36hgbotStatusscheduled => resolved
2016-06-10 14:36hgbotResolutionopen => fixed
2016-06-10 14:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/30c157cff610cbb9099e700b0e84d7445db93a4d [^]
2016-06-10 14:40aferrazReview Assigned To => aferraz
2016-06-10 14:40aferrazNote Added: 0087164
2016-06-10 14:40aferrazStatusresolved => closed
2016-06-10 14:40aferrazFixed in Version => 3.0PR16Q3
2016-06-17 19:38hudsonbotCheckin
2016-06-17 19:38hudsonbotNote Added: 0087603

Notes
(0087095)
Sanjota   
2016-06-08 17:14   
Test Plan:

* Create order for the products with discount.
* Process order
* Observe that c_order_post1 will take "recalculateDiscounts" parameter even while passing a pInstance
(0087163)
hgbot   
2016-06-10 14:36   
Repository: erp/devel/pi
Changeset: 30c157cff610cbb9099e700b0e84d7445db93a4d
Author: Sanjota <sanjota.nelagi <at> promantia.com>
Date: Wed Jun 08 19:52:27 2016 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/30c157cff610cbb9099e700b0e84d7445db93a4d [^]

Fixes issue 33066: Fix to recalculateDiscounts issue in C_Order_Post1 function

When passing a pInstance to a c_order_post1 PL funciton, it calculates the discounts automatically, omitting the third parameter of the function.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0087164)
aferraz   
2016-06-10 14:40   
Code review + Testing OK
(0087603)
hudsonbot   
2016-06-17 19:38   
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/0dc7be081b1c [^]
Maturity status: Test