Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037960Openbravo ERP07. Sales managementpublic2018-02-16 12:272018-03-07 01:04
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q2 
dmiguelez
Core
No
0037960: When not stocked product is exploded before booking the order and price includes taxes, Gross Unit Price is updated to 0
When not stocked product is exploded before booking the order and price includes taxes, Gross Unit Price is updated to 0 if a valid price adjustment exists for the order date

The problem is that the Explode process sets the grosspricestd to 0 and M_PROMOTION_CALCULATE function transfers it to gross_unit_price column

It should be analyzed if the update to the c_orderline is needed when there is not a price adjustment to be applied
As group admin role:
   Create a new record in Discounts and Promotions window:
      Discount/Promotion Type: Price Adjustment
      Starting Date: today
      Included...: Only those defined (the discount will not applicable as we are not going to include any record in the tabs)
   Create a new Product:
      Stocked: N
      Bill Of Materials: Y
   Add a sales price to it
   Add a product in Bill Of Materials tab
   Verify BOM
   Create a Sales Order
   Add the previously created order
   Launch Explode process and check a new line is included with Gross Unit Price and Line Gross Amount different from 0
   Book the order and check the Gross Unit Price and Line Gross Amount are updated to 0
No tags attached.
related to defect 0038085 closed markmm82 Prices in Invoice lines of discounts copied by Copy Lines process are updated to 0 when completing if a price adjustment exists 
Issue History
2018-02-16 12:27ngarciaNew Issue
2018-02-16 12:27ngarciaAssigned To => Triage Finance
2018-02-16 12:27ngarciaModules => Core
2018-02-16 12:27ngarciaResolution time => 1520550000
2018-02-16 12:27ngarciaTriggers an Emergency Pack => No
2018-02-20 17:43ngarciaIssue Monitored: networkb
2018-02-28 16:17markmm82Assigned ToTriage Finance => markmm82
2018-02-28 16:17markmm82Statusnew => acknowledged
2018-02-28 20:49markmm82Statusacknowledged => scheduled
2018-03-02 17:32markmm82Note Added: 0102942
2018-03-02 17:49markmm82Note Added: 0102943
2018-03-06 10:04hgbotCheckin
2018-03-06 10:04hgbotNote Added: 0103016
2018-03-06 10:04hgbotStatusscheduled => resolved
2018-03-06 10:04hgbotResolutionopen => fixed
2018-03-06 10:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5dbcb5394a22a49f391f7318778682709d5ce46a [^]
2018-03-06 10:05dmiguelezReview Assigned To => dmiguelez
2018-03-06 10:05dmiguelezNote Added: 0103017
2018-03-06 10:05dmiguelezStatusresolved => closed
2018-03-06 10:05dmiguelezFixed in Version => 3.0PR18Q2
2018-03-07 01:04hudsonbotCheckin
2018-03-07 01:04hudsonbotNote Added: 0103048
2018-03-08 15:55ngarciaRelationship addedblocks 0038085
2018-03-08 16:01ngarciaRelationship replacedrelated to 0038085

Notes
(0102942)
markmm82   
2018-03-02 17:32   
Test Plan 1:
As group admin role:
   Create a new record in Discounts and Promotions window:
      Name: DP
      Discount/Promotion Type: Price Adjustment
      Starting Date: today
      Set to All Included fields: Only those defined (the discount will not applicable as we are not going to include any record in the tabs)
   Create a new Product:
      Name: P
      Stocked: N
      Bill Of Materials: Y
   Add a sales price to it
      Price List Version: Tarifa de ventas
      Unit Price = List Price = 10.00
   Add a product in Bill Of Materials tab
      BOM Product: Cerveza Ale 0,5L
      BOM Quantity: 1
   Verify BOM
   Go to Price List window and set Tarifa de Ventas pricelist as Price Includes taxes.
   Create a Sales Order
      Business Partner: Alimentos y Supermercados, S.A
      Price List: Tarifa de ventas
   Add the previously created product
      Product: P
      Ordered Quantity: 10
      Tax: Ventas exentas
   Launch Explode process and check a new line is included with Gross Unit Price and Line Gross Amount different from 0
      Product: Cerveza Ale 0,5L
      Orered Quantity: 10
      Gross Unit Price: 2.04
      Line Gross Amount: 20.04
   Book the order and check the Gross Unit Price and Line Gross Amount still the same and the process is completed successfully.
(0102943)
markmm82   
2018-03-02 17:49   
Test Plan 2: Tested issue 28503
1- Login into Openbravo ERP
2- Go to Product window and create a new one, set it as Stocked = 'N' and Bill Of Materials = 'Y'
3- Go to price tab and create a new register selecting Tarifa de Ventas as Price List Version
4- Add a product, for example, Zumo de PiƱa 0,5L, in the Bill Of Materials tab and click on Verify BOM button
5- Create another product, set it again as Stocked = 'N' and Bill Of Materials = 'Y'
6- Go to price tab and create a new register selecting Tarifa de Ventas as Price List Version
7- Include the previously created BOM product on the Bill Of Materials tab and click on Verify BOM button
8- Go to Sales Order window and create a new header.
9- Go to lines tab and add the second BOM product created to it.
10- Book it and check the included BOM (the first BOM product created) is now exploded successfuly.


Test Plan 3: Tested issue 25932
- Login as F&B International Group Admin.
- Navigate to Product window. Create a new product as BOM. Set Stocked flag as No, Bills Of Material flag as Yes.
- Navigate to Price List Tab. Select price list version as 'Tarifa de Ventas' and set price as zero.
- Navigate to Bills Of Material Tab. Add a record with Agua Sin Gas Product. Click on Verify BOM button.
- Navigate to Price List window. Select 'Tarifa de Ventas' and set Price includes taxes flag as Yes.
- Navigate to Sales Order Window. Create a new one for Business Partner: Alimentos y Supermercados
- Go to Sales Order Lines tab. Create a Line for Product: BOM, Click on Explode button.
- Realize that the Gross Unit price and Total Gross Amount is set with proper values.


Test Plan 4: Tested issue 25661
Test Plan 5: Tested issue 23008
(0103016)
hgbot   
2018-03-06 10:04   
Repository: erp/devel/pi
Changeset: 5dbcb5394a22a49f391f7318778682709d5ce46a
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Mar 01 18:45:40 2018 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/5dbcb5394a22a49f391f7318778682709d5ce46a [^]

Fixes issue 37960: When not stocked product is exploded before booking the order
and price includes taxes, Gross Unit Price is updated to 0.

When the it is exploded a BOM line with not stock and the price list includes taxes
then the M_EXPLODEBOMNOTSTOCK function was creating lines with the gross_unit_price,
grosspricelist and line_gross_amount values, but it wasn't copying the grosspricestd
column and it was taking 0 as default value.

For this reason, when the order was booked, as the Explode process sets the
grosspricestd to 0, M_PROMOTION_CALCULATE function uses and transfers it for the
gross_unit_price column.

To fix this issue, the grosspricestd is also inserted into the exploded lines at
line insertion in M_EXPLODEBOMNOTSTOCK PL.

---
M src-db/database/model/functions/M_EXPLODEBOMNOTSTOCK.xml
---
(0103017)
dmiguelez   
2018-03-06 10:05   
Code Review + Testing Ok
(0103048)
hudsonbot   
2018-03-07 01:04   
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/14b1dec19bfc [^]
Maturity status: Test