Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0014419 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 03. Procurement management | major | always | 2010-09-03 11:25 | 2011-09-16 18:48 | |||
Reporter | neil_smith | View Status | public | |||||
Assigned To | jonalegriaesarte | |||||||
Priority | high | Resolution | no change required | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | main | SCM revision | ||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0014419: Price problem when 'Copy from order' from purchase (or sale) order (Copy from Order process). | |||||||
Description | While copying from a sales order to a purchase order, from the purchase order header, it is not the most actual price that is selected. In the CopyFromPOOrder_data.xsql file, the selectPriceForProduct method does an order by pv.ValidFrom DESC, and in the CopyFromPOOrder.java file, it loops on the records returned by the selectPriceForProduct method and memorizes the price for each validfrom that null or empty ("") or validfrom that is before today. If we have several pricelist versions with different validfrom dates for the same pricelist, it will find the first price (the most actual one because of the 'DESC' order by), memorizes it, does other calculations (precision, ...), then finds the second price (with a smaller validfrom date, that means that is older), memorizes it, etc... This means that the oldest valid price is memorized and not the newest. | |||||||
Steps To Reproduce | 1. Create a product 2. Add 2 purchase prices to the product (in the price list assigned to the vendor of the product). One valid from 2010.01.01 with the price 100, and a second one, valid from 2010.06.01 with the price 999. 3. Add 1 sale price (in the pricelist of the customer that will by the product), 150. 4. Create a sales order for that product (-> price 150) 5. Create a purchase order for the vendor of the product. 6. Copy the lines from the sale order by using the 'Copy from Order' button. -> The price on the purchase order is 999 and not 100. | |||||||
Proposed Solution | Simply change the ORDER BY clause of the selectPriceForProduct method from DESC to ASC. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0041037) psarobe (manager) 2011-09-16 18:48 |
This is how it should work. If you are in the 3th of September then it takes the 999 since this is the one valid starting from the 1st of June |
Issue History | |||
Date Modified | Username | Field | Change |
2010-09-03 11:25 | neil_smith | New Issue | |
2010-09-03 11:25 | neil_smith | Assigned To | => adrianromero |
2011-06-03 10:59 | dalsasua | Assigned To | adrianromero => dalsasua |
2011-07-20 18:12 | dalsasua | Assigned To | dalsasua => jonalegriaesarte |
2011-09-16 18:48 | psarobe | Note Added: 0041037 | |
2011-09-16 18:48 | psarobe | Status | new => closed |
2011-09-16 18:48 | psarobe | Resolution | open => no change required |
Copyright © 2000 - 2009 MantisBT Group |