Error Processing Employee Advance

Hi Team,
There is an error in the system when one tries to issues salary Advance to employee. After you give a Employee and create a payment entry, the Employee Advance still remains with a status of unpaid. See the attached images.