public boolean testAllocation(){
  BigDecimal alloc=getAllocatedAmt();
  if (alloc == null)   alloc=Env.ZERO;
  BigDecimal total=getPayAmt();
  if (!isReceipt())   total=total.negate();
  boolean test=total.compareTo(alloc) == 0;
  boolean change=test != isAllocated();
  if (change)   setIsAllocated(test);
  log.fine("Allocated=" + test + " ("+ alloc+ "="+ total+ ")");
  return change;
}

public boolean testAllocation ( ) { BigDecimal alloc = getAllocatedAmt ( ) ; if ( alloc == null ) alloc = Env . ZERO ; BigDecimal total = getPayAmt ( ) ; if ( ! isReceipt ( ) ) total = total . negate ( ) ; boolean test = total . compareTo ( alloc ) == 0 ; boolean change = test != isAllocated ( ) ; if ( change ) setIsAllocated ( test ) ; log . fine ( "Allocated=" + test + " (" + alloc + "=" + total + ")" ) ; return change ; }
test allocation ( and set allocated flag )
