Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016613Openbravo ERP07. Sales managementpublic2011-04-01 18:002011-04-06 00:00
jonalegriaesarte 
jonalegriaesarte 
urgentmajoralways
closedfixed 
5
pi 
3.0RC6 
Core
No
0016613: Wrong "adjusted price" when using price adjustments
"Adjusted price" of Price Adjustments tab is recalculated by m_get_offer_std_price function when saving order line. If working with decimals "adjusted price" could be different to order line price due to rounding.
"Adjusted price" should be directly copy from order line instead of recalculated again to avoid this difference
1. Master Data Management || Pricing || Price Adjustments || Adjustments:
  starting date= 08/02/2011
  Discount %= 30
  Included Business Partners= Only those defined --> Add "mafalda" in BP tab
  Included Products = Only those defined --> Add "hammer" in BP tab
2. Master Data Management || Product || Product >> Price : search for hammer and set 3 prices for "Mafalda price list" to 3.75
3. Sales Management || Transactions || Sales Order || Header : create order for mafalda
4. Sales Management || Transactions || Sales Order || Header >> Lines : add line for hammer and save.
5. Navigate to Sales Management || Transactions || Sales Order || Header >> Lines >> Price Adjustments : realize that "Adjusted Price" is 3.76 instead of 3.75

Problem is in function m_get_offer_std_price (which is called from c_orderline_trg2): it performs arithmetic operation and return number with several decimals, which is again rounded causing the error.
No tags attached.
related to defect 00158882.50MP27 closed jonalegriaesarte Wrong "adjusted price" when using price adjustments 
Issue History
2011-04-01 18:00jonalegriaesarteNew Issue
2011-04-01 18:00jonalegriaesarteAssigned To => jonalegriaesarte
2011-04-01 18:00jonalegriaesarteModules => Core
2011-04-01 18:00jonalegriaesarteRelationship addedrelated to 0015888
2011-04-01 18:04hgbotCheckin
2011-04-01 18:04hgbotNote Added: 0035479
2011-04-01 18:04hgbotStatusnew => resolved
2011-04-01 18:04hgbotResolutionopen => fixed
2011-04-01 18:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/81b794af4945ecb8c1e6dc61582c9c79898ead7f [^]
2011-04-04 12:26maiteNote Added: 0035528
2011-04-04 12:26maiteStatusresolved => closed
2011-04-06 00:00anonymoussf_bug_id0 => 3276672

Notes
(0035479)
hgbot   
2011-04-01 18:04   
Repository: erp/devel/pi
Changeset: 81b794af4945ecb8c1e6dc61582c9c79898ead7f
Author: Egoitz Castillo <egoitz.castillo <at> openbravo.com>
Date: Fri Apr 01 18:03:08 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/81b794af4945ecb8c1e6dc61582c9c79898ead7f [^]

Fixes issue 0016613: Wrong "adjusted price" when using price adjustments
Now the difference is calculated based on the price standard.

---
M src-db/database/model/triggers/C_ORDERLINE_TRG2.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
---
(0035528)
maite   
2011-04-04 12:26   
verified