Jump to content

Mannually invoice selected item not generating invoices


Sam666

Recommended Posts

Hello,

I am trying to manually generate invoice by clicking `Invoice Selected Items`, however the WHMCS didn't generated any invoice, but the related service `nextinvoicedate` was added one cycle. I have read the docs about the billing logic, and investigated on MySQL tables, according to the billing logic it should generate a invoice, but not sure why didn't. Below are my step by step investigation. Appreciate if anyone can help.

  • Analyzes the Next Due Date of all Active and Suspended services. [true]
  • Determines whether the date is equal to or less than the number of days in the future, based on the Invoice Generation setting. [true]
    mysql> SELECT id, domainstatus, nextduedate, nextinvoicedate, NOW() AS Now FROM tblhosting WHERE id=1047 AND nextduedate < NOW();
    +------+--------------+-------------+-----------------+---------------------+
    | id   | domainstatus | nextduedate | nextinvoicedate | Now                 |
    +------+--------------+-------------+-----------------+---------------------+
    | 1047 | Suspended    | 2022-12-29  | 2023-01-29      | 2023-02-10 20:57:20 |
    +------+--------------+-------------+-----------------+---------------------+
    1 row in set (0.00 sec)

     

  • Ensures no invoice item exists for the service on the next due date. true

    mysql> SELECT COUNT(*) AS invoice_item_equal_next_due FROM tblinvoiceitems WHERE relid=1047 AND duedate=(SELECT nextduedate FROM tblhosting WHERE id=1047);
    +-----------------------------+
    | invoice_item_equal_next_due |
    +-----------------------------+
    |                           0 |
    +-----------------------------+
    1 row in set (0.00 sec)
  • Triggers the InvoiceCreation Action Hook point.
  • Triggers the InvoiceCreationPreEmail Action Hook point.
  • Sends the Invoice Created email to the client.
  • Triggers the InvoiceCreated Action Hook point.
  • Increments the Next Invoice Date of the service by one billing cycle.

When I click Invoice Selected Items, then 0 Invoices Created , but the service nextinvoicedate, was added a cycle which is 2023-03-01.

aws4_request&X-Amz-Date=20230210T131129Z

https://docs.whmcs.com/Billing_Logic

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