I want to migrate InvoiceNInja from version 4.5.31 to the latest version.
In the documentation, I read that I need to first upgrade the current version to 4.5.50
I also read that to do this, I need to copy the files of version 4.5.50 to the folder with the earlier version, overwriting what is necessary.
After overwriting, I would need to delete the cache and run https://domain.pl/update?clear_cache=true
Unfortunately, after this operation I get the info Error 404.
I tried another way. Since the .env file contains the configuration, I made a copy of the 4.5.50 files under the new domain and completed with the .env file of the original version, correcting only the domain info.
Unfortunately, there is an Error 500 error in this case as well.
In general, I only care about transferring data from version 4.5.31 to the latest 4.8.21
Your suggestion gave me a hint on how to solve the problem.
I installed version 4.5.50 from the hosting installer and swapped databases after running it.
I managed to do both the update and migration to the latest version.
Unfortunately, I have another problem. Invoice numbering is not working properly.
In “Generated numbers” I have set:
Number padding: 01
Generate. number : When Saved
Reset Counter : Annually
Next reset 01-01-2025
In invoices:
Number pattern: {$counter}/{$date:m/Y}-{$clientCounter}/{$clientIdNumber}.
Number counter 48
Unfortunately it starts counting numbers from 1 i.e. 01/02/2024…- while it should 48/02/2024…
The question is how to correct this?
I have tested several variants and I think that either there is a duplication of markings or an error.
When I have {$counter} and {$client_counter} then in both places it enters the value from {$client_counter} which counts the number of invoices generated that day, I think.
In a situation where there is only {$counter} without {$client_counter} the next invoice number taken from the Number counter field is inserted.