Project:
View Revisions: Issue #40275 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0040275: Error when calculating the discount field in the lines of a Sales Order | ||
Revision | 2019-02-27 17:03 by Leyre | ||
Steps To Reproduce | BACKEND: 1. Create a new discount: Discount/Promotion Type = Price Adjustment Discount % = 50 Included Business Partners = Only those defined Business Partner = defined one 2. Modify the price list of a product, for example = 35.05 3. Modify the price list of another product, for example = 35.06 4. Create a new sales order, with the Partner defined previously 5. Add two lines to the sales order, with both products. 6. Verify in the lines, that, in the case of the product = 35.05, a discount of -0.03 is applied to the line. PROBLEM: PriceAdjustment.java class -> calculatePriceStd method First calculated 35.05 / 2 = 17.525 -> precision 2 -> 17.53 Secondly calculate 17.53 / 2 = 35.06 and use this value to calculate the final discount: 35.05-35.06 = -0.01 -> -0.01 * 100 = -1 -> -1 / 35.05 = - 0.028 -> precision 2 -> -0.03 |
||
Revision | 2019-02-27 03:00 by Leyre | ||
Steps To Reproduce | BACKEND: 1. Create a new discount: Discount/Promotion Type = Price Adjustment Discount % = 50 Included Business Partners = Only those defined Business Partner = defined one 2. Modify the price list of a product, for example = 35.05 3. Modify the price list of another product, for example = 35.06 4. Create a new sales order, with the Partner defined previously 5. Add two lines to the sales order, with both products. 6. Verify that, in the case of the product = 35.05, a discount of -0.03 is applied to the line. |
Copyright © 2000 - 2009 MantisBT Group |