@Override public double prevCumulativeQuantity(final Long woActivityId,Long mbHeaderId){
  if (mbHeaderId == null)   mbHeaderId=-1l;
  final Object[] params=new Object[]{mbHeaderId,mbHeaderId,WorksConstants.CANCELLED_STATUS,woActivityId};
  final Double pQuant=(Double)genericService.findByNamedQuery("prevCumulativeQuantity",params);
  if (pQuant == null)   return 0.0d;
 else   return pQuant.doubleValue();
}

@ Override public double prevCumulativeQuantity ( final Long woActivityId , Long mbHeaderId ) { if ( mbHeaderId == null ) mbHeaderId = - 1l ; final Object [ ] params = new Object [ ] { mbHeaderId , mbHeaderId , WorksConstants . CANCELLED_STATUS , woActivityId } ; final Double pQuant = ( Double ) genericService . findByNamedQuery ( "prevCumulativeQuantity" , params ) ; if ( pQuant == null ) return 0.0d ; else return pQuant . doubleValue ( ) ; }
get previous cumulative amount ( approved , approval pending and draft entries ) based on workorder activity id . this will search list of mbdetail and then get cmulative amount .
