Jump to content

WHMCS Bugs


KNK

Recommended Posts

Hello. So after I truncated the invoices db of WHMCS every time I create an invoice for a new user it adds some other service there randomly.

Same as when someone orders through my website if they order for example service (1) on checkout it will add another service on top of it for no reason and that service doesn't even exist anymore.

Also invoices are not being generated. Although no errors when running the cron job. 

I have Version: 8.4.0

Any help please?

Link to comment
Share on other sites

You forgot to truncate tblinvoiceitems where invoice items are stored so now every time you create an invoice you endup randomly matching tblinvoice.id with tblinvoiceitems.invoiceid. That's why you see old stuff appearing on new invoices.

Solution? Delete all records in tblinvoiceitems where tblinvoiceitems.invoiceid is greater than your maximum tblinvoice.id. Let's say your last invoice ID is 1000. You'll need to...

 DELETE FROM tblinvoiceitems WHERE invoiceid > '1000'

p.s. backup, backup, backup!

Edited by Kian
Link to comment
Share on other sites

4 hours ago, Kian said:

You forgot to truncate tblinvoiceitems where invoice items are stored so now every time you create an invoice you endup randomly matching tblinvoice.id with tblinvoiceitems.invoiceid. That's why you see old stuff appearing on new invoices.

Solution? Delete all records in tblinvoiceitems where tblinvoiceitems.invoiceid is greater than your maximum tblinvoice.id. Let's say your last invoice ID is 1000. You'll need to...


 DELETE FROM tblinvoiceitems WHERE invoiceid > '1000'

p.s. backup, backup, backup!

Thank you! Although it's not generating new invoices now. It's set to generate to generate 7 days before due date. I forced it with the cron job -all -vvv and nothing happens what could be the reason?

Link to comment
Share on other sites

1 hour ago, DennisHermannsen said:

If an invoice has already been generated for a product on a specific date, you will need to change the due date. WHMCS doesn't generate a new invoice unless you change the due date.

So I just add +1 day on the services that invoice weren't generated?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated