Jump to content

invoice number refresh monthly


johncha

Recommended Posts

Hi,

 

I am trying to find out how I can change the logic of the invoice format as in {PREFIX}-{YEAR}{MONTH}{NUMBER} (result: SW-2016110001, SW-2016110002...).

The tricky part is, the sequence {NUMBER} need to be refreshed in zero every first day of the month.

 

Appreciate if someone can share the idea of changing {NUMBER} into zero every month.

 

Thanks

John

Link to comment
Share on other sites

Hi John,

 

I am trying to find out how I can change the logic of the invoice format as in {PREFIX}-{YEAR}{MONTH}{NUMBER} (result: SW-2016110001, SW-2016110002...).

The tricky part is, the sequence {NUMBER} need to be refreshed in zero every first day of the month.

Appreciate if someone can share the idea of changing {NUMBER} into zero every month.

I can't imagine that there's a way to do it from the admin settings.

 

I suspect you may be looking at writing a PreCronJob action hook that resets the value in the tblconfiguration database table on the first of each month... it would need to run before the cron job to ensure the invoices generated automatically on the 1st were using the correct format. :idea:

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