How to …

start Invoicing
Follow the Installation instructions on this site to load SimpleInvoices on your system and set it up. These instructions will walk you through what is necessary to start generating invoices for your business. The setup process is meant to be simple and fully explained for each step of the process. Please advise this site administrator if you would like to recommend corrections or additions to the site instruction.
preparing SimpleInvoices for use
The first steps in using SimpleInvoices is to setup the base information, that is billers, customers, products, tax rates, and invoice preferences

Add Biller

  • A biller is the name and details of the person creating the invoice, ie you or your company
  • Open up SimpleInvoices in your browser (normally http://localhost/simpleinvoice)
  • In the main page click on the Insert Biller button
  • Once in the Insert Biller screen fill in the required fields and click the Insert Biller button
  • Now when you create an Invoice you will be able to select this biller

Add Customer

  • In the main page click on the Insert Customer button
  • Once in the Insert Customer screen fill in the required fields and click the Insert Customer button
  • Now when you create an Invoice you will be able to select this customer

Add Product

  • A product can be any item that you wish to appear in the Itemized Invoice. It can be anything you wish to sell and invoice – physical item ie. light bulbs or services such as an accounting service charge per hour/PC repairs/etc…
  • Note that products are only available when you create an Itemized Invoice
  • In the main page click on the Insert Product button
  • Once in the Insert Product screen fill in the required fields and click the Insert Product button
  • Now when you create an Itemized Invoice you will be able to select this product

Set Tax Rate

  • In some countries (USA, Australia, England, New Zealand, etc.), there are taxes on sales; normally called Sales Tax, GST(goods and services tax), or VAT (value added tax). SimpleInvoices has the ability to setup and define tax rates any and all of these various tax types.
  • To view the default tax rates select Manage Tax Rates from the Option menu.
  • This will now display all the available tax rates in SimpleInvoices
  • To edit an existing tax rate select the edit button next to the tax rate and in the edit screen update it with the new information and click the Save Tax Rate button
  • To add a new tax rate select from the Option menu Insert New Tax Rate
  • Fill in the required fields and click the Insert Tax Rate button
  • The new tax rate will now be available when creating a new invoice

Set Invoice Preferences

The Invoice Preferences is where you can set the various preferences of your invoices. Available preferences are:

  • Description: This is the name of the set of preferences
  • Currency sign: This is the currency symbol that will be used
  • Invoice heading: This is the heading of the invoice
  • Invoice wording: This is the invoice wording – ie if you enter Quote – in the Manage Invoices screen it’ll say Quote in the invoice type field and through that invoice it’ll say quote instead of invoice ie. Quote ID, Quote Date, etc.
  • Invoice detail heading: This is what will appear as the heading of the footer/details section of the invoice
  • Invoice detail line: This is the text that appear under the details/footer heading. Normally used to define payment terms etc.
  • Invoice payment method: This is the where you specify how you would like the customer to pay you, ie Cheque/money order/electronic funds transfer/etc.
  • Invoice payment line 1 name: This is where you can specify the payment line 1 name ie. Account name
  • Invoice payment line 1 value: This is where you can specify the payment line 1 value ie. The name of your back account
  • Invoice payment line 2 name: This is where you can specify the payment line 2 name ie. Account number
  • Invoice payment line 2 value: This is where you can specify the payment line 2 value ie. The name of your back account
enable the login system

Simple Invoices has an optional login system to allow you to protect your install of Simple Invoices with a username/password system.

 If you are using a version of Simple Invoices later than 2007 08 then all you have to do is edit config/config.ini and set authentication.enabled to true.

To do this just change the file from

authentication.enabled = false

to

authentication.enabled = true

That’s it – you can login with:

Email address
demo@simpleinvoices.group
Password
demo

You can edit the username and password within Simple Invoices. To do this, select the People menu option and the Users option to access the list of users to maintain and add to.

set up System Defaults

In SimpleInvoices it’s possible to setup defaults for various values. The following default values are maintained in the System Defaults page; accessed from the SI Defaults menu link under the Settings tab:

  • Default Biller: Defines biller to use when creating a new invoice. It can be changed before saving the invoice.
  • Default Customer: Defines customer to use when creating a new invoice. It can be changed before saving the invoice.
  • Default Tax Rate: Defines tax rate to use when creating a new invoice. It can be changed before saving the invoice.
  • Default Invoice Preferences: Defines invoice preference (type) to use when creating a new invoice. It can be changed before saving the invoice.
  • Default Number of Line Items: Defines the number of line items displayed in an Itemized and Consulting invoice
  • Default Invoice Template: Defines the invoice template used to create the output displayed in PrintEmailPDFSpreadsheet and Document view modes.
backup the database

In order for the Simple Invoices database backup to work the first step is to make the tmp/database_backups directory (which is in the Simple Invoices directory) writable by the web-server.

  •  In Linux, cd to the Simple Invoices directory, cd /var/www/html/simpleinvoices, and chown the tmp/database_backups directory to the Apache web-server user, chown apache:apache tmp/database_backups.
  • In Windows, just browse to the tmp/database_backups folder and make sure its writable by all users.

With this completed, you can select the Backup Your Database option in the Dashboard. Then select the BACKUP DATABASE NOW option. This will backup the database and list each table that was backed up. Your backed up database will be stored in the tmp/database_backups directory with the file name of _backup_.sql.

If you encounter any errors, select the question mark on the ? Did you get fwrite errors? option at the bottom of the backup screen.

change the invoice number starting point

SimpleInvoices has the ability to use different numbering sequences for different invoice types. The invoice types are defined in the si_preferences table. This table is maintained via the Inv Prefs menu link under the Settings tab.

The Description column specifies the different types of invoices. For example, InvoiceEstimate or Quote. The Invoice numbering group column of each of these rows specifies which of these descriptions will control the numbering sequence to be used.

For example, say we want invoice types Invoice and Quote to use the same sequence and Estimate to have its own sequence.

  • In the Invoice and Quote preference records, the Invoice numbering group is set to Invoice.
  • In the Estimate preference record, the Invoice numbering group is set to Estimate.

The Invoice numbering group refers to the si_preferences record with the same value in the Descripiton field. For our example, the ID column for the InvoiceEstimate and Quote preferences records are 12 and 3 respectively. This ID is important as it is the value used in sub_node column of the si_index table that contains the invoice number value last assigned to the associated records.

Now it is a little confusing. When you add a new invoice record, regardless of it being an InvoiceEstimate and Quote type of invoice, the record in the si_index table that has a node column set to invoice are considered. Of these records, the one with the sub_node value matching the ID of the si_preferences record whose Descripiton matches the setting of the Invoice numbering group for setting of the Invoice Preference on the invoice record.

In our example, an Estimate type invoice will use the si_index record with the node and sub_node of invoice and 2 respectively. Whereas both Invoice and Quote type invoices will use the si_index record with the node and sub_node settings of invoice and 1 respectively.

Finally, once you identify the si_index record you want to change the numbering sequence for, just set its id column to value prior to what you want to be assigned next. For example, if you want the start numbering at 1000, set the id column to 999 which typically represents the last value assigned.

setup invoice templates

An Invoice Template is the template that SimpleInvoices will use to create the Print Preview of the invoice. To choose which Invoice Template your SimpleInvoices will use:

  1. Go to the Settings tab and select the SI Defaults link.
  2. In the Systems Default page, the “Default invoice template” field shows the default that is currently used.
  3. To change default invoice template, click the edit button next to “Default invoice template” and another template to use from the drop down list and click save.
  4. Now when you select Print View of an invoice it will use this new Invoice Template.
setup Biller logos
  • SimpleInvoices allows for each biller to have their own logo displayed in the print formatted invoices.
  • To add a logo to a biller the first step is to upload your billers logo into the logo directory into SimpleInvoices directory on your system (templates/invoices/logos).
  • Once the logo has been uploaded the last step is to go into the Manage Billers page, edit the biller in question, select the logo file to use from the Logo file drop down list and Save the change.
  • Now when you generate a print image (Print view, PDF, spreadsheet, etc.), the logo assigned to the biller will be used.
setup special logos for the holidays
Currently SimpleInvoices supports special logos for Christmas and Easter. To use them, make your holiday logo, name it yourlogonameholiday.png (assuming it is a .png file). Your normal logo will be named, yourlogoname.png. So the christmas logo will be named, yourlogoname-christmas.png, and your easter logo will be named, yourlogoname-easter.png. The holiday_logo function in the invoice template will set the name according to the date. If you do not have a holiday logo, your standard logo will be used.
get reports working on Windows using xampp or wampserver
To enable reports to work on Windows:

 

  1. Open the php.ini
  2. Find the line ;extension=php_xsl.dll
  3. Uncomment the line by removing the semi-colon, “;,” from the front of the line.
  4. Restart the web-server to enable this feature.
export to PDF, Spreadsheet or Document
  • SimpleInvoices allows to the export of an invoice from the Quick View to a PDFSpreadsheet or Document format.
  • Default export formats are set to:
    1. PDF: Standard PDF form file downloaded to your computer or in attached to an Email in Email View.
    2. Excel (.xls): Spreadsheet file downloaded to your system. Can be changed to Open Spreadsheet (.od) format for access by Open Office.
    3. Word (.doc): Document file downloaded to your system. Can be changed to Open Document (.ods) format for access by Open Office.
  • The default formats and dimensions can be changed in the config/custom.config.php file. The following lines specify the configuration:
      export.spreadsheet      = xls
      export.wordprocessor    = doc
      export.pdf.screensize   = 510
      export.pdf.papersize    = Letter
      export.pdf.leftmargin   = 10
      export.pdf.rightmargin  = 10
      export.pdf.topmargin    = 10
      export.pdf.bottommargin = 10
    
  • Note: The config/custom.config.php settings for spreadsheet and word processor can be set to any value provided their associated program can read a HTML document.
convert numbers to words
  1. Download this script: http://download.pear.php.net/package/Numbers_Words-0.16.2.tgz
  2. Extract the content of the downloaded file and copy the Numbers directory to Simple Invoices library directory.
  3. Open the includes/class/export.php file in your editor, (notepad, notepad++, vi, vim, etc.).
  4. Add this line at line 2: include(‘./library/Numbers/Words.php’);
  5. Search for the following line located at approximately line 216: $customFieldLabels = getCustomFieldLabels();. Copy and paste the following lines after it:
    $nw = new Numbers_Words();
    $invoice[‘total_in_words’] = $nw->toWords($invoice[‘total’]);
    $invoice[‘total_in_words_currency’] = $nw->toCurrency($invoice[‘total’]);
  6. Save the changed file.
  7. Next open templates/invoices/default/template.tpl file (or whatever template.tpl file you are using), in your editor.
    Wherever you want the total value of the invoice in words, paste this: {$invoice.total_in_words}
    Wherever you want the total value of the invoice in currency, paste this: {$invoice.total_in_words_currency}
  8. Save changed file.
  9. Delete the content of the cache folder, /tmp/cache/
  10. Test your changes by opening a new invoice in the print view.
send emails
For Simple Invoices to be able to send email you need access to an smtp server. This can be your ISP’s smtp server or other. But if you don’t have access to an smtp server you can install one on your PC. Below details some of the available option for each operating system

 

Windows

Mercury/Pegasus mail

  • http://www.pmail.com/index.htm
  • http://www.pmail.com/downloads_s3_t.htm (free)
  • http://www.softstack.com/freesmtp.html (free)
  • http://www.axigen.com (not-free)

Mac

If your not on Mac osx server or sendmail isn’t installed on your system, the sites listed below:

  • http://postfix.darwinports.com/ (free)
  • http://cutedgesystems.com/software/postfixenabler/ (not-free)

Linux

If your version of Linux doesn’t already come installed with one of the following mail servers, please install one as per your distributions installation procedures.

  • Postfix (free) ← This is the easiest option
  • Sendmail (free)

Gmail

You can use Google GMail to send emails in Simple Invoices. Here are some example SMTP settings for it:

  • Outgoing Mail (SMTP) Server – requires TLS or SSL: smtp.gmail.com (use authentication)
  • Use Authentication: Yes
  • Port for TLS/STARTTLS: 587
  • Port for SSL: 465

Steps

    • In the simple invoices configuration file (located at confic/custom.config.php) find the options starting with “email.”
    • Using the information in the example above you would set you config.ini to look like this:
email.host = smtp.gmail.com
email.smtp_auth = true
email.username = mylogin@gmail.com
email.password = mypassword
email.smtpport = 465
email.secure = SSL
email.ack = false

Note: Be sure that SMTP/POP access is enabled in your email settings, and that your using the correct port. The SSL port is recommended not just for security but because some ISPs and/or firewalls may interfere otherwise.

setup a default invoices for customers

You can set up a default invoice for each customer such that by the click of a button, a new invoice will be created from the default invoice for you to modify (if necessary) and save. Once saved, a new invoice number will be assigned to it. Here is how you do this:

  1. Click on the People tab followed by the Customers link on the menu line to display the customer list.
  2. Click on the Edit Customers icon () in the Actions column.
  3. Select an invoice to be the default from the dropdown list adjacent to the Default Invoice field and click on the Save button.
  4. To generate a new invoice from the default, click on the New Invoice for Customer … () icon in the Actions field. This will display the new copy of the default_invoice. Make any modifications needed to this invoice and then click the Save button to create the new invoice from the duplicate.

If you list the quick view of an invoice by selecting the view () icon from the invoice list, you can make that invoice the new default for the client it is for by doing the following:

  1. Expand the customer information section by selecting the magnifier () icon at the end of the Customer line.
  2. Select the load () icon at the end of the Default Invoice line.

A system wide default invoice can be set in the System Defaults screen accessed via the SI Defaults menu link under the Settings tab. It is used if you select the New Invoice for Customer… () icon for a customer that does not have an assigned default.

Finally, if no system wide default invoice is set and you select the New Invoice for Customer… () icon for a customer that has not been assigned a default invoice, an empty invoice will be presented for you to change and save; or to cancel if needed.

setup a recurring invoice

Recurrence

Setup:

  1. You need mod_rewrite enabled in your apache configuration to make recurring invoice work.
  2. You also need access to a cron system – either unix cron or cpanel type cron so that you can schedule the recurrence to run each day.

How to

Create the recurrence:

  1. Get invoice number to be replicated. If necessary, create a new invoice for this purpose.
  2. Go to the recurrence page and create a new recurrence.
  3. Enter the invoice number from step 1.
  4. Select a start date for the recurrence.
  5. Select an end date only if the recurrence should stop after the end date. Otherwise leave this field empty.
  6. Specify the recurrence frequency by entering the number of periods in the text field and selecting the recurrence period from the drop down list. For example: 1 month, 4 weeks, 2 days etc.
  7. Select Yes if a copy of the new invoice should be sent to the Biller. Otherwise select No.
  8. Select Yes if a copy of the new invoice should be sent to the Customer. Otherwise select No.
  9. Click Save to save the new recurrence record.

Run the recurrence:

  1. Schedule a recurrence action using cron, webcron (like https://www.easycron.com) or cpanel cron.
  2. Add a new cron job that once a day, week, month, etc. executes a SimpleInvoices api-cron command. The form the command will take can vary depending on your host requirements. The example below use curl to submit the URL:
curl "http:/x/yourserver.com/{simple-invoices-folder}/index.php?module=api&view=cron"
For example, to run the command at 1AM each day, the entry would look like:
 0 1 * * * curl "http://invoice.mywebsite.com/index.php?module=api&view=cron" >/dev/null 2>&1
Note that ">/dev/null 2>&1" was appended to the command to suppress and output message sent from the host each time the command is executed. This may not be needed on your system.


using a different language

First, make sure there is a language file for your language. Language files are set up on the lang folder. For instance US english (SI default language file) is in the lang/en_US folder whereas the Dutch language file is in the lang/nl_NL folder. If there is no language file for your language, you can create one for the ISO locale code for your language.

The langauge file exists within the language folder. The common name is lang.php for all these files.

To change the langauge for your SI installation, there are several updates needed:

  • custom.config.php: Set The setting in custom.config.php controls the default locale that affects formatting of currency and other data fields. Set this value to the folder for your language. The default is en_US. So for Dutch, you set it to nl_NL, or Great Britain it would be en_GB.
  • Settings -> Inv Prefs: This affects the language used on PDFs and printer output for the various types of invoices. Change the Language and Locale for each of the invoice types.
  • Settings -> SI Defaults -> Language: This affects the langage file used by SI. Select your language from the drop down list.

When these changes are made, you should have the language changed across the board. If then you see values not translated, it is likely that that info in the your language file (ex: lang/nl_NL/lang.php for Dutch) has not been translated or is missing. If you fix this, it would be helpful if you could submit your changes to the SimpleInvoices Group Forum on this site so they can be incorporated into SI for future updates.

Note that the way the lang files work, is that if wording is in the specified lang file, it is used. If not, the wording in the default lang file (lang/en_US/lang.php) is used.

For example, the $LANG[‘save_inventory_failure’] text exists in the lang/nl_NL/lang.php file but has not been translated. Whereas the $LANG[‘help_company_logo’] text only exists in the default language file (lang/en_US/lang.php)e, so it is used.

To fix this, you would simple translate the $LANG[‘save_inventory_failure’] text in the lang/nl_NL/lang.php file but need to copy the $LANG[‘help_company_logo’] message to the lang/nl_NL/lang.php file and then translate it.

Note that the info in the lang.php files is alphabetized by the $LANG index value (which must remain as english for the code to work).