Version Update Process

Updating SimpleInvoices can be done quickly, but should be approached with the ability to restore to the previous version if a critical problem is encountered. Whether updating from one of the original SimpleInvoices versions such as master, 2013.1.beta.8, 2011.2, etc., or from a previous version of Fearless359/SimpleInvoices, the following instructions will help assure an error-free experience.

Backup First
There are two backup steps to perform:

  1. Select the Backup Database option on the Settings tab and follow the instructions to backup your database. This will store the backup in the tmp/database_backup directory. You can leave the backup there.
  2. Rename your SimpleInvoices directory to something like, simple_invoices_yyyymmdd_b4_update. The rename moves all content of your current SimpleInvoices directories is preserved for easy recovery if needed.
Update Installation Instructions

Follow these steps to complete your update:

  1. Make sure you do what it says in the Backup First topic.
  2. Recreate the directory that your current SimpleInvoices was installed in that was renamed from in the Backup First step. We will call this the SimpleInvoices directory.
  3. In your browser, download the “master_2019.2” or the older “master_2019” version for PHP 7.2 and greater, or the “master version for PHP 5.6, 7.0 or 7.1 from the Clone or Download button on that page.
  4. Unzip the download file. It will create a directory named the same as the zip file (assuming you didn’t rename it); typically, simpleinvoices-master.
  5. Copy the content of the directory created by the unzip process into the directory created in step 2.
  6. Copy the config/custom.config.php file from your previous SimpleInvoices directory and save it in the config/ directory of the new SimpleInvoice installation directory. Changes to the new version of the config/config.php file will be automatically added to the new copy of the config/custom.config.php file.
  7. If you have your own business invoice template, copy your company logos from the backup template/invoices/logos directory to the updated install template/invoices/logos directory. Next copy the directory your business template is in, from the template/invoices directory to the template/invoices directory.

Proceed to the next topic, First Use Of Update.

First Use Of Update
  1. Access the updated SimpleInvoices site. If authentication is enabled, log in as your normal administrative user.
  2. If there are NO database updates (aka patches) to perform, just start using SimpleInvoices.
  3. If there ARE database updates, you have two quick actions to perform.
    1. You will be on the patch page at this point. This page lists all SimpleInvoices patches; both applied and unapplied. Scroll down the list to see what unapplied patches are pending. They are at the bottom of the list. Scroll back to the top of the list and select the button to apply the patches.
    2. You will now be on the page that lists all the patches, showing that they have all been applied.
  4. Click the button on the applied patches review page and begin using your updated SimpleInvoices.
If You Have Special Code
There are three types of special code other than custom invoices templates. They are:

  1. Custom Hooks – These are changes made to the hooks.tpl file in the custom directory. You need to transfer these changes to the same file in the new installation. Verify the are current and work for the newly installed version.
  2. Extensions – Extensions are the proper way to add new functionality to SimpleInvoices. You will need to copy the directory containing your extension to the extensions directory of the new install. You will then need to review your extension code to make sure it is current for any changes to the standard files that need to be incorporated into your extension file. Test your extension to make sure it functions correctly.
  3. Changes to the standard code – Hopefully you kept copious notes and comments on these changes because you have to track them down and implement them in the new version. HOWEVER, when you incorporate it into the updated version do it as an Extension or via the Custom Hooks. Then your life will be more simple the next time you update.

Test your changes and you are ready to us the updated version of SimpleInvoices.