Home Forums Support Can't delete credit

This topic contains 9 replies, has 4 voices, and was last updated by  Hillel Coren 1 day, 10 hours ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #20310

    willr
    Participant

    Hi

    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”} []

    I’m logged in as the main admin user. Any ideas?

    #20466

    Hillel Coren
    Keymaster

    Sorry for the late response, my email notification was in my spam folder.

    It sounds like the credit was created by overpaying for an invoice. Not sure about the error, I’ll try to reproduce it.

    #23332

    Matrenitski
    Participant

    I have exactly the same problem.

    Hillel, could you find a solution?

    #23341

    Hillel Coren
    Keymaster

    I haven’t been able to reproduce the issue

    #23420

    Matrenitski
    Participant

    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.

    Thank you in advance.

    Best regards
    Max

    #23421

    Hillel Coren
    Keymaster

    Thanks for report, we’ll try to replicate it.

    #23539

    Matrenitski
    Participant

    Hi Hillel!

    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.

    Can we do something about it?

    Thanks!

    • This reply was modified 3 days, 16 hours ago by  Matrenitski.
    • This reply was modified 3 days, 16 hours ago by  Matrenitski.
    #23542

    Randy
    Participant

    You can always delete the payment manually in the DB

    #23544

    Matrenitski
    Participant

    Yes, Randy, but it can be dangerous. Anyways in our case we can’t – we don’t have our own hosted instance.

    #23565

    Hillel Coren
    Keymaster

    Maybe if you restore the deleted payment you’ll be able to delete the credit?

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

Posted in: