Difference between revisions of "Invoicing Issues"

From WHMCS Documentation

m
m
Line 1: Line 1:
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.
+
There may be occasions when the system doesn't generate invoices properly. The problem is usually a misconfiguration or human error.
  
 
==Invoices/Payment Reminders not Generated==
 
==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.
 
  
If the '''Email Templates''' are not present then the system will be unable to send an email, so review Setup > Email Templates and ensure the ''Invoice Created'' and ''Overdue Notice'' emails templates are listed.
+
Make sure that you have deselected the '''Overdue Notices''' option on the client's Profile tab. Selecting the option will prevent the system from sending overdue notices to the client.
  
Invoice generation, payment reminders and account suspension/termination are some of the tasks handled by the daily [[Crons|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.
+
If the '''Email Templates''' are not present, the system will be unable to send an email. Review Setup > Email Templates and ensure the ''Invoice Created'' and ''Overdue Notice'' emails templates are present.
  
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".
+
Invoice generation, payment reminders, and account suspensions and terminations are some of the tasks that the daily [[Crons|cron job]] handles in accordance with your [[Automation Settings]]. If you find that some or none of the above are occurring, this could indicate the cron job is not running successfully.
  
* 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 [[Crons|cron job]].
+
Review '''Utilities > Logs > Activity Log''' and make sure that you see a number of entries beginning with "Cron Job" each day. The final entry every day should be "Cron Job: Completed".
  
* 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.<br />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.
+
* If you see no cron job entries, this means you have not configured your automation cron job correctly. You must do this per our installation instructions. For more information, see [[Crons|Crons]].
  
* 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 you see some cron job entries, but none after "Cron Job: Running Usage Stats Update", your cron job 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.<br />To resolve this, update or remove any inactive or offline servers from Setup > Servers so that they can all connect successfully. Alternatively, you can disable Update Usage Statistics under Setup > Automation Settings.
  
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:
+
* If you see some cron job entries, but no "Cron Job: Completed" entry, this suggests that your server is prematurely terminating the cron job. Increase the <tt>memory_limit</tt> setting in your server's <tt>php.ini</tt> to 64 MB or 128 MB, which is usually sufficient. Then, check whether you start getting the cron job report again over the next few days.
 +
 
 +
If the cron job still doesn't complete with the increased memory limit, make sure that <tt>display_errors</tt> is enabled in the server's PHP configuration. Enable the '''Setup > General Settings > Other tab > Display Errors''' option, and then visit the <tt>cron.php</tt> file in your browser to run the cron manually. You should now see error output. For more information about the most common errors and their causes, see:
  
 
*[[Server Modules]]
 
*[[Server Modules]]
Line 23: Line 24:
  
 
==Items Not Invoicing==
 
==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'''. For domains the '''Disable Auto Renew''' option could be ticked which stops renewal invoices being generated automatically. 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.
 
  
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 in the future no invoice will be generated. For example if today's date is 01/01/2012:
+
There are a couple of reasons for invoices not generating. The most obvious reason is that there's a '''cancellation request''' for the service or it's in cancelled, terminated, fraud or expired '''status'''. For domains, selecting the '''Disable Auto Renew''' option stops the system from generating renewal invoices automatically. It could also be that the '''cron job''' is not running. For more information, see [[#Invoices/Payment Reminders not Generated|the above]].
 +
 
 +
The system only generates invoices when the service's Next Due Date is within the Setup > Automation Settings > Invoice Generation value. For example, if the '''Next Due Date''' is in the future, the system won't generate an invoice. For example, if today's date is 01/01/2012:
  
 
Next Due Date: 07/01/2012<br />
 
Next Due Date: 07/01/2012<br />
Line 35: Line 37:
 
= Invoice '''not''' generated.
 
= 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.
+
If it's none of those, then it's possible that the system generated an invoice that was then '''deleted''' by a member of staff. 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 you require a new invoice after deleting an invoice, you must manually move the Next Due Date forward or back by one day.
  
 
==Double Invoices/Charges/Blank Invoices==
 
==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 [[Crons|our documentation]].
+
There are several invoicing issues that a common misconfiguration can cause. The system may generate two invoices for the same service and due date, may double-charge a client for the same invoice, or may generate a completely blank invoice.
  
 +
A cron job running twice at the same time can cause this. The cron job should only run once per day, and should never run 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 <tt>cron.php</tt> file in accordance with our [[Crons|our documentation]].
  
 
==Tax Not Applied to Invoices==
 
==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 Configuration|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 [[EU_VAT_Addon|EU VAT Invoicing Addon Module]] (if activated).
+
If the system has not applied tax, WHMCS may be operating as though it is not eligible under your tax rules.
 +
 
 +
First, ensure that tax is enabled and that you have selected the relevant '''Apply Tax''' options on the [[Tax Configuration|Tax Rules]] page. If it's an invoice for a product, ensure this option is selected in the product configuration.
 +
 
 +
Secondly, ensure the '''Tax Exempt''' checkbox is deselected on the client's Profile tab. A member of staff or our [[EU_VAT_Addon|EU VAT Invoicing Addon Module]] (if activated) may have selected this.
 +
 
 +
Finally, the client might not match any of your tax rules. The state and country must be '''exact matches''' and are case sensitive. For example, if a tax rule exists for the state "TX" and the client's state is "Texas", these do not match and the system would not apply tax. This scenario would require two tax rules, 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".
+
The system will apply any changes to subsequent invoices, but will not change existing invoices.
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==
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.
+
The system may generate multiple invoices for the same service with ''different'' due dates if the service has a due date in the past. This usually occurs with services that you import using the WHM/cPanel importer, or services  a staff member manually added, in which the Next Due Date is left at 00/00/0000. As this due date is in the past, WHMCS generates all invoices between then and today to ensure the client is has paid their balance in full.
  
 +
To correct this, change the Next Due Date to the date of the client's next payment via their Products/Services tab. You can safely delete or cancel any erroneous invoices.
  
 
{{troubleshooting}}
 
{{troubleshooting}}

Revision as of 18:35, 29 April 2020

There may be occasions when the system doesn't generate invoices properly. The problem is usually a misconfiguration or human error.

Invoices/Payment Reminders not Generated

Make sure that you have deselected the Overdue Notices option on the client's Profile tab. Selecting the option will prevent the system from sending overdue notices to the client.

If the Email Templates are not present, the system will be unable to send an email. Review Setup > Email Templates and ensure the Invoice Created and Overdue Notice emails templates are present.

Invoice generation, payment reminders, and account suspensions and terminations are some of the tasks that the daily cron job handles in accordance with your Automation Settings. If you find that some or none of the above are occurring, this could indicate the cron job is not running successfully.

Review Utilities > Logs > Activity Log and make sure that you see a number of entries beginning with "Cron Job" each day. The final entry every day should be "Cron Job: Completed".

  • If you see no cron job entries, this means you have not configured your automation cron job correctly. You must do this per our installation instructions. For more information, see Crons.
  • If you see some cron job entries, but none after "Cron Job: Running Usage Stats Update", your cron job 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, update or remove any inactive or offline servers from Setup > Servers so that they can all connect successfully. Alternatively, you can disable Update Usage Statistics under Setup > Automation Settings.
  • If you see some cron job entries, but no "Cron Job: Completed" entry, this suggests that your server is prematurely terminating the cron job. Increase the memory_limit setting in your server's php.ini to 64 MB or 128 MB, which is usually sufficient. Then, check whether you start getting the cron job report again over the next few days.

If the cron job still doesn't complete with the increased memory limit, make sure that display_errors is enabled in the server's PHP configuration. Enable the Setup > General Settings > Other tab > Display Errors option, and then visit the cron.php file in your browser to run the cron manually. You should now see error output. For more information about the most common errors and their causes, see:

Items Not Invoicing

There are a couple of reasons for invoices not generating. The most obvious reason is that there's a cancellation request for the service or it's in cancelled, terminated, fraud or expired status. For domains, selecting the Disable Auto Renew option stops the system from generating renewal invoices automatically. It could also be that the cron job is not running. For more information, see the above.

The system only generates invoices when the service's Next Due Date is within the Setup > Automation Settings > Invoice Generation value. For example, if the Next Due Date is in the future, the system won't generate an invoice. 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 that the system generated an invoice that was then deleted by a member of staff. 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 you require a new invoice after deleting an invoice, you must manually move the Next Due Date forward or back by one day.

Double Invoices/Charges/Blank Invoices

There are several invoicing issues that a common misconfiguration can cause. The system may generate two invoices for the same service and due date, may double-charge a client for the same invoice, or may generate a completely blank invoice.

A cron job running twice at the same time can cause this. The cron job should only run once per day, and should never run 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 the system has not applied tax, WHMCS may be operating as though it is not eligible under your tax rules.

First, ensure that tax is enabled and that you have selected the relevant Apply Tax options on the Tax Rules page. If it's an invoice for a product, ensure this option is selected in the product configuration.

Secondly, ensure the Tax Exempt checkbox is deselected on the client's Profile tab. A member of staff or our EU VAT Invoicing Addon Module (if activated) may have selected this.

Finally, the client might not match any of your tax rules. The state and country must be exact matches and are case sensitive. For example, if a tax rule exists for the state "TX" and the client's state is "Texas", these do not match and the system would not apply tax. This scenario would require two tax rules, one for "TX" and another for "Texas".

The system will apply any changes to subsequent invoices, but will not change existing invoices.

Multiple Invoices for the same Service

The system may generate multiple invoices for the same service with different due dates if the service has a due date in the past. This usually occurs with services that you import using the WHM/cPanel importer, or services a staff member manually added, in which the Next Due Date is left at 00/00/0000. As this due date is in the past, WHMCS generates all invoices between then and today to ensure the client is has paid their balance in full.

To correct this, change the Next Due Date to the date of the client's next payment via their Products/Services tab. You can safely delete or cancel any erroneous invoices.