Cannot Receive from Supplier without any negative outstanding invoice while creating payment entry

I am getting error “Cannot Receive from Supplier without any negative outstanding invoice” while making payment to the supplier. how can I resolve the issue?

I have the same. did you find a solution?

The error occurs when you create a payment entry of type “receive” for a supplier (note that normally you pay to suppliers, and do not receive from them). The solution is to create a purchase invoice with “Is Return (Debit Note)” checked, and with a negative qty for your item(s), resulting in a negative grand total. Then, from this purchase invoice, select “Create” (the blue button) and “Payment”.