I have created this Invoice group with this invoice numbering.
EUR/{{{year}}}/{{{month}}}/{{{id}}}
Now how, can i make the {{{id}}} reset back to 1 each new month.
Example:
In the month november i created 3 invoices.
EUR/2016/11/1
EUR/2016/11/2
EUR/2016/11/3
The next month in december, the ID must start with 1 again automatically. And not with 4, otherwise where are invoice 1, 2, 3 of the month December and thats illegal in my country.
I don’t know if this is possible already or to create this with a cron job some way?
Already thank you and keep up the amazing work.
best regards,
Hi there,
At the moment you can only do this manually by setting the Next ID for the invoice group to 1 at the start of each month. Cribs would not work because you have to be logged in to change this setting.
But an additional API for invoice groups to change these settings may be a good idea for InvoicePlane 2.
Yes it will indeed. A simple checkbox or dropdown in the invoice group. Would be helpful for people who are using year and month in their invoice number. Also in some countries the Id follop number must follow, like in my country. I made a few mistakes already, to forget to manually reset the id each month, thats why i’m asking.
Nope. The ID is and will always be one incremental number.
If you want to reset it you can do so in the invoice group settings but have to make sure that the ID will not be a duplicate (with a year prefix for example).
As you are using an invoice prefix, this could be achieved with a cron job on the server running on the first of the month, to run a bash script:
#!/bin/bash
mysql -u IPUSERNAME -pIPDBPASS IPDBNAME -e "UPDATE ip_invoice_groups SET invoice_group_next_id = '1' WHERE invoice_group_id='GROUP_ID'";
IPUSERNAME being your database user, IPDBPASS the relevant mysql password, IPDBNAME being your InvoicePlane database, and GROUP_ID being the numeric ID for the InvoicePlane group.
It’s a messy / dirty way to do it, but it should work.
Do you know this platform on how to setup your input? because i have a field command:
where i put and changes everything from the database of invoiceplane. Except not Sure if have to change GROUP_ID to something else too. I press save. but it fails
mysql -u IPUSERNAME -pIPDBPASS IPDBNAME -e "UPDATE ip_invoice_groups SET invoice_group_next_id = '1' WHERE invoice_group_id='GROUP_ID'";
I can barely understand your question after that, so better open a new topic for it.
Try to explain your problem and then tell what you think your solution would be
(What you posted, but then better explained)
Is it not possible to build this feature into invoiceplanes core? Instead of using a cronjob on the server.
I will update my question with some screenshots.
Why is this topic closed while other people liked it? But the past developer abonned this project. Now that you are here to keep the project going, you close this? That’s what makes this project really dead This is such a slap in the face, for caring about this project and a feature like this. Now I even can post my time of making printscreen and explain it better like you asked… not sure why i’m wasting my time here.
Even what martin is saying doesn’t make no sense at all… the ID will go on and you will get in serious trouble with the taxes in a country like belgium for example in this way.
We should be able like many people seem to be looking for, to check mark to reset the ID each month.