Jump to content

Refunded invoices that are still due are shown as $0 balance in client area


Recommended Posts

This happened when a client accidentally left someone else's credit card associated with their account - it billed the wrong card for a few invoices. We then refunded the amount and while the client was able to view each invoice and complete payment again using the correct card, the client area showed the invoices balances as $0.

 

Steps to reproduce:

 

1. Generate an invoice

2. Pay the full amount to have the invoice marked paid

3. Refund the payment such that at the bottom of the invoice in the admin area, it shows the payment and the negative payment.

4. Mark the invoice unpaid so it is due once again

 

At this point the admin area shows everything perfectly - the list of invoices shows the total amount due and that the invoice is unpaid. Viewing the single invoice from the client area also shows the invoice balance correctly.

 

However, the client area dashboard/overview page shows the invoice like this:

 

Invoice # Invoice Date Due Date Total Balance Status

10 20/05/2011 25/05/2011 $99.29CAD $0.00CAD Unpaid

 

Meaning the balance is $0 after a refund. Thus the total due amount is $0 and the client thinks they owe nothing even though the invoice is still due. As mentioned above, upon viewing the actual invoice (rather than just the balance shown in the dashboard) within the client area, we see Balance: $99.29CAD.

 

So it appears that the calculation for total balance in the client area is not being done accurately after a refund has been applied. This refers to smarty vars {$invoice.balance} and {$totalbalance} though I assume $totalbalance is simply a sum of each of the $invoice.balance variables, so the problem is likely found in calculating $invoice.balance.

 

Jordan

Link to comment
Share on other sites

othellotech,

 

What is this -ve transaction you speak of?

 

I couldn't find any additional options in the invoice admin area to cover refunds...

 

When I refunded the total amount on the invoice, here's what I did:

 

1. viewed the invoice in WHMCS admin, clicked the "Refund" tab.

2. The only transaction that is refundable was the total amount single transaction on the invoice, so that's already selected in the 'Transactions' dropdown by default

3. Left the amount blank, since it says "Leave blank for full refund"

4. Set refund type to "Refund through Gateway" which *is* supported by the Psigate module (which we were using at the time). I can confirm that the refund was sent through Psigate from within their merchant area.

 

The invoice shows two transactions in the list at the bottom. The original payment and the refund with transaction ID's for both. I do not wish to (and really cannot for accounting reasons) remove the transactions from the invoice. They now cancel each other out to $0 anyway, leaving the original amount due.

 

I then marked the invoice as unpaid (since it is). In fact, this leads to a nice feature request - when refunding any amount of the invoice, I think it should be automatically set to unpaid, but this is out of scope for this bug report.

 

I do not see any other refund options. What is this "-ve" you refer to?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated