1. If (vCollectableAmt > vRCA) and any one Reason Code Amt > 0 then replace that vCollectableAmt to that Reason Code Amt.
2. Else If Check (vCollectableAmt > vRCA) and Reason_RM_Amt = '0' and Reason_Fin_Closure_Amt = '0', then Add the difference of (vCollectableAmt - vRCA) in the behalf of max( Another 10 Reason Code Amt)
3.Else Check (vCollectableAmt > vRCA) and Reason_RM_Amt <> ' 0' and Reason_Fin_Closure_Amt <> ' 0' then Add the difference of (vCollectableAmt - vRCA) in the behalf of max( Another these two Reason_RM_Amt or Reason_Fin_Closure_Amt).