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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041955
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2019-10-08 23:002019-12-12 23:01
ReporterlbressanView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR20Q1
StatusclosedFix in branchFixed in SCM revisionfc810b87d8a0
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR19Q2.2SCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041955: discount value is being calculated incorrectly

DescriptionWhen creating a purchase order line, the discount value is being calculated incorrectly, so the unit price is charged with a different value than the value found in the purchase price list.
Steps To ReproduceSteps:
1. Create a new purchase price list
2. Add some product and set the next values: Unit Price=28.21 and List Price=29.92
3. Create a new purchase order
4. Add a new orderline and select the previosly used product. The discount value shown is incorrect and when you see the value of unit price, this is different from the unit price of the price list.

See attached video (tested also in version pi)
TagsNo tags attached.
Attached Files? file icon OB.mp4 [^] (2,284,270 bytes) 2019-10-08 23:00

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0115011)
markmm82 (developer)
2019-10-11 03:27
edited on: 2019-10-11 03:27

Test Plan:
1. Create a new purchase price list
2. Add some product and set the next values:
   Unit Price=28.21
   List Price=29.92
3. Create a new purchase order, select the created Price List
4. Add a new orderline and select the previously used product.
   Notice The discount value shown is correct = 5.72
   Notice the value of unit price and List Price are same than defined at Price List.

(0115037)
hgbot (developer)
2019-10-11 13:15

Repository: erp/devel/pi
Changeset: fc810b87d8a001217d9c3e0c7935a344bc7a05b1
Author: Mark Molina <mark.molina <at> doceleguas.com>
Date: Thu Oct 10 22:20:19 2019 -0300
URL: http://code.openbravo.com/erp/devel/pi/rev/fc810b87d8a001217d9c3e0c7935a344bc7a05b1 [^]

Fixes issue 41955: Calculate discount value homogeneously on different callouts

When creating a purchase order line, the discount value was calculated incorrectly,
so the unit price was charged with a different value than the value wich it was defined
in the purchase price list.

In the Purchase/Sales Order window, when the Product is selected, the prices are loaded
from the header's pricelist. When these prices are loaded the Discount field is calculated
and the field is updated with values returned by the SL_Order_Product callout.

Due to the Discount updation, the SL_Order_Amt callout is also called and it tries to recalculate
the prices again, but in this case it was doing the discount calculation in a different
way than the SL_Order_Product callout and the inverse operation makes an incorrect calculation
of the prices and discounts, and get differences because rounding.

To fix this issue, the discount calculation is made in the same way in all the evolved
callouts. In this case, the SL_Order_Amt callout was updated to get the discounts in the
same way than the SL_Order_Product callout.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
---
(0115038)
Sandrahuguet (developer)
2019-10-11 13:16

code review + testing ok
(0116239)
hudsonbot (developer)
2019-12-12 23:01

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

- Issue History
Date Modified Username Field Change
2019-10-08 23:00 lbressan New Issue
2019-10-08 23:00 lbressan Assigned To => Triage Finance
2019-10-08 23:00 lbressan File Added: OB.mp4
2019-10-08 23:00 lbressan Modules => Core
2019-10-08 23:00 lbressan Resolution time => 1571695200
2019-10-08 23:00 lbressan Triggers an Emergency Pack => No
2019-10-09 08:02 Practics Issue Monitored: Practics
2019-10-09 08:17 Sandrahuguet Assigned To Triage Finance => markmm82
2019-10-09 15:20 markmm82 Status new => scheduled
2019-10-11 03:27 markmm82 Note Added: 0115011
2019-10-11 03:27 markmm82 Note Edited: 0115011 View Revisions
2019-10-11 13:15 hgbot Checkin
2019-10-11 13:15 hgbot Note Added: 0115037
2019-10-11 13:15 hgbot Status scheduled => resolved
2019-10-11 13:15 hgbot Resolution open => fixed
2019-10-11 13:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fc810b87d8a001217d9c3e0c7935a344bc7a05b1 [^]
2019-10-11 13:16 Sandrahuguet Review Assigned To => Sandrahuguet
2019-10-11 13:16 Sandrahuguet Note Added: 0115038
2019-10-11 13:16 Sandrahuguet Status resolved => closed
2019-10-11 13:16 Sandrahuguet Fixed in Version => 3.0PR20Q1
2019-10-11 13:29 Sandrahuguet Severity critical => major
2019-12-12 23:01 hudsonbot Checkin
2019-12-12 23:01 hudsonbot Note Added: 0116239


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker