crater-invoice / crater

Open Source Invoicing Solution for Individuals & Businesses
https://craterapp.com
GNU Affero General Public License v3.0
7.87k stars 1.57k forks source link

Incremental filenames ignoring own set number (no offset possible) #967

Open enoversum opened 2 years ago

enoversum commented 2 years ago

Describe the bug After switching from a different invoicing software, in which I already created invoices and estimates for this year, changing the number of my invoice or estimate to account for already created invoices/estimates doesn't trigger an update to the forthcoming invoices/estimates. E.g. I set my first estimate to be 2022-005 instead of 2022-001, and the next estimate number created by Crater is 2022-002 instead of 2022-006.

Expected behaviour Crater recognises the increased number and sets the correct number for the next invoice/estimate.

Screenshots

Please complete the following information:

DirkR commented 2 years ago

Please see #870 for a possible solution.

enoversum commented 2 years ago

Hi @DirkR , thanks for the tip. Does that mean I have to manually set the invoice number in the database to the number I want to start from for the invoices?

DirkR commented 2 years ago

Yes.

You take the latest/newest invoice in the table and set the sequence_number to the value of that invoice. In my case I hat an invoice "RE-0350" and I did set the sequence_numberof that invoice to 350. The number get's incremented when creating a new invoice.

Unfortuantly you have to alter your database for that. 🤷‍♂️

enoversum commented 2 years ago

Danke, @DirkR, that's very helpful, I'll do just that then. Since I don't move to Crater every day, it's a little obstacle, but nothing to lose hair about 😁.

Edit: Working like a charm, thanks for the solution!