Closed vedanshujain closed 5 years ago
Some randomness has been added to the invoice name according to #21.
However, two invoices may have the same number when changing the next invoice number in the invoicing settings to a lower value (already in use).
It's just a legal thing, but probably two invoices should always have different invoice numbers. Should we control that? What's your opinion @vedanshujain @iandunn ?
Yeah, it seems like it'd make sense to prevent that setting from being set lower than {latest ID + 1}
.
I'm not sure we even need a setting for it though, to be honest. A filter maybe, but I'd probably recommend "decisions not options" in this case. How common would it be for a camp to want to change that?
Currently invoice number can be configured in invoice settings, thereby making it possible for a new invoice to accidentally overwrite a previous one. Please add check to see if file already exists, and throw an error if that's the case before writing the file.
Also, another related suggestion, it could be a good idea to add some randomness in invoice name (maybe timestamp?) to make sure invoice don't get overwritten.