Plugin Contributor
Ewout
(@pomegranate)
Hi! Can you tell me what your settings are currently set to? (perhaps post a screenshot)?
If the 2017 orders already have an invoice number, you will need to manually delete it from the order details page (one by one), or remove them in bulk from the database (table: wp_postmeta, meta_key: ‘_wcpdf_invoice_number’, you will want to make sure you select the correct range by setting a minimum post_id).
Note that you can set the prefix with the [order_year] or [invoice_year] shortcode.
For next year: there’s a setting that will do this automatically for you on january 1st 🙂
Let me know if that helps!
Ewout
Thread Starter
bynh
(@bynh)
Okay.
Problem is that, “my year” goes from 07.01-2016 – 30.06-2017 in my annual report.
So it is not a good idea to reset the invoice number the 1/1-2017.
I have completed the 2016xxxx year (07.01-2016 – 30.06-2017) and would like to have the 2017xxxx year now in the invoice numbers.
As you can see, my invoices are still in the list. (as you say, I could delete them all, but I would like them there).
When I change the prefix from 2016 to 2017, you see all my 2016xxx goes 2017xxxx.
I hope you understand.


Thread Starter
bynh
(@bynh)
Plugin Contributor
Ewout
(@pomegranate)
I understand now: You’re saying that the 2016 prefix needs to be applied to the invoices from 2017 too (until 30/6).
This is not possible with the current release. If you upgrade to the current 2.0 beta (It’s actually at RC, so ready for release, just waiting on some external factors), this is possible. This version stores the prefix at the time of generation.
I recommend to do a few tests with this on a staging site, to ensure it’s doing what you need. For backwards compatibility, the plugin reads the invoice number that was generated with the 1.6.x version (including prefix), so you will probably need to delete the invoice numbers from july first.
Hope that helps!
Ewout
Thread Starter
bynh
(@bynh)
Thank you for the reply.
I actually didn’t update the way you said I should.
Wordpress told me there was an update for the plugin, so I guess you have released the update in the meantime.
It worked now, and the old invoice numbers stays at the 2016, while the new ones genereted are 2017. 🙂
Plugin Contributor
Ewout
(@pomegranate)
Very glad to hear that 🙂
Let me know if you run into any issues!