Jump to content

Will invoice numbering reset at midnight?


stormy

Recommended Posts

I have my EU VAT Addon configured with "Auto Reset Numbering" set annually.

Now that the cron runs every 5 minutes, will it finally reset the invoice numbering at 0:00 January 1st? (which is the only correct behaviour) Or will it still reset them at the time the automations run, as usual? This is no use, because customers can generate invoices before this happens, which would need to be manually corrected one by one, as well as the "next invoice" number once that is done.

We'll see tonight...

Edited by stormy
Link to comment
Share on other sites

as an educated guess, I would think that if the daily cron that generates renewal invoices (which only runs once per day) ran at 11:55pm, then any invoices generated would still contain 2018; if it runs five minutes after midnight, it should use 2019.

and if I were to come to your site at 00:00am or later, it should use 2019 on new orders... basically, whatever time it is when the function runs, that's what it should use.

but as you say, you'll see tonight!

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hello,

Any invoices generated after midnight should trigger the reset internally and avoid any unexpected issues otherwise. If this did not occur, please feel free to contact our support team and we will be happy to investigate that further.

Link to comment
Share on other sites

17 hours ago, Kian said:

After 7 years of failed attempts I made it work with a custom script... it worked on all systems I checked except with mine 🤣 My keyboard & mouse fixed everything

So did I - and it never worked for me either! 😄

6 hours ago, WHMCS Lawrence said:

Hello,

Any invoices generated after midnight should trigger the reset internally and avoid any unexpected issues otherwise. If this did not occur, please feel free to contact our support team and we will be happy to investigate that further.

Unfortunately it didn't work correctly. I have the format set as "D{YEAR}-{NUMBER}". At midnight the NUMBER variable got reset but the YEAR did not! The year got reset at 10:00 when the automation run.

So - shall I fill a bug report or open a ticket?

Link to comment
Share on other sites

Ok - it gets worse. It seems that the NUMBER variable got reset on December 31st at the automation time, and the YEAR variable got reset today at the automation time.

So now I have seven invoices from 2018 that have duplicate numbers and are out of series. And all my 2019 invoices start on number 9. Every invoice from yesterday and today needs to be manually corrected and resent.

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