Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028177
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2014-11-14 11:062014-12-30 23:27
ReportermaiteView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision78f50adbb376
ProjectionnoneETAnoneTarget Version3.0PR15Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Topramakrishnan
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028177: "Copy Lines" process is recalculating "lastpriceso" using "pricestd" instead of "lastpriceso"

Description"Copy Lines" process is recalculating "lastpriceso" using "pricestd" instead of "lastpriceso"
Steps To Reproduce1. Define Price list as "tax included taxes" and set price=0 for an specific product
2. Register Purchase Order for any org and bp. Add line using previous product, edit price to set 200 and process order
3. Register new Purchase Order header for same org and bp
4. Run "Copy Lines" process and realize that "Last Price" is not showing 200 but 0.00, which is wrong
Proposed Solutionlastpriceso is being properly calculated to 200 in the query but is being later overwritten in following line of code using "pricestd" instead of previous "lastpriceso" (CopyFromOrder.java)

for (int i = 0; i < data.length; i++) {
      Product product = OBDal.getInstance().get(Product.class, data[i].mProductId);
      data[i].lastpriceso = (PriceAdjustment.calculatePriceActual(order, product, new BigDecimal(
          data[i].qty), new BigDecimal(data[i].pricestd))).toString();
    }

patch attached
TagsNo tags attached.
Attached Filesdiff file icon 28177.diff [^] (870 bytes) 2014-11-14 11:19 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00256713.0PR14Q2 closedAtulOpenbravo Wrong "Last Price" calculated when Discounts and Promotions found 

-  Notes
(0072338)
AtulOpenbravo (developer)
2014-12-09 03:56

Test Plan
- Define Price list as "tax included taxes", Sales Price List=No and set Unit Price=0 for an specific product
- Register Purchase Order for any org and bp. Add line using previous product, edit price to set 200 and book order.
- Register new Purchase Order header for same org, Bp and Pricelist.
- Run "Copy Lines" process and realize that "Last Price" is showing 200.
(0072339)
hgbot (developer)
2014-12-09 04:05

Repository: erp/devel/pi
Changeset: 78f50adbb376670cfb1fa98953c50d62b5706161
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Dec 09 08:32:55 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/78f50adbb376670cfb1fa98953c50d62b5706161 [^]

Fixes Issue 28177:Copy Lines uses LastPriceSO instead of PriceStd

Incase of discount and promotion Copy Lines used PriceStd which now
uses lastpriceso to set value in grid data for LastPriceSO.

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
---
(0072489)
pramakrishnan (developer)
2014-12-15 09:41

Code Review + Testing - OK.
(0073184)
hudsonbot (developer)
2014-12-30 23:27

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/6525fe229e06 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-11-14 11:06 maite New Issue
2014-11-14 11:06 maite Assigned To => dmiguelez
2014-11-14 11:06 maite Modules => Core
2014-11-14 11:06 maite Triggers an Emergency Pack => No
2014-11-14 11:07 maite Relationship added related to 0025671
2014-11-14 11:07 maite Assigned To dmiguelez => AtulOpenbravo
2014-11-14 11:19 maite Proposed Solution updated
2014-11-14 11:19 maite File Added: 28177.diff
2014-11-17 14:06 maite Resolution time => 1419030000
2014-12-01 13:42 egoitz Target Version 3.0PR15Q1 => 3.0PR15Q2
2014-12-09 03:56 AtulOpenbravo Note Added: 0072338
2014-12-09 03:56 AtulOpenbravo Status new => scheduled
2014-12-09 03:56 AtulOpenbravo fix_in_branch => pi
2014-12-09 04:03 AtulOpenbravo Review Assigned To => pramakrishnan
2014-12-09 04:03 AtulOpenbravo fix_in_branch pi =>
2014-12-09 04:05 hgbot Checkin
2014-12-09 04:05 hgbot Note Added: 0072339
2014-12-09 04:05 hgbot Status scheduled => resolved
2014-12-09 04:05 hgbot Resolution open => fixed
2014-12-09 04:05 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/78f50adbb376670cfb1fa98953c50d62b5706161 [^]
2014-12-15 09:41 pramakrishnan Note Added: 0072489
2014-12-15 09:41 pramakrishnan Status resolved => closed
2014-12-30 23:27 hudsonbot Checkin
2014-12-30 23:27 hudsonbot Note Added: 0073184


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker