Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019792Openbravo ERP05. Production managementpublic2012-02-16 13:182012-03-14 18:01
VictorVillar 
jecharri 
urgentmajoralways
closedno change required 
5
3.0MP7.1 
3.0MP10 
Core
No
0019792: 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.
VMA-Reviewed
depends on backport 00200262.50MP41 closed jecharri Not possible to validate a work effort because an error 
related to design defect 0019824 closed rafademiguel It should not be possible to create standards if completed qty is zero 
Issue History
2012-02-16 13:18VictorVillarNew Issue
2012-02-16 13:18VictorVillarAssigned To => vmromanos
2012-02-16 13:18VictorVillarModules => Core
2012-02-16 13:18VictorVillarResolution time => 1332198000
2012-02-16 13:19VictorVillarIssue Monitored: networkb
2012-02-16 13:53vmromanosTag Attached: VMA-Reviewed
2012-02-16 16:42VictorVillarDescription Updatedbug_revision_view_page.php?rev_id=3176#r3176
2012-02-16 16:42VictorVillarProposed Solution updated
2012-02-21 12:41VictorVillarRelationship addedrelated to 0019824
2012-03-02 17:31eduardo_ArgalAssigned Tovmromanos => jonalegriaesarte
2012-03-06 18:13jonalegriaesarteAssigned Tojonalegriaesarte => jecharri
2012-03-14 18:00jecharriStatusnew => scheduled
2012-03-14 18:00jecharrifix_in_branch => pi
2012-03-14 18:01jecharriNote Added: 0046428
2012-03-14 18:01jecharriStatusscheduled => closed
2012-03-14 18:01jecharriResolutionopen => no change required

Notes
(0046428)
jecharri   
2012-03-14 18:01   
The issue has been solved in Design Defect:
https://issues.openbravo.com/view.php?id=19824 [^]