Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 02. Master data managementmajoralways2016-09-27 17:302016-09-28 11:49
Reportermarkmm82View Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR16Q3.2
StatusclosedFix in branchFixed in SCM revision4f62913933cd
ProjectionnoneETAnoneTarget Version3.0PR16Q3.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
Regression levelProduction - QA Approved
Regression date2016-04-15
Regression introduced in release3.0PR16Q3
Regression introduced by commit [^]
Triggers an Emergency PackNo

0034104: Incorrect prices are calculated in Purchase Orders/Invoices when exists discounts or promotions related to products.

DescriptionWhen a Promotion or Discount is created for an specific product, and it is added to a purchase order/invoice prices for the product should not be recalculated as discounts and promotions not applies to Purchases, it applies only for the Sales flows. At moment of product selection, discounts are applied and when the purchase order/invoice is processed it is ignored. As it will be not applied, should be avoided recalculation of prices at product selection time.
Steps To ReproduceAs group admin role:
   1. Set the Price Precision of the Currency EUR to 2 if necessary
   2. Create a new product
      Search key/ Name: Test
   3. Add two prices of 34.27 to it. For instance for Tarifa Bebidas Alegres and Tarifa de Ventas price lists versions.
   4. Create a Price Adjustment for that product. Go to Discount and Promotions and add a new record:
      Discount %: 64.3
      Discount Amount: 0.00
      Included Products: Only those defined
   5. Add the new product in tab Products
   6. Create a Purchase Order header for Bebidas Alegres, S.L bp.
   7. Create a line to the purchase order:
     Add the previously created product (Test) and check the Net Unit Price is updated to 12.34. IT IS NOT CORRECT
   8. Set tax to Compras exentas, to not apply taxes.
   9. Remove discounts from Basic Discounts if exists.
   10. Book the order and check the following information is updated in header and line:
     Purchase Order Line:
        Net Unit Price is updated to 12.24
     Purchase Order Header:
    Total Gross Amount: 12.24
    Total Net Amount: 12.24
     IT IS NOT CORRECT because Discounts and Promotions only work for Sales flow and can not be applied.
     In step 7, the price should not be updated because discounts are not applicable to purchases.
     So, when the order is processed the correct values should be:
     Purchase Order Line:
        Net Unit Price is updated to 34.27
     Purchase Order Header:
    Total Gross Amount: 34.27
    Total Net Amount: 34.27

Verify, this issue is also reproducible to Purchases Invoices.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0034103 closedmarkmm82 Incorrect prices are calculated in Purchase Orders/Invoices when exists discounts or promotions related to products. 

-  Notes
hgbot (developer)
2016-09-28 11:47

Repository: erp/backports/3.0PR16Q3.2
Changeset: 4f62913933cd5faf99fa2181231de93a657a5c13
Author: Mark <markmm82 <at>>
Date: Tue Sep 27 11:06:10 2016 -0400
URL: [^]

Fixes issue 34104: No discounts are applied to product prices in Purchase flows

Price adjustments are not executed if is processing a Purchase Order/Invoice using a product with a promotion or discount, because this functionality should be only available for Sales flows.

M src-db/database/model/functions/M_PROMOTION_ADJUSTMENT.xml
M src/org/openbravo/erpCommon/businessUtility/
aferraz (developer)
2016-09-28 11:49

Code review + Testing OK

- Issue History
Date Modified Username Field Change
2016-09-27 17:31 markmm82 Type defect => backport
2016-09-27 17:31 markmm82 Target Version => 3.0PR16Q3.3
2016-09-27 18:03 aferraz Regression level Production - Confirmed Stable => Production - QA Approved
2016-09-27 18:03 aferraz Regression date 2016-06-17 => 2016-04-15
2016-09-27 18:03 aferraz Regression introduced by commit [^] => [^]
2016-09-28 11:47 aferraz Target Version 3.0PR16Q3.3 => 3.0PR16Q3.2
2016-09-28 11:47 hgbot Checkin
2016-09-28 11:47 hgbot Note Added: 0090341
2016-09-28 11:47 hgbot Status scheduled => resolved
2016-09-28 11:47 hgbot Resolution open => fixed
2016-09-28 11:47 hgbot Fixed in SCM revision => [^]
2016-09-28 11:49 aferraz Review Assigned To => aferraz
2016-09-28 11:49 aferraz Note Added: 0090342
2016-09-28 11:49 aferraz Status resolved => closed
2016-09-28 11:49 aferraz Fixed in Version => 3.0PR16Q3.2

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker