Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032650Openbravo ERP07. Sales managementpublic2016-04-11 19:002016-06-17 19:36
eduardo_Argal 
eduardo_Argal 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q3 
aferraz
Core
No
0032650: Divide by zero problem when trying to relate a service to existing line in an order
Create a new product of type service, linked to product and price rule based.
Add the product to an existing price list with price = 0.
when creating an order with two lines (one with the service another with a regular product) and try to relate one line to another.
An exception is thrown
1) Create a Product as follows:
Name Transport
Type service
linked to product 'Y' (Include a product category**)
price rule based 'Y' (Set a price rule as a %. 20 % for example)
Quantity rule 'Unique quantity'
Price tab: Select sales price list and price 0
2) create an order
3) Add service product and save
4) Add another line for a product in the category**
5)Press select order line button
6) select line one form pick and execute and click OK
Error is thrown

Find attached patch
No tags attached.
diff diff.diff (1,772) 2016-04-11 19:00
https://issues.openbravo.com/file_download.php?file_id=9257&type=bug
Issue History
2016-04-11 19:00eduardo_ArgalNew Issue
2016-04-11 19:00eduardo_ArgalAssigned To => Triage Finance
2016-04-11 19:00eduardo_ArgalModules => Core
2016-04-11 19:00eduardo_ArgalTriggers an Emergency Pack => No
2016-04-11 19:00eduardo_ArgalFile Added: diff.diff
2016-04-14 14:13eduardo_ArgalResolution time => 1463176800
2016-04-15 15:11hgbotCheckin
2016-04-15 15:11hgbotNote Added: 0085679
2016-04-15 15:11hgbotStatusnew => resolved
2016-04-15 15:11hgbotResolutionopen => fixed
2016-04-15 15:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/64e0da2942925b3352eb12435170cebc2c855a87 [^]
2016-04-15 15:11aferrazAssigned ToTriage Finance => eduardo_Argal
2016-04-15 15:11aferrazReview Assigned To => aferraz
2016-04-15 15:11aferrazNote Added: 0085680
2016-04-15 15:11aferrazStatusresolved => closed
2016-04-15 15:11aferrazFixed in Version => 3.0PR16Q3
2016-04-15 15:11aferrazNote Edited: 0085680bug_revision_view_page.php?bugnote_id=0085680#r11785
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087454

Notes
(0085679)
hgbot   
2016-04-15 15:11   
Repository: erp/devel/pi
Changeset: 64e0da2942925b3352eb12435170cebc2c855a87
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Apr 15 15:09:37 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/64e0da2942925b3352eb12435170cebc2c855a87 [^]

Fixes issue 32650: Division by zero when relating a service with an order line

Set discount as zero if listprice is zero to avoid division by zero.

---
M src/org/openbravo/common/actionhandler/ServiceOrderLineRelate.java
M src/org/openbravo/event/ServiceRelationEventHandler.java
---
(0085680)
aferraz   
2016-04-15 15:11   
Fix done by eduardo_Argal.
Code review OK done by aferraz.

(0087454)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test