Payment Marked as 'Unapplied' Due to PDF Generation Issue – How to Resolve?

Version ie <v5.10.50>

Environment

Checklist

  • Can you replicate the issue on our v5 demo site https://demo.invoiceninja.com or Invoice Ninja? No because PDF generation works
  • Have you searched existing issues? Didn’t found identical problem.
  • Have you inspected the logs in storage/logs/laravel.log for any errors? Yes. Found PDF generation issues and found out that blocked Google Fonts API was the reason. Fixed it.

Describe the bug

One of my customers paid their invoice via bank transfer. To record this, I went to ‘Invoices’ and clicked ‘Actions’ → ‘Enter Payment’ next to the relevant invoice. I filled in all the details and clicked ‘Save’. Unfortunately, at this point, I assume that PDF generation which happens in background failed and after 60 seconds timeout the payment only just half-way applied.

Steps To Reproduce (only possible if your HTML → PDF generation requires Google Fonts and you block the internet traffic)

  • Go to ‘Invoices’ and select ‘Actions’ → ‘Enter Payment’ next to a specific invoice.
  • Fill in the payment details and click ‘Save’.
  • If PDF generation fails (e.g., due to port restrictions), the payment might be marked as ‘Unapplied’ in the Payments section.

Expected Behavior

The payment should apply completely, marking the invoice as ‘Paid’ without the ‘Unapplied’ status in the Payments section or not at all.

Additional context

  • The invoice was marked as ‘Paid’ and archived as expected.
  • No notification email was sent to the customer, which is acceptable in this case.
  • The payment record is listed under ‘Payments’ but flagged as ‘Unapplied’, causing issues with compliance regulations, as it suggests an incomplete transaction.

Since no open invoices are available to reapply this payment, I am concerned about deleting and re-adding it due to strict regulations on immutability in Germany. If possible, a solution to correct the ‘Unapplied’ status without altering accounting records is needed.

To prevent similar issues in the future, a suggestion would be to script a halt for the payment process if PDF generation or other essential background processes fail, avoiding partial application.

Screenshots

If required I can provide of course.

Logs

Log only notified about the snappdf wasn’t able to process before timeout has been reached.

Hi,

I suggest following up by creating a discussion on GitHub

Hello hillel, of course: Payment Marked as ‘Unapplied’ Due to PDF Generation Issue – How to Resolve? · invoiceninja/invoiceninja · Discussion #10262 · GitHub. Thank you.