Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0037580 | Openbravo ERP | 07. Sales management | public | 2018-01-03 21:46 | 2018-02-22 18:18 |
Reporter | matias-bernal | ||||
Assigned To | collazoandy4 | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | 3.0PR16Q3.4 | ||||
Target Version | Fixed in Version | 3.0PR18Q2 | |||
Merge Request Status | |||||
Review Assigned To | dmiguelez | ||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0037580: "division by zero" error when book sales order with BOM products | ||||
Description | We created a sales order and a sales order line with a BOM product and quantity ordered > 0, book this order and try close it then OB show this error "division by zero"(see attachment). When C_ORDER_POST runs the trigger C_ORDERLINE_TRG tries to calculate the variable v_PriceActual using :new.qtyordered equals to 0. So that, it returns division by zero error. This error is also present in livebuilds for BOM products | ||||
Steps To Reproduce | 1 - Create a New sales order 2 - Create a New sales order line whit quantity ordered > 0 and a product BOM. 3 - Book this order. 4 - Close this order. | ||||
Proposed Solution | Modify the C_ORDERLINE_TRG.xml Replace in https://code.openbravo.com/erp/devel/pi/file/a8b6912d30a3/src-db/database/model/triggers/C_ORDERLINE_TRG.xml#l227 [^] this line: v_PriceActual := ROUND(v_NetActual / :new.qtyordered, v_price_prec); using this: IF (:new.qtyordered <> 0) THEN v_PriceActual := ROUND(v_NetActual / :new.qtyordered, v_price_prec); ELSE v_PriceActual := 0; END IF; | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=11415&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2018-01-03 21:46 | matias-bernal | New Issue | |||
2018-01-03 21:46 | matias-bernal | Assigned To | => Triage Finance | ||
2018-01-03 21:46 | matias-bernal | File Added: Selección_379.png | |||
2018-01-03 21:46 | matias-bernal | Modules | => Core | ||
2018-01-03 21:46 | matias-bernal | Triggers an Emergency Pack | => No | ||
2018-01-03 22:21 | rbianchini | Issue Monitored: rbianchini | |||
2018-01-04 15:24 | rbianchini | OBNetwork customer | => Yes | ||
2018-01-04 15:24 | rbianchini | Resolution time | => 1516762800 | ||
2018-01-04 17:41 | dmiguelez | Assigned To | Triage Finance => collazoandy4 | ||
2018-01-06 02:05 | collazoandy4 | Status | new => scheduled | ||
2018-01-06 02:06 | collazoandy4 | Note Added: 0101604 | |||
2018-01-09 10:26 | hgbot | Checkin | |||
2018-01-09 10:26 | hgbot | Note Added: 0101635 | |||
2018-01-09 10:26 | hgbot | Status | scheduled => resolved | ||
2018-01-09 10:26 | hgbot | Resolution | open => fixed | ||
2018-01-09 10:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/b37dfca128c9d4d7c315704e81f82c31a1aae42e [^] | ||
2018-01-09 10:28 | dmiguelez | Review Assigned To | => dmiguelez | ||
2018-01-09 10:28 | dmiguelez | Note Added: 0101636 | |||
2018-01-09 10:28 | dmiguelez | Status | resolved => closed | ||
2018-01-09 10:28 | dmiguelez | Fixed in Version | => 3.0PR18Q2 | ||
2018-02-22 18:18 | hudsonbot | Checkin | |||
2018-02-22 18:18 | hudsonbot | Note Added: 0102651 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|