Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020026Openbravo ERP05. Production managementpublic2012-02-16 13:182012-03-29 12:19
VictorVillar 
jecharri 
highminoralways
closedfixed 
5
2.50MP39 
2.50MP41 
Core
No
0020026: Not possible to validate a work effort because an error
If exists any register in global use tab in the work effor, and the standars has been created by the production run with a 'completed quantity' = 0, an error message: "division by zero" appears.
Because when the PL "ma_workeffort_validate" checks if there is a Global use with the function "ma_globaluse_distribute", and the error happens in the next statement:
wpp.MOVEMENTQTY*pp.PRODUCTIONQTY, 0) /v_Total

and v_Total is the SUM(wpp.MOVEMENTQTY*pp.PRODUCTIONQTY), if this sum is 0, then there is a division by zero

If the user has introduced the completed qty = 0 in the production run, the process does not know how many qty spreads to all the production runs executed.
Before the steps below create a sequence for a process plan checking off the Global use. Then planning a Work Requirment.
As group admin role,
Go to Work Effort window,
  - create a work effort
Go to Production run tab:
  - create a new one:
       - select the WR Phase created before
       - Completed qty: 0
Click in Create Standars button and Validate the work effort.
An error message appears: "Division by zero"
A correct message clarifying the situation explained in the Description.
No tags attached.
blocks defect 00197923.0MP10 closed jecharri Not possible to validate a work effort because an error 
Issue History
2012-03-14 18:00jecharriTypedefect => backport
2012-03-14 18:00jecharrifix_in_branch => 2.50
2012-03-14 18:10jecharriversion3.0MP7.1 => 2.50MP39
2012-03-14 18:10jecharriTarget Version3.0MP10 => 2.50MP41
2012-03-26 10:34jecharriPriorityurgent => high
2012-03-26 10:34jecharriSeveritymajor => minor
2012-03-27 12:05hgbotCheckin
2012-03-27 12:05hgbotNote Added: 0046757
2012-03-27 12:05hgbotStatusscheduled => resolved
2012-03-27 12:05hgbotResolutionopen => fixed
2012-03-27 12:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/681cc0d238aab1961ba0157565a21f691a75bd4e [^]
2012-03-29 12:19VictorVillarNote Added: 0046874
2012-03-29 12:19VictorVillarStatusresolved => closed

Notes
(0046757)
hgbot   
2012-03-27 12:05   
Repository: erp/stable/2.50
Changeset: 681cc0d238aab1961ba0157565a21f691a75bd4e
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Wed Mar 14 18:48:08 2012 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/681cc0d238aab1961ba0157565a21f691a75bd4e [^]

Fixes issue 20026: Not possible to validate a work effort because an error

---
M src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0046874)
VictorVillar   
2012-03-29 12:19   
Verified