Search in sources :

Example 1 with I_C_UOM

use of org.compiere.model.I_C_UOM in project adempiere by adempiere.

the class DefaultRoutingServiceImpl method convertDurationToResourceUOM.

protected BigDecimal convertDurationToResourceUOM(BigDecimal duration, int S_Resource_ID, I_AD_WF_Node node) {
    MResource resource = MResource.get(Env.getCtx(), S_Resource_ID);
    I_AD_Workflow wf = MWorkflow.get(Env.getCtx(), node.getAD_Workflow_ID());
    I_C_UOM resourceUOM = MUOM.get(Env.getCtx(), resource.getC_UOM_ID());
    return convertDuration(duration, wf.getDurationUnit(), resourceUOM);
}
Also used : MResource(org.compiere.model.MResource) I_AD_Workflow(org.compiere.model.I_AD_Workflow) I_C_UOM(org.compiere.model.I_C_UOM)

Aggregations

I_AD_Workflow (org.compiere.model.I_AD_Workflow)1 I_C_UOM (org.compiere.model.I_C_UOM)1 MResource (org.compiere.model.MResource)1