Jump to content

WHMCS not generating all invoices


Recommended Posts

Hello,

We have been having a issue with the invoice generation recently. It seems that not all the invoices are being generated. We have clients that are contacting us because their renewal invoice didn't generate and we have to manually change the due date by a day and generate the invoice manually for it to appear in their account.

 

I can confirm that the cron job is running once daily.

 

Thanks

Link to comment
Share on other sites

Hello Hosterbox,

 

This could be that your cron is timing out, are you getting the daily cron email? I've included some troubleshooting below if you are not

 

Invoice generation, payment reminders and account suspension/termination are some of the tasks handled by the daily cron job in accordance with your Automation Settings. Begin by reviewing Utilities > Logs > Activity Log and ensure you see a number of entries beginning "Cron Job" each day. The final entry every day should be "Cron Job: Completed".

 

 

* If you see no Cron Job entries at-all this means you have not configured your automation cron correctly, you must do this per our installation instructions. The relevant documentation can be found at http://docs.whmcs.com/Crons

 

 

* If you see some Cron Job entries but none after "Cron Job: Running Usage Stats Update" your cron is getting stuck at the Usage Stats Update stage. The most likely cause of this error is that you have an old server in Setup > Servers that is no longer available.

To resolve this, you should update or remove any inactive or offline servers from Setup > Servers so that they can all be connected to successfully. Or alternatively Update Usage Statistics can be disabled under Setup > Automation Settings.

 

 

* Finally, if you see some Cron Job entries but no "Cron Job: Completed" entry this suggests the cron is being terminated prematurely by your server. Please increase the memory_limit setting in your server's php.ini to 64M or 128MB which should easily be sufficient. Then see if things improve and you start getting the cron job report again over the next few days.

 

 

If the cron still doesn't complete with the increased memory limit and execution time please run the following command from the server's command line interface/SSH:

 

 

```

php -q /path/to/cron.php --force -vvv

```

 

 

Replace /path/to/ with the actual path to your cron.php file. This should then output some data for us to review.

We have collected some of the most most common errors and their causes, refer to the appropriate page in the following sections:

 

 

 

 

*http://docs.whmcs.com/Server_Modules

*http://docs.whmcs.com/Domain_Registrars

*http://docs.whmcs.com/Common_Troubleshooting_Tips#Server_Errors

Link to comment
Share on other sites

I had a similar problem and it turned out to be my customized invoicepdf.tpl where I defined a function, however cron loads that file every time a PDF gets generated, so it actually generated one invoice per day and then died. So you could enable error display in the whmcs config and remove the >/dev/null from cron, and see if any error pops up on the next daily cron run... that's how I found out.

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for all the advice, I looked through everything increased the timeout time and followed some of the advice in this thread.

 

But it looks like when we manually generate the invoices instead of the cron, it will send the invoice due e-mail to our clients but when you search for the invoice number, the system didn't actually create the invoice. So it's sending a e-mail to the client telling them that their invoice is due but when they click on the invoice link they get a error page because the invoice doesn't exist.

 

Let me know if this is something you guys have seen before.

Link to comment
Share on other sites

What error are they getting specifically?

 

There's no error, it sends the "Customer Invoice" e-mail but it doesn't actually create the invoice. Sometimes it won't create a few invoices sometimes it's all the invoice for that day that it won't generate.

Link to comment
Share on other sites

  • 3 years later...
On 3/9/2017 at 5:32 AM, Hosterbox said:

Hello,

We have been having a issue with the invoice generation recently. It seems that not all the invoices are being generated. We have clients that are contacting us because their renewal invoice didn't generate and we have to manually change the due date by a day and generate the invoice manually for it to appear in their account.

 

I can confirm that the cron job is running once daily.

 

Thanks

I'm getting the same issue, with  WHMCS 5.3.13, have you found the reason why? 
I can create the invoices manually, and the cron is working without any error.

Link to comment
Share on other sites

  • 6 months later...

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