Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025671Openbravo ERP07. Sales managementpublic2014-02-05 17:212014-03-21 15:59
maite 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR14Q2 
maite
Core
No
0025671: Wrong "Last Price" calculated when Discounts and Promotions found
Wrong "Last Price" calculated when Discounts and Promotions found
1. Access "Discounts and Promotions" window and create new record of type "Price Adjustment". Set valid Starting Date, Included Products=Only those defined, Discount Amount=1 and define any product in "Products" tab
2. Access "Sales Order" window and create new record for any partner. Add line using previous product and realize that discount is applied. Process order.
3. Register new Sales Order header for same Business Partner. Run "Copy Lines" process and verify that line of your product is not showing proper "Last Price"(but it is showing price without apply price adjustment)
Problem is that "select" method of CopyFromOrder_data.xsql file is using database procedure "M_GET_OFFERS_PRICE" for LASTPRICESO calculation. But "M_GET_OFFERS_PRICE" is a deprecated function:

DEPRECATED!
This function should not be used. Promotions are calcualted by M_Promotion_Calculate when posting orders/invoices.

Proper function should be used instead of "M_GET_OFFERS_PRICE"
No tags attached.
related to defect 00281773.0PR15Q2 closed AtulOpenbravo "Copy Lines" process is recalculating "lastpriceso" using "pricestd" instead of "lastpriceso" 
Issue History
2014-02-05 17:21maiteNew Issue
2014-02-05 17:21maiteAssigned To => dmiguelez
2014-02-05 17:21maiteModules => Core
2014-02-05 17:21maiteTriggers an Emergency Pack => No
2014-02-05 17:22maiteTarget Version => 3.0MP33
2014-02-05 17:23maiteIssue Monitored: networkb
2014-02-14 13:30dmiguelezAssigned Todmiguelez => jonalegriaesarte
2014-02-19 13:05jonalegriaesarteAssigned Tojonalegriaesarte => pramakrishnan
2014-02-27 05:54AtulOpenbravoAssigned Topramakrishnan => AtulOpenbravo
2014-02-27 05:54AtulOpenbravoStatusnew => scheduled
2014-02-27 05:54AtulOpenbravofix_in_branch => pi
2014-03-10 06:40AtulOpenbravoNote Added: 0064973
2014-03-11 12:57jonalegriaesarteResolution time => 1394838000
2014-03-11 12:57jonalegriaesartefix_in_branchpi =>
2014-03-17 14:19jonalegriaesarteTarget VersionPR14Q3 => PR14Q2
2014-03-21 06:15AtulOpenbravoReview Assigned To => maite
2014-03-21 06:21hgbotCheckin
2014-03-21 06:21hgbotNote Added: 0065324
2014-03-21 06:21hgbotStatusscheduled => resolved
2014-03-21 06:21hgbotResolutionopen => fixed
2014-03-21 06:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ef97a78cfebd2f900acd19d13eed387ce311c67e [^]
2014-03-21 09:07maiteNote Added: 0065335
2014-03-21 09:07maiteStatusresolved => closed
2014-03-21 15:59hudsonbotCheckin
2014-03-21 15:59hudsonbotNote Added: 0065364
2014-11-14 11:07maiteRelationship addedrelated to 0028177

Notes
(0064973)
AtulOpenbravo   
2014-03-10 06:40   
Test Plan
- Navigate to "Discounts and Promotions" window. Create new record of type "Price Adjustment". Set valid Starting Date, Included Products=Only those defined, Discount Amount=1 and define any product in "Products" tab
- Navigate to "Sales Order" window and create new record for any partner. Add line using previous product and realize that discount is applied. Process order.
- Create a Sales Order header for same Business Partner. Run "Copy Lines" process and verify that line of your product is showing proper "Last Price". It shows price that is after applying the discount and promotions on Net List Price of the selected line.
(0065324)
hgbot   
2014-03-21 06:21   
Repository: erp/devel/pi
Changeset: ef97a78cfebd2f900acd19d13eed387ce311c67e
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Mar 11 22:41:37 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/ef97a78cfebd2f900acd19d13eed387ce311c67e [^]

Fixes Issue 25671 Wrong "Last Price" calculated when Discounts and Promotions.

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
---
(0065335)
maite   
2014-03-21 09:07   
verified
(0065364)
hudsonbot   
2014-03-21 15:59   
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/e18c6c3d258e [^]
Maturity status: Test