johncha Posted November 7, 2016 Share Posted November 7, 2016 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 7, 2016 Share Posted November 7, 2016 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.