question: 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 ; }
target:  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.