Reversing invoices - Correct process?

Version ie <v5.10.36>

Environment <Other: Debian 12 VM, bare-metal via MGM CLI Script>

Checklist

  • Can you replicate the issue on our v5 demo site https://demo.invoiceninja.com or Invoice Ninja? Not tried. DEMO-sites not working or horrible slow.
  • Have you searched existing issues? Yes, didn’t found matching case.
  • Have you inspected the logs in storage/logs/laravel.log for any errors? Yes. No errors here.

Describe the bug

When trying to reverse a paid and archived invoice in InvoiceNinja, the process doesn’t seem to correctly reflect the reversal in the dashboard or in the “Profit and Loss” report. After applying the credit and refunding the payment, the dashboard still shows the invoice amount, and the profit report inaccurately reflects the refunded amount as profit.

Steps To Reproduce

Here’s the step-by-step of what I’ve done:

  1. I created an invoice for a customer (Max Mustermann / John Doe) for €80. The invoice number is 20241017-0069.
    
  2. I marked this invoice as "Paid," which triggered an email to the customer and automatically archived the invoice. This invoice was also sent to my Paperless DMS for archiving.
    
  3. To reverse the invoice, I restored it from the "Archived" state to access the "Reverse" action.
    
  4. The "Enter Credit" screen appeared, automatically populating with the original invoice's items. I added a public note explaining that this credit is meant to reverse invoice 20241017-0069 and sent it to the customer via "Email Credits".
    
  5. However, my dashboard still shows that I invoiced €80 and received €80 in payments, but my goal is to bring this to zero without deleting the original invoice.
    

Here’s where things get tricky:

  1. The created credit (credit number 2024-10-17_0024) is automatically marked as "Sent". What now?
    
  2. First idea: I tried using the "Apply Credit" option, but no invoices are listed for selection, and I can't apply the credit.
    
  3. Second idea: I tried removing the "Paid" status of invoice 20241017-0069 by using the "Refund Payment" option in the Payments area. This allowed me to mark the invoice as "Refunded" and set the status back to "Sent".
    
  4. After doing this, I was able to apply the credit from earlier, ensuring no duplicate email was sent to the DMS or the customer. The original invoice 20241017-0069 was now again marked "Archived".
    
  5. Now, my dashboard shows no payments or outstanding amounts, but it still lists €80 under invoices. Additionally, the "Profit and Loss" report incorrectly shows a €80 profit, which isn't accurate since this was refunded.
    

Expected Behavior

The dashboard and reports should reflect that the original invoice has been reversed, with no profit recorded, and the balance should be brought to zero.

Additional context

  • The invoice is archived after being marked as paid.
  • The credit note is sent, but applying it doesn’t zero out the balance in the dashboard.
  • The “Profit and Loss” report shows the refunded amount as profit, which is incorrect.

Screenshots





I hope you can follow my explaination and maybe tell me the right process of how to reverse invoices correctly so that no profit or loss is reported and every action is properly documented to get reviewed later.

Thanks in advanced.
Chris

Hi,

Thanks for reporting this, let’s follow up on GitHub.

alright: Inconsistent Profit/Loss Reporting Between Web Interface and Windows Desktop App · Issue #694 · invoiceninja/admin-portal · GitHub