How to delete a credit on the backend?

Hello! I just upgraded from v4 on a shared host without proc_open to v5 on Cloudron - all went well, except things got even better when I deleted my payment processor and added it back (with new API keys, etc.)

That being said I had credits that imported without dates, I think, before migration, one had been applied and one not, either way, I thought no problem, let’s delete both and re-create the one remaining.

So I did, but, even when deleted they are still showing up in the client overview. Is there an easy fix for this (maybe just completely removing on the backend?), and, if so, would this disrupt anything since one had already been applied previously? Thank you.

Credits - with the ones that migrated from v4 I deleted once in v5 - Client 2’s had been applied to an invoice in v4 (I think, which is why the amount is $0.00 even though remining is $9.74, maybe these numbers got reversed somehow), Client 1’s had not been applied either before or after migration.

The applied in v4 and deleted in v5 credit still being reported in the “Details” section (upper left corner) of the Client in the Client menu (this is Client 2):

client 2

Also, the newly created credit for Client 1 is being added together with the old, deleted, and unapplied credit from v4 for my Client 1 in their details shown here:

client 1

Basically it appears that the old credits have not gone away after deletion, and maybe even imported improperly from v4 (in the case of Client 2, where it had been already applied but still has the full amount remaining)


Is it possible you have the table filter set to include deleted records? We strongly advise against making manual changes to the database, it will very likely break something.

The inclusion of deleted credits on the client overview is a bug, we’ll make sure it’s corrected.

Hi @hillel! I did have it filter to include the deleted records - temporarily as I was looking for where the client overview credits were coming from.

Very good to know! Will not try anything here.

No problem, however, is this just a client overview issue, or, if I enable “use available credits” in payment settings, will clients be able to apply the deleted credits?


I haven’t tested it but I’d assume this is just a display issue in the admin portal.

Okay, great, thanks :smiley:

I’m sure this is accurate, as checking in the client portal does not show the deleted credits:

Is it okay to leave the old (now deleted) credits without a date?

Just to report all findings, I noticed the applied credits imported from v4 to v5 without a date, and for $0.00 for the credit itself (with the credit remaining being the same as in client details - probably the same bug there). The unapplied credits imported for the correct amount (credit amount and remaining amount being the same), they were just missing the date also (it’s basically blank or null in the GUI). The public note I had entered for a credit is in the correct place in v5.

(Also, the old credits are numbered 000, 001, etc., whereas the new credits use the same counter as my invoice counter - of course, maybe that is a setting somewhere that I applied.)

Thanks for the details!

cc @david

1 Like