Skip to content
Ap.Muthu edited this page Oct 12, 2013 · 2 revisions
  1. Summary: Several small how to's
  2. Labels: Phase-Support, Phase-Deploy

Table of Contents

How to...

... 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
For more information see Authentication.

That's it - you can login with:

Email address Password
[email protected] demo

Since Simple Invoices 2009.1 you can edit a username and password within Simple Invoices - go to the People tab and select Users.

For developers: The password is hashed in the DB with MD5('new_password').

... backup the database

For Simple Invoices database backup to work, make the tmp/database_backups directory (which is in the Simple Invoices directory) writeable by the webserver

  • To do this, in linux assuming webroot is in /var/www/html folder and apache is the webserver user:
cd /var/www/html/simpleinvoices
mkdir -p tmp/database_backups
chown apache:apache tmp/database_backups
chmod 755 tmp/database_backups

... add a new logo

To make a new logo available in Simple Invoices just copy the logo file from your computer into the logo directory in the Simple Invoices folder

  • To do this in Linux, assuming the Simple Invoices folder will be /var/www/html/simpleinvoices just copy (upload) your new logo file into /var/www/html/simpleinvoices/templates/invoices/logos/ folder
    • Note: on an Ubuntu server it's /var/www/simpleinvoices/templates/invoices/logos/your_logo.jpg
Now the logo should be available in Simple Invoices.

... get reports working on Windows/WAMP5

To enable reports to work when using Windows and using WAMP5 open the php.ini, find the line

;extension=php_xsl.dll
and remove the ; from it to become:
extension=php_xsl.dll
and then restart the WAMP5 server to enable this option.

... 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 any other one. 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

Mac OSX

If your not on Mac OSX server or sendmail isn't installed (possibly enable it) on your system you can use the below listed ones:

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 procedure

Gmail

You can use Google GMail to send emails in Simple Invoices.

Example SMTP Settings From Google's Gmail:

Parameter Setting
Outgoing Mail (SMTP) Server
Requires TLS or SSL
smtp.gmail.com
Use Authentication Yes
SSL Port 465

Steps

  • In the Simple Invoices configuration file (located at config/config.ini) 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	 = [email protected]
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.

For more information see

... change the invoice number starting point

Say you want the have the invoice number start at 1000 instead of 1.

  • Open phpMyAdmin, go to your Simple Invoices database, then find the si_index table.
  • Click browse, the data should look something like:
id node sub_node sub_node2 domain_id
1 invoice 1 1
  • Edit this row and change it to:
id node sub_node sub_node2 domain_id
999 invoice 1 1

or just execute the below SQL

DELETE FROM `si_index`;
INSERT INTO `si_index` VALUES('999','invoice','1',' ','1');

Note: If someone need to start with 21 the first id should be 20. If you want to start from 1, then there should be no entry for it.

... convert numbers to words

  • Download this script http://download.pear.php.net/package/Numbers_Words-0.16.4.tgz
  • Extract the downloaded file and copy Numbers folder to library/ folder in SI directory
  • Open "includes/class/export.php"
  • At line 2, add this: include('./library/Numbers/Words.php');
  • On the same file at about line 216 - you'll find: $customFieldLabels = getCustomFieldLabels();
  • After this line, paste this:
$nw = new Numbers_Words();
$invoice['total_in_words'] = $nw->toWords( $invoice['total']);
$invoice['total_in_words_currency'] = $nw->toCurrency( $invoice['total']);
  • Save includes/class/export.php file :p
  • Open templates/invoices/default/template.tpl (or the template.tpl of the template you're using) and wherever you want the total value of the invoice in words to appear, paste this:
{$invoice.total_in_words}
and / or for total value of the invoice in currency words to appear, paste this:
{$invoice.total_in_words_currency}
  • Save "templates/invoices/default/template.tpl" file
  • Clear your cache folder ( tmp/cache/ )
  • Open a new invoice in the print view
  • For more information, refer Forum Post.

... make the file size of PDFs smaller

  • Refer Forum Post
  • Edit the file library/pdf/config.inc.php and change the following line (at about line 60):
define('FONT_EMBEDDING_MODE', 'config');
to
define('FONT_EMBEDDING_MODE', 'none');