public boolean consumeEncumbranceBudget(final Map<String,Object> detailsMap){
  if (detailsMap == null)   throw new ValidationException(Arrays.asList(new ValidationError("required input is null","required input is null")));
  detailsMap.put(Constants.CONSUMEORRELEASE,true);
  final BigDecimal bd=getDetails(detailsMap);
  return bd.intValue() == 1;
}

public boolean consumeEncumbranceBudget ( final Map < String , Object > detailsMap ) { if ( detailsMap == null ) throw new ValidationException ( Arrays . asList ( new ValidationError ( "required input is null" , "required input is null" ) ) ) ; detailsMap . put ( Constants . CONSUMEORRELEASE , true ) ; final BigDecimal bd = getDetails ( detailsMap ) ; return bd . intValue ( ) == 1 ; }
this api is to check whether the planning budget is available or not . for the amount passed if there is sufficient budget available api will return true . else it will return false . at any point the budgetavailable will show the right picture of how much more we can plan for . < p > assumptions - 1 ) on load of the budget there will be budgetavailable amount loaded using the multiplier factor . 2 ) on load of supplementary budget budget available is recalculated and updated . < p > for the sake of audit we should be updating the budgetusage object with the reference object and the moduleid and amount for any budget consumed . this will be used for reporting as to which object consumed how much and when .
