Having trouble deleting a mystery credit that’s appeared on a client - it’s showing as “Credit created by payment” When I try to delete it, I get a notification to say that the credit has been deleted but it’s still in the list.
If I try to edit it, I get an exception. Checking the logs, I see the following:
[2019-04-03 15:34:14] production.ERROR: Illuminate\Auth\Access\AuthorizationException [0] : /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php [Line 28] => This action is unauthorized. {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“xxxxxxx”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36”,“locale”:“en”,“ip”:“xx.xx.xx.xx”,“count”:4,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“credits/4/edit”} []
We both don’t know how did it happen, but it seems we have same problem.
Maybe there’s some workaround, checking DB for broken links or just some way to delete this record manually from DB?
We are using not the self-hosted version, we need your help.
I can provide more details, so we could address our problem specifically for our setup.
It seems I am beginning to understand when it happens.
We create payment towards a invoice.
Then we find out it was false and delete the payment, assuming it will be deleted completely and balance is back to where it was before.
The balance is back, but it leaves the amount of the payment hanging as credit, which can not be deleted anymore, since it references the deleted payment.