I have an invoice for a client that was $701.88 inclusive of payment surcharges.
First they paid a partial amount through the billing portal, incurring a fee.
Later on they paid the remaining amount and incurred another fee.
The payments they made add up to $701.88 as expected as this was also the final invoice cost and invoice ninja has put the applicable fees on the invoices.
However when I look at the client, it says their balance is -$12.58 and I can’t understand why.
There is nothing else for this client other than what you see in the screenshots. No credits, no other payments etc.
Is this a bug or what should I be checking here? Nowhere else can I work out how this has happened and even the statement for the customer says a $0 balance.
@hillel I also noticed at the end of your command it says:
"2022-07-13 10:16:27 Done: FAILURE
2022-07-13 10:16:27 Total execution time in seconds: 0.20475912094116
and when I run it with the --fix=true parameters it doesn’t actually seem to be fixing the errors?
However the command doesn’t show any issues for the client in question though so it’s not picking up any issue with this client
No, the gateway fees are shown in a screenshot in my first post.
The first payment for $570.28 included the $10.28 fee.
Then the remaining payment of $131.60 included the fee $2.60.
This is why I have no idea what that $12.58 is.
How can I correct this? I need to invoice this client but because they are in a negative balance, whenever I invoice them it’s reflecting a balance of $12.58 less…
This will fix the balance. I’ve done some additional testing on partial invoices and haven’t been able to recreate it. It would be helpful to understand more about this issue, in particular when the balance went out of sync.
I have tried this command amongst many other check-data commands and there are no issues found. Whatever has happened seems to be on a deeper database level.
This is the only client in which this bug has occurred and I only just noticed this issue when I went to invoice them for a second time.
All I can say is that I had an invoice for $689 originally. They made a partial payment via Stripe through the client portal and that partial payment was $560 + $10.28 fee, totaling $570.28.
When I completed the work, they paid the rest of the invoice again via the client portal and this time it was a payment of $129 + $2.60 fee, totaling $131.60.
As you can see from the screenshots, this is what I am seeing on the invoice and in the payments tab so there is nothing to explain this $12.58 that I can make sense of.
I might just have to create the client again and start fresh which is not ideal because they may wish to access their previous invoice in the client portal. Can I somehow correct this on a database level. What would be the best way to correct this?
2022-07-13 11:55:21 2022-07-13 11:55:21 Running CheckData... on Connected to Default DB Fix Status = Fixing Issues
2022-07-13 11:55:21 0 clients with incorrect balances
2022-07-13 11:55:21 0 clients with incorrect paid to dates
2022-07-13 11:55:21 0 contacts without a contact_key
2022-07-13 11:55:21 0 clients without any contacts
2022-07-13 11:55:21 0 contacts without a contact_key
2022-07-13 11:55:21 0 vendors without any contacts
2022-07-13 11:55:21 0 invoices without any invitations
2022-07-13 11:55:21 0 quotes without any invitations
2022-07-13 11:55:21 0 credits without any invitations
2022-07-13 11:55:21 0 recurring_invoices without any invitations
2022-07-13 11:55:21 0 wrong invoices with bad balance state
2022-07-13 11:55:21 0 users with duplicate oauth ids
2022-07-13 11:55:21 Done: SUCCESS
2022-07-13 11:55:21 Total execution time in seconds: 0.20802307128906
That is definitely strange. After the invoice was paid, were any further changes manually made to the invoice at all? Were fees removed directly from the invoice? or were any amounts changed?
For the check data script for client balances, we sum up ALL invoice balances with sent/partial paid status and then compare this to the client balance, this would indicate that there is an invoice/s balance for this client which sums up to -12.58
@david I think the invoice must have been adjusted or something after the fact and this caused some bug but I can’t recall. Do you have any suggestion on what I can check to resolve this?
I have had to just archive that client and create another one as I need to invoice them and don’t want confusion with it showing the wrong account balance to them.
If there’s something further in the DB I can check or you have a further suggestion, I can go back and look at the archived client closer.