Have v5 finally running, data migrated, and everything seems ok. All balances were clean and all seemed ready to go. Have a payment gateway set up successfully using Stripe.
Created a test client, and then a test invoice (used a small $2.00 amount for testing). Paid the invoice online, payment was accepted and processed via Stripe, and all seems good. However, now that client is showing out of balance. When looking at the ledger for the client, I see the invoice listed twice. The following entries are showing in the ledger:
Payment -$2.00 ($2.00 balance)
Invoice 2.00 ($4.00 balance)
Invoice 2.00 ($2.00 balance) (same invoice number as above)
Client created 0.00 balance
Looked in the database directly, only one invoice is listed in the invoice table. Unsure of where/why the invoices is showing twice in the ledger and the client shows out of balance now.
This isn’t the first time someone has mentioned the ledger going out of whack, however I have been unable to recreate it myself.
I followed your steps.
Create invoice for $2.
Pay invoice using Stripe in Test Mode
View Client balance and it appears correct at $0.
I’d really like to get to the bottom of this, so if you are able to consistently recreate this issue can you please post the steps you used to get the ledger out of balance.
Here’s some additional detail I’ve discovered and found interesting. These are the records for this set of transactions in the company_ledgers table. Note the duplication for the invoice transaction, particularly the timestamps.
So, it appears it is happening upon creating the invoice and selecting to email the invoice (removing it from draft). As soon as I did that, it generated these ledger records.
I clicked on clients, clicked the + icon, and created the client.
I then clicked on the invoices module, clicked the + icon, and created a new invoice for the new client.
I then clicked the options button (three dots in top right corner), and selected Email Invoice. Email template displayed, and I clicked Send.
This is when the records were generated, and the client’s open balance now shows double.
The above is pretty consistent. This happens on literally every invoice that is created. Really curious as to the possible cause, especially if it’s not happening to everyone. Unfortunately, it renders the app almost useless until I can figure this out. Anyone have a chance to look into this? I will keep digging…
It’s been some time, but here’s an update on this issue… This happens any time the option is chosen to Email Invoice while the invoice is in a Draft state. The email is sent, state changed to Sent, and the ledger shows a duplicated entry. If I set the state of the invoice from Draft to Sent, and then choose the option to Email Invoice, the ledger and client balance remain in tact with expected values.