Jump to content

no invoice generated after change the next due date


Sam666

Recommended Posts

Hello,

I was tried to mannually generated the invoice for a service, the service next due date is 2022-12-07, and I have also check the 'tblhosting' table both the nextduedate and nextinvoicedate are 2022-12-07, then I click  'Invoice Selected Items' but no invoice being generated(the service status is Active), however the  'tblhosting' table's nextinvoicedate has been set to 2023-01-07 after clicked 'Invoice Selected Items'.  According the blling logic, it should generate a invoice, I couldn't find the root cause why no invoice being generated. Appreciate if anyone can help.

  • Analyzes the Next Due Date of all Active and Suspended services.    [True, the service is Active and Next Due Date is 2022-12-07]
  • Determines whether the date is equal to or less than the number of days in the future, based on the Invoice Generation setting.  [True, the current date is 2023-01-07]
  • Ensures no invoice item exists for the service on the next due date.  [True, there's only one invoice for this service and the invoice item duedate is 2022-11-07]
  • Generates a new invoice if the system evaluates the above points as true.

https://docs.whmcs.com/Billing_Logic

iShot_2023-01-07_12.40.18.png

Link to comment
Share on other sites

If I remember correctly, if tblinvoiceitems.relid already hosts the ID of the service in question for current date, no invoice will be issued. Let me explain.

Let's say you generate an invoice for service Id 10. Few moments later you delete the invoice. The deletion removes the invoice from tblinvoices table but still leaves the item in tblinvoiceitems. This prevents WHMCS to reissue the invoice for service Id 10 since it already exists in tblinvoiceitems for current date.

I am not up to date with latest versions of WHMCS but this is how it worked in past. In order to reissue the invoice of the above example, I need to delete tblinvoiceitems.relid = 10 for current date.

Link to comment
Share on other sites

1 hour ago, Kian said:

If I remember correctly, if tblinvoiceitems.relid already hosts the ID of the service in question for current date, no invoice will be issued. Let me explain.

Let's say you generate an invoice for service Id 10. Few moments later you delete the invoice. The deletion removes the invoice from tblinvoices table but still leaves the item in tblinvoiceitems. This prevents WHMCS to reissue the invoice for service Id 10 since it already exists in tblinvoiceitems for current date.

I am not up to date with latest versions of WHMCS but this is how it worked in past. In order to reissue the invoice of the above example, I need to delete tblinvoiceitems.relid = 10 for current date.

Hello @Kian, thank you for your reply. Yes it's due to the previousely deleted invoice items still remain on the tblinvoiceitems table, but those invoice items cannot be viewed on the client/service/invoice page. I have just manually find out on MySQL and deleted unnecessary invoice items, the the invoice can be generated now. Thanks again. 

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