Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022805Openbravo ERP07. Sales managementpublic2013-01-16 11:532013-01-21 12:57
alostale 
alostale 
urgentminorN/A
closedfixed 
5
 
3.0MP20 
dmiguelez
Core
No
0022805: Price Adjustments don't update prices while editing lines
Starting from 3.0MP17, existent Price Adjustments were extended in order to add the capability to create more powerful rules to create discounts. Existent Price Adjustments were converted in a type of Promotions and Discounts.

Because it is possible to create Promotions and Discounts that are applied based not only in one sales/invoice line but also in the rest of lines in the document, it is not possible anymore to calculate the prices with discounts when creating/editing the line. This is way this calculation was removed and executed only on demand or when posting the document.

Though this changes the existent behavior.
1. Go to Promotions and Discounts
2. Create a new entry that applies to product A (with price list 10€)
3. Discount 10%
4. Create a new Sales Order
5. Add a new line of product A, check Net Unit Price and Line Net Amount are 10€
6. Book the Order, now Net Unit Price and Line Net Amount are 9€ (10€-10%)

Previous to MP17, in step 5 both fields would be 9€ instead of 10€
In order to keep backwards compatibility, only for the case of Price Adjustments, final prices will be calculated while the line is being edited.

Note that before MP17, Price Adjustment lines were also created just after inserting/editing the line. This is *NOT* going to be restored, so Price Adjustment lines will be only created on posting.
No tags attached.
Issue History
2013-01-16 11:53alostaleNew Issue
2013-01-16 11:53alostaleAssigned To => alostale
2013-01-16 11:53alostaleModules => Core
2013-01-16 11:53alostaleTriggers an Emergency Pack => No
2013-01-16 11:54alostaleReview Assigned To => dmiguelez
2013-01-16 11:56hgbotCheckin
2013-01-16 11:56hgbotNote Added: 0055539
2013-01-16 11:56hgbotStatusnew => resolved
2013-01-16 11:56hgbotResolutionopen => fixed
2013-01-16 11:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/38af5fb36bd953a6c62dd057a51c5e66f11b3da3 [^]
2013-01-16 12:09alostaleNote Added: 0055540
2013-01-18 20:26hudsonbotCheckin
2013-01-18 20:26hudsonbotNote Added: 0055631
2013-01-21 12:57dmiguelezNote Added: 0055670
2013-01-21 12:57dmiguelezStatusresolved => closed

Notes
(0055539)
hgbot   
2013-01-16 11:56   
Repository: erp/devel/pi
Changeset: 38af5fb36bd953a6c62dd057a51c5e66f11b3da3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jan 16 11:55:20 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/38af5fb36bd953a6c62dd057a51c5e66f11b3da3 [^]

fixed issue 22805: Price Adjustments don't update prices while editing lines

---
M src-db/database/model/functions/M_PROMOTION_CALCULATE.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Product.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Product.java
A src/org/openbravo/erpCommon/businessUtility/PriceAdjustment.java
---
(0055540)
alostale   
2013-01-16 12:09   
Updated documentation: http://wiki.openbravo.com/wiki/Discounts_and_Promotions [^]
(0055631)
hudsonbot   
2013-01-18 20:26   
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/4cd4a6cc38e0 [^]

Maturity status: Test
(0055670)
dmiguelez   
2013-01-21 12:57   
Code Review + Testing OK