Jump to content
stormy

Will invoice numbering reset at midnight?

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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by Kian

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
23 minutes ago, WHMCS Lawrence said:

Please go ahead and open a support ticket so we can investigate this further. Thanks!

Done, thanks! And Happy New Year to all of us crazies that work every day!!! 😄

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated