Difference between revisions of "Invoicing Issues"

From WHMCS Documentation

Line 24: Line 24:
 
There are a couple of reasons for invoices not generating, the most obvious are that there's a '''cancellation request''' for the service or it's in cancelled, terminated, fraud or expired '''status'''. It could also be that the '''cron job''' is not being run, please refer to [[#Invoices/Payment Reminders not Generated|the above]] to check that.
 
There are a couple of reasons for invoices not generating, the most obvious are that there's a '''cancellation request''' for the service or it's in cancelled, terminated, fraud or expired '''status'''. It could also be that the '''cron job''' is not being run, please refer to [[#Invoices/Payment Reminders not Generated|the above]] to check that.
  
If it's neither of those then it's possible an invoice was generated but then '''deleted''' by a member of staff - you'd need to check the client's Log tab for any Invoice Deleted or Order Deleted entries. WHMCS never generates duplicate invoices for the same service on the same due date, so if a new invoice is required after deleting an invoice you would need to manually move the Next Due Date forward/back by 1 day. Doing this should get invoice generation going again.
+
Invoices are only generated once the service's Next Due Date is within the Setup > Automation Settings > Invoice Generation value, so if the '''Next Due Date''' is n the future no invoice will be generated. For example if today's date is 01/01/2012:
 +
 
 +
Next Due Date: 07/01/2012<br />
 +
Invoice Generation: 7<br />
 +
= Invoice '''will''' generate.
 +
 
 +
Next Due Date: 08/01/2012<br />
 +
Invoice Generation: 7<br />
 +
= Invoice '''not''' generated.
 +
 
 +
If it's none of those then it's possible an invoice was generated but then '''deleted''' by a member of staff - you'd need to check the client's Log tab for any Invoice Deleted or Order Deleted entries. WHMCS never generates duplicate invoices for the same service on the same due date, so if a new invoice is required after deleting an invoice you would need to manually move the Next Due Date forward/back by 1 day. Doing this should get invoice generation going again.
  
  
Line 40: Line 50:
 
Finally the client might not match any of your tax rules, the state/country must be an '''exact match''' and is case sensitive. So for example if a tax rule exists for the state "TX" and the client's state is "Texas" these do not match and therefore tax would not be applied. Therefore two tax rules would be required, one for "TX" and another for "Texas".
 
Finally the client might not match any of your tax rules, the state/country must be an '''exact match''' and is case sensitive. So for example if a tax rule exists for the state "TX" and the client's state is "Texas" these do not match and therefore tax would not be applied. Therefore two tax rules would be required, one for "TX" and another for "Texas".
 
Any changes will be applied to subsequent invoices, existing invoices will not be changed.
 
Any changes will be applied to subsequent invoices, existing invoices will not be changed.
 +
 +
 +
==Multiple Invoices for the same Service==
 +
Multiple invoices for the same service but with ''different'' due dates may be generated if the service has a due date in the past. This usually occurs with services imported using the WHM/cPanel importer or services added manually by a member of staff where the Next Due Date is left at 00/00/0000. As this due date is in the past WHMCS is generating all invoices between then and today to ensure the client is fully paid up.
 +
 +
To correct this change the Next Due Date to the date of the client's next payment via their Products/Services tab. Any erroneous invoices can safely be deleted/cancelled.

Revision as of 17:31, 2 August 2012

There may be occasions where invoices are not generated as expected by the system. The problem is usually a misconfiguration or human error, this page explains the symptoms, causes and resolutions to the most common invoicing problems.

Invoices/Payment Reminders not Generated

First please ensure the Overdue Notices option in unticked on the client's Profile tab, ticking the option will prevent overdue notices being sent to the client.

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. If you find that some or none of the above are occurring then this could indicate the cron job is not running successfully.

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 please ensure display_errors is enabled in the server's PHP configuration and enable the Setup > General Settings > Other tab > Display Errors option, then run the cron manually by visiting the cron.php file in your browser. You should now see an error output to the screen. We have collected some of the most most common errors and their causes, refer to the appropriate page in the following sections:


Items Not Invoicing

There are a couple of reasons for invoices not generating, the most obvious are that there's a cancellation request for the service or it's in cancelled, terminated, fraud or expired status. It could also be that the cron job is not being run, please refer to the above to check that.

Invoices are only generated once the service's Next Due Date is within the Setup > Automation Settings > Invoice Generation value, so if the Next Due Date is n the future no invoice will be generated. For example if today's date is 01/01/2012:

Next Due Date: 07/01/2012
Invoice Generation: 7
= Invoice will generate.

Next Due Date: 08/01/2012
Invoice Generation: 7
= Invoice not generated.

If it's none of those then it's possible an invoice was generated but then deleted by a member of staff - you'd need to check the client's Log tab for any Invoice Deleted or Order Deleted entries. WHMCS never generates duplicate invoices for the same service on the same due date, so if a new invoice is required after deleting an invoice you would need to manually move the Next Due Date forward/back by 1 day. Doing this should get invoice generation going again.


Double Invoices/Charges/Blank Invoices

There are several invoicing issues all caused by a common misconfiguration, the symptoms are; two invoices being generated for the same service and due date, a client being double-charged for the same invoice or a completely blank invoice being generated.

This is caused by the cron job being run twice at the same time, the cron should only be run once per day and never simultaneously. To confirm this review Utilities > Logs > Activity Log there should only be one "Cron Job: Completed" entry per day. If there is more than one check the server's cron job configuration to ensure there is only one entry for the cron.php file in accordance with our our documentation.


Tax Not Applied to Invoices

If tax is not applied to an invoice this means WHMCS believe it is not eligible under your tax rules. First ensure tax is enabled and the relevant Apply Tax options are ticked on the Tax Rules page, if it's an invoice for a product ensure this option is ticked in the product configuration.

Secondly ensure the Tax Exempt checkbox is unticked on the client's Profile tab. This may have been ticked by a member of staff or our VAT Invoicing Addon Module (if installed).

Finally the client might not match any of your tax rules, the state/country must be an exact match and is case sensitive. So for example if a tax rule exists for the state "TX" and the client's state is "Texas" these do not match and therefore tax would not be applied. Therefore two tax rules would be required, one for "TX" and another for "Texas". Any changes will be applied to subsequent invoices, existing invoices will not be changed.


Multiple Invoices for the same Service

Multiple invoices for the same service but with different due dates may be generated if the service has a due date in the past. This usually occurs with services imported using the WHM/cPanel importer or services added manually by a member of staff where the Next Due Date is left at 00/00/0000. As this due date is in the past WHMCS is generating all invoices between then and today to ensure the client is fully paid up.

To correct this change the Next Due Date to the date of the client's next payment via their Products/Services tab. Any erroneous invoices can safely be deleted/cancelled.