Account number for transaction type Vendor cash discount does not exist.
Reason:
In my case, the payment is $4,500 and the marked invoices are $5000 which is more than my payment.
Due to that I was getting the error.
Solution:
Mark the invoices with $4,500 and post the payment journal.
or
Post the payment journal and later settle the invoice with payment.
@Rahul Talasila