The AutoAllocation Recently was not all cases where treated only when sum (availableAmt)=sum( openAmt)
but now AutoAllocation treated all cases :
1) sum (availableAmt)=0 and ( sum( openAmt)>0 or openAmt) <0 )
2) sum (openAmt)=0 and ( sum( availableAmt)>0 or availableAmt) <0 )
3) sum (openAmt)>0 and availableAmt) <0
4) sum (openAmt)<0 and availableAmt) >0
I checked your patch, but it doesn't match the actual iDempiere code, maybe is a customization of an old version?
If you found a bug, I think is better to explain the bug you found, the steps to reproduce the bug in GardenWorld environment, and propose a fix on top of the actual java class.