Error in payment entry


i am trying to insert payment entry for supplier. All fields was populated as usual but i can’t save document. Message is


Bellow in Allocate Payment Amount i found both Purchase Invoices, submited and canceled 80-1, 80-2

I goes back in Purchase Invoice and cancel and delete 80-2, and after that try to delete 80-1 to fix the problem but he gives me error again


couldnt delete this record.

you should first delete GL Entry GL0007394 after that you can delete Purchase Invoice

I try to delete GL entry but gets new error message again


Is GL Entry GL0007394 linked to any other transaction?

I think you should skip those cancelled Invoices in the reference. If they are cancelled, then they are of no use.