Payment Entry Issue while Submitting

Recently I am encountering an issue while creating payment entry, an employee has taken advance, and against that employee advance when I am creating payment entry my accounts paid to field is being set as blank while saving and the filter applied is account type should be of payable, the account type I am using is of receivable. I can understand that if I change the account type to payable it will allow me to save, but why is it giving error to selected cases only.