How to handle unapplied invoice payments