Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||||
View Issue Details | |||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||||
0033975 | Openbravo ERP | 02. Master data management | public | 2016-09-13 13:22 | 2016-09-29 00:02 | ||||||||||||||||
Reporter | ngarcia | ||||||||||||||||||||
Assigned To | markmm82 | ||||||||||||||||||||
Priority | urgent | Severity | major | Reproducibility | always | ||||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||||
Product Version | |||||||||||||||||||||
Target Version | Fixed in Version | 3.0PR16Q4 | |||||||||||||||||||
Merge Request Status | |||||||||||||||||||||
Review Assigned To | aferraz | ||||||||||||||||||||
OBNetwork customer | OBPS | ||||||||||||||||||||
Web browser | |||||||||||||||||||||
Modules | Core | ||||||||||||||||||||
Support ticket | 43618 | ||||||||||||||||||||
Regression level | |||||||||||||||||||||
Regression date | |||||||||||||||||||||
Regression introduced in release | |||||||||||||||||||||
Regression introduced by commit | |||||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||||
Summary | 0033975: Wrong Net Unit Price and pricestd in order and invoice lines when applying a discount of a percentage with decimals | ||||||||||||||||||||
Description | Wrong Net Unit Price and pricestd in order and invoice lines when applying a discount of a percentage with decimals | ||||||||||||||||||||
Steps To Reproduce | As group admin role: Set the Price Precision of the Currency to 2 Create a new product Add a price of 34.27 to it Create a Price Adjustment for that product (Discount and Promotions): Discount %: 64.3 Discount Amount: 0.00 Create a Sales Order Add the previously created product and check the Net Unit Price is updated to 12.34 Book it and check the Net Unit Price is updated to 12.24 The correct value should be 12.23 Repeat the process for sales invoices and also in purchase flow | ||||||||||||||||||||
Proposed Solution | The problem seems to be in calculatePriceActual and calculatePriceStd functions of PriceAdjustment class as the discount percentage is rounded to the price precision after dividing it by 100. Example: 64.3 / 100 = 0.643 -> 0.64 .divide(BigDecimal.valueOf(100), precision, BigDecimal.ROUND_HALF_UP) | ||||||||||||||||||||
Additional Information | |||||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||||
Relationships |
| ||||||||||||||||||||
Attached Files | |||||||||||||||||||||
Issue History | |||||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | New Issue | |||||||||||||||||||
2016-09-13 13:22 | ngarcia | Assigned To | => Triage Finance | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | OBNetwork customer | => Yes | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | Modules | => Core | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | Support ticket | => 43618 | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | Resolution time | => 1475532000 | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | Triggers an Emergency Pack | => No | ||||||||||||||||||
2016-09-13 13:22 | ngarcia | Issue Monitored: networkb | |||||||||||||||||||
2016-09-15 11:16 | aferraz | Assigned To | Triage Finance => markmm82 | ||||||||||||||||||
2016-09-20 17:27 | markmm82 | Status | new => scheduled | ||||||||||||||||||
2016-09-26 13:17 | aferraz | Relationship added | related to 0032544 | ||||||||||||||||||
2016-09-27 17:22 | markmm82 | Note Added: 0090306 | |||||||||||||||||||
2016-09-27 17:37 | markmm82 | Relationship added | related to 0034103 | ||||||||||||||||||
2016-09-28 09:53 | hgbot | Checkin | |||||||||||||||||||
2016-09-28 09:53 | hgbot | Note Added: 0090330 | |||||||||||||||||||
2016-09-28 09:53 | hgbot | Status | scheduled => resolved | ||||||||||||||||||
2016-09-28 09:53 | hgbot | Resolution | open => fixed | ||||||||||||||||||
2016-09-28 09:53 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/e94a1240a35856cbe1cafacda5447ed54fef70fc [^] | ||||||||||||||||||
2016-09-28 10:02 | aferraz | Review Assigned To | => aferraz | ||||||||||||||||||
2016-09-28 10:02 | aferraz | Note Added: 0090333 | |||||||||||||||||||
2016-09-28 10:02 | aferraz | Status | resolved => closed | ||||||||||||||||||
2016-09-28 10:02 | aferraz | Fixed in Version | => 3.0PR16Q4 | ||||||||||||||||||
2016-09-29 00:02 | hudsonbot | Checkin | |||||||||||||||||||
2016-09-29 00:02 | hudsonbot | Note Added: 0090361 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|