Hi,
In this case, since the prepayment wasn’t applied to the first invoice, it led to an over-application on the final invoice. To fix this:
You can leave the excess as a vendor credit or request a refund.
For future cases, ensure prepayments are correctly applied at invoice posting.
Consider setting up process checks to avoid posting invoices without applying the available prepayment.
Accounting entries:
On prepayment: Dr. Prepayment A/C, Cr. Vendor A/P
On invoice posting with prepayment applied: Dr. A/P, Cr. Prepayment A/C
Hope that helps!
Zain