Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025105
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] 05. Production managementmajoralways2013-11-07 17:272017-02-15 09:47
ReporterVictorVillarView Statuspublic 
Assigned ToTriage Omni OMS 
PriorityimmediateResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0025105: The Production cost should be calculated independently if the Cost center is defined in the Production Run

DescriptionThe Production cost should be calculated independently if the Cost center is defined in the Production Run
Steps To ReproduceThe Production cost should be calculated independently if the Cost center is defined in the Production Run
Proposed SolutionThere is a restriction at the beginning of ma_production_cost function when creates the Cur_ProductionPlan cursor --> "AND pp.MA_COSTCENTER_VERSION_ID IS NOT NULL":


SELECT pp.M_ProductionPlan_ID, pp.ma_costcenter_version_id,
SUM(CASE pl.productiontype WHEN '+' THEN (mp.weight * pl.movementqty)
ELSE 0 END) AS ProducedKG,
SUM(CASE pl.productiontype WHEN '+' THEN (pl.movementqty)
ELSE 0 END) AS ProducedUd,
SUM(CASE pl.productiontype WHEN '+' THEN COALESCE(wrpp.ComponentCost,1) ELSE 0 END) AS CompCostSum,
                                         ccv.costuom, ccv.COST, pp.MA_CostCenterUse, pp.MA_WRPHASE_ID, pp.LINE
                                  FROM M_PRODUCTIONPLAN pp INNER JOIN M_PRODUCTIONLINE pl ON pp.m_productionplan_id = pl.m_productionplan_id
                                                                                         AND pp.m_production_id = p_Production_ID
                                                           INNER JOIN M_PRODUCT mp ON pl.m_product_id = mp.m_product_id
                                                           LEFT JOIN MA_COSTCENTER_VERSION ccv ON ccv.MA_COSTCENTER_VERSION_ID = pp.ma_costcenter_version_id
                                                           LEFT JOIN MA_WRPHASE wrp ON wrp.ma_wrphase_id = pp.ma_wrphase_id
                                                           LEFT JOIN MA_WRPHASEPRODUCT wrpp ON wrp.ma_wrphase_id = wrpp.ma_wrphase_id
                                   AND wrpp.m_product_id = pl.m_product_id
                                  WHERE NOT EXISTS (SELECT 1
                                                   FROM M_PRODUCTIONLINE pl1, M_PRODUCTIONPLAN pp2, M_PRODUCTIONLINE pl2
                                                   WHERE pl1.m_productionplan_id = pp2.m_productionplan_id
                                                     AND pl1.m_product_id = pl2.m_product_id
                                                     AND pl2.productiontype='-'
                                                     AND pl1.productiontype='+'
                                                     AND pp2.m_production_id = p_Production_ID
                                                     AND pl2.M_productionplan_ID = pp.M_ProductionPlan_ID
                                                     AND pl1.calculated = 'N')
   AND pp.MA_COSTCENTER_VERSION_ID IS NOT NULL
                                 GROUP BY pp.M_ProductionPlan_ID, pp.ma_costcenter_version_id, ccv.costuom,
                                           ccv.COST, pp.MA_CostCenterUse, pp.MA_WRPHASE_ID, pp.LINE


Also the lines should NOT be calculated = Y when there is not defined the cost center version:

    UPDATE M_PRODUCTIONLINE
    SET CALCULATED='Y'
    WHERE M_PRODUCTIONPLAN_ID IN (SELECT M_PRODUCTIONPLAN_ID
                                  FROM M_PRODUCTIONPLAN
                                  WHERE M_PRODUCTION_ID = p_Production_ID
                                    AND MA_COSTCENTER_VERSION_ID IS NULL);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0023505 newTriage Omni WMS The Cost Center Version should not be necessary to calculate the cost of manufacturing products 
related to defect 0035300 closedmcobas Empty error message when applying a cost adjustment to a transaction associated to a work effort line 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-11-07 17:27 VictorVillar New Issue
2013-11-07 17:27 VictorVillar Assigned To => dmiguelez
2013-11-07 17:27 VictorVillar Modules => Core
2013-11-07 17:27 VictorVillar Triggers an Emergency Pack => No
2013-11-07 17:29 VictorVillar Proposed Solution updated
2013-12-16 09:35 VictorVillar Issue Monitored: networkb
2013-12-16 09:35 VictorVillar Assigned To dmiguelez => jonalegriaesarte
2014-03-31 22:43 ngarcia Relationship added related to 0023505
2017-02-15 09:47 ngarcia Assigned To jonalegriaesarte => Triage Finance
2017-02-17 13:46 ngarcia Relationship added related to 0035300


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker