February 2014 / PhreeBooksR36RC3
Author – Faisal Shivani

draft

wampHowTo: PhreeBooks on WampServer

o localhost on PC    …   (Windows only)
o WampServer ver 2.4
o PHP ver 5.4 and MySQL ver 5.6
o PhreeBooks ver 3.6

PhreeBooks on Sourceforge: latest release
GitHub latest: PhreeBooks-master  (development & testing only. Not for production)
NOTE: You may need to ‘Rename’ the GitHub download, adding a ‘.zip’ file-ending before you can unzip and install.

It is assumed that you have a correctly configured WampServer installed on your machine. To check that your WampServer is working, type the URL: http://localhost in your browser and it should display It Works!.

For more information about setting up WampServer see
http://forum.wampserver.com/list.php?2

        1. Open the directory c:\wamp\www and paste in the unzipped PhreeBooks folder that you downloaded. Rename the folder if desired. For this HowTo we will assume that the folder is renamed to ‘phreebooks‘.
        2. Now is the time to add any desired Module files to the phreebooks/modules/ directory, if you want them auto-loaded during the PhreeBooks install and configure process.
        3. Open your browser and type localhost/phreebooks/index.php.
        4. If you have the PhreeBooks files correctly installed, you will be directed to the page titled Installation.
        5. Create a blank database through phpMyAdmin. Make a careful note of database name and password.
        6. Create the necessary includes/configure.php file as detailed below (copy & paste), amending the parameters appropriately. Only two changes are necessary:

6.1  ‘DIR_WS_ADMIN‘, which will be the name of the (PhreeBooks) folder placed in wamp/www directory
6.2  ‘DIR_FS_ADMIN‘ which will be the complete directory path to this (PhreeBooks) folder.

<?php
// +—————————————————————–+
// | Phreedom Open Source ERP |
// +—————————————————————–+
// | Copyright(c) 2008-2013 PhreeSoft, LLC (www.PhreeSoft.com) |
// +—————————————————————–+
// | This program is free software: you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License as |
// | published by the Free Software Foundation, either version 3 of |
// | the License, or any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// +—————————————————————–+
// Path: /includes/configure.php
//

// Set the webserver and path parameters
define(‘HTTP_SERVER’, ‘http://localhost’);

// Main webserver: eg, http://localhost
define(‘HTTPS_SERVER’, ‘https://localhost’);

// Secure webserver: eg, https://localhost

// Enable secure webserver for admin areas?
define(‘ENABLE_SSL_ADMIN’, ‘false’);
// valid values are true and false

// NOTE: be sure to leave the trailing ‘/’ at the end of these lines if you make changes!

// Relative (virtual) path from top of your webspace (ie: under the public_html or httpdocs folder)
define(‘DIR_WS_ADMIN‘, ‘/phreebooks/‘);

// Complete physical path to your Phreedom root directory.
define(‘DIR_FS_ADMIN‘, ‘/wamp/www/phreebooks/‘);

// Physical path eg: /var/www/public_html/app_dir/

// Set the default language, this can be changed at login or through the url with GET parameters.
define(‘DEFAULT_LANGUAGE’,’en_us’);

// Set the default company, this can be changed at login or through the url with GET parameters.
define(‘DEFAULT_COMPANY’,”);

// Set the database information, the login, passwrod and db name are stored in the company directory
define(‘DB_TYPE’, ‘mysql’);
define(‘DB_PREFIX’, ”);
?>

7.    Place your newly created and amended configure.php in c:\wamp\www\phreebooks\includes\.
8.    Now fill the other information on the installation page and then click submit.
9.    In your browser type localhost/phreebooks/index.php again and you should see the login screen.

Note: Please perform all the steps strictly in the sequence as mentioned.

Faisal Shivani

Useful Resources:

NOTES:

  1. Refer to the detail of the SME Server HowTo for details of file permission settings, if required.
  2. If you successfully use this HowTo, please make a brief post to the Forum (below). Thanks

Please post any comments or queries to the Forum

PhreeBooksFebruary 2014 / PhreeBooksR36RC3
Author – Charles

This isn’t strictly a HowTo, but it describes ‘What is PhreeBooks’ (in my opinion).

PhreeBooks Accounting  is a :

  • Web-based (multi-user)   …   20-30 people can access concurrently – WAN & LAN
  • OpenSource   …   the code and database is completely accessible and amendable
  • Double-entry accounting software   …   the accounting ‘gold standard’
  • ERP functionality
  • Integrated ‘Cost-of-Sales Accounting’ (NOT Periodic Accounting)

It is a relatively sophisticated accounting package with:

  • Powerful Report Generator (PhreeForm) for customized .pdf Reports or .csv data
  • Inventory Management – including Assemblies and Master Stock Items
  • ACL – user and role-based Security Settings (Access Control List)
  • Multiple Languages – Translator Assistant tool freely available
  • PHP and MySQL based – runs on Linux/Windows/Mac
  • Multiple Currencies – all transactions are recorded in user-set default currency
  • Multiple Branch Support – each branch can have it’s own Inventory
  • E-Commerce Shopping-Cart interfaces – currently ZenCart, OpenCart
  • Payment Gateways e.g. PayPal, Authorize.net, Elevon, LinkPoint, FirstData
  • Shipping Integration with FedEx, YRC, UPS, USPS
  • Sales Order -> Purchase Order – a one-click operation
  • Email Integration – send Invoices, PO’s and Statements from within PhreeBooks
  • Project Tracking – by Tasks and Cost Codes
  • Work-order capability
  • Modular Architecture for customization

In my opinion, the ‘heart’ of PhreeBooks and it’s hidden strength (USP, if you like) is the PhreeForm report generator – see below. PhreeForm is a report generation tool that enables a user to design unique reports that interrogate the database without the need to know the SQL-query language.

PhreeBooks requires a user with a degree of competence in computing, networks and accountancy to set it up. It can be set up on a PC as localhost in a peer-to-peer network, or on a dedicated local server on a LAN, or remotely hosted in the ‘Cloud’. If using a Linux server OS, then the server hardware can be anything from an old PC upwards.

Once set-up, PhreeBooks can be happily accessed by up to 20-30 (estimate) concurrent users (only limited by the database used), from anywhere on the internet using a (recommended) HTTPS secure connection.

PhreeBooks is described almost universally by users as “fast” i.e. with a good internet connection or a quality gigabit LAN, set-up on a reasonably loaded dual-core server (or better) you will feel that data is accessed quickly – unlike other alternatives.
http://forums.contribs.org/index.php/topic,50616.0.html

“Note – it [OpenBravo] seems to want a fair amount of grunt from server to run it. I’m using a corei5 with 8GB ram. ( initially tried it [OpenBravo] on a Intel(R) Core(TM)2 CPU   T5500  @ 1.66GHz with 2G Ram and it barfed )”

What Size of Company for PhreeBooks:

Business Size definitions

AUS US EU
Minute/Micro 1-2 1-6 <10
Small <15 <250 <50
Medium <200 <500 <250
Large <500 <1000 <1000
Enterprise >500 >1000 >1000

The EU describes companies by the following metrics:

  • Micro :  0-9 employees    …   (Revenue/Turnover < EUR 2M ~ $2.7M)   ~ 95% of EU SME’s
  • Small : 10-49 employees    …   (Revenue/Turnover < EUR 10M ~ $13.5M)
  • Medium – 50-249 employees    …   (Revenue/Turnover < EUR 50M ~ $68M)
  • Large –  250+ employees

In my opinion, I would describe PhreeBooks as well suited for Micro and Small enterprises and perhaps Medium sized companies also (depending on their business).

As a business grows, the structure becomes less about individuals and personalities and more about functions and roles. PhreeBooks is designed to help make this transition easy with a comprehensive user and role-based Access Control List (ACL).

One of the attractions of PhreeBooks and most OpenSource ERP software, is that a business has complete access to the database and code – do not underestimate the value of this. This means that PhreeBooks can be easily adapted by a business to suit an unforseen specific need – now and in the future. This is in stark contrast to some of the common commercial accounting packages.

The OpenSource ERP Family-Tree:

Over the years, the leading OpenSource accounting/ERP softwares have often developed as a ‘fork’ of an original software (often still in development e.g. WebERP) or have in some way been more loosely developed from a related software. Here is a very rudimentary OpenSource ‘family- tree’ (I am sure that this list is very subjective)

Compiere(1999)-> aDampiere(2006), OpenBravo(2006), Adaxa, SocratesOpen, A1.io,
SQL-ledger(1999) -> lx-Office(2003), ledgerSMB(2006) -> Kivitendo(2012)
GnuCash(2001)
OFBiz(2001) -> OpenTaps(2008)
OpenMFG(2001) -> xTuple(2007), PostBooks(2007)
Dolibarr(2002)
TinyERP(2002) -> OpenERP(2006)/Odoo(2014), Tryton(2008)
TurboCASH(2003)
Ledger(2003) -> hledger(2007), beancount(2007)
WebERP(2003) -> OpenAccounting(2003) -> FrontAccounting(2005)
WebERP(2003) -> PhreeBooks(2007)

I would be interested to know where the following ERP’s ‘fit-in’ in the OpenSource ERP Family-Tree: BlueERP, KEME-Contabilidad

Origins of PhreeBooks:

Dave Premo is the Creator and Project Manager and has kept a very firm control of development.

Dave formerly used Peachtree for 15 years, including Sage Peachtree Complete – now called Sage 50 Complete. He developed PhreeBooks to replace Sage Peachtree and has used PhreeBooks to run his business since 2008.
In his own words:

“I am the primary developer … some history:
I run a small battery company in the US [http://www.portablepower.com/] and have a background as a design engineer. I was very unhappy with the commercial accounting applications out there as I found them to be difficult to adapt to my business and very expensive to operate in a multi-user environment. I wrote several interfaces to integrate my shipping, e-commerce sites, etc. to make my business flow smoothly.

Enter my search for an open source ERP solution. I first hooked up with webERP and wrote the report-writer tool for the application. The project manager (in a similar position but earlier in the calendar to me) had a firm control over the architecture and I viewed a much different interface and structure. So I ended up looking for an architecture that I though brought about the flexibility I was looking for and ended up using the admin interface from ZenCart. (I have since completely re-written about 99.9% of the code and ended up building my own architecture) The other option was to branch off of webERP because of the stability of the accounting engine. So off I went in early 2007 to write my own accounting program. “

PhreeBooks aims to be a viable OpenSource alternative to Quickbooks and Sage/Peachtree.

PhreeForm Report Writing Tool – the ‘Heart’ of PhreeBooks:

http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=NewScripts

Phil Daintree (WebERP Project Manager)
“the reportwriter directory contains the sql report writer used with webERP – this contribution from Dave Premo – the author of Phreebooks does not follow any of the conventions of the rest of webERP but adds important functionality to webERP. There is a whole other directory structure under the reportwriter directory and the code is more difficult to follow. Happily Dave wrote some good help to enable it to be used”

PhreeForm Module is the Report generation tool within PhreeBooks, formerly called ‘Reportwriter’. There are 50+ standard ‘Reports’ including Balance Sheet, Trial Balance, Chart of Accounts, Customer & Vendor Statements etc:
TOOLS > Reports

The powerful concept behind the PhreeForm tool was that people wouldn’t have to know SQL-query language to interrogate the database and generate a unique report. Reports are xml based and the PhreeForm report-builder tool is handled on a single popup form (with tabs).

Forms and Reports in PhreeBooks:

An Invoice is a ‘Form‘. Forms are normally a single page of information.

Think of a ‘Form’ as cut out pieces of paper (representing the ‘fields’ on the form) placed on an A4 sheet of paper to get the form design you require.  Forms can be populated with different data sets e.g. multiple invoices can be generated in a single request for all sales for the day.

A list detailing sales of a particular SKU is a ‘Report‘. Reports can be many pages long, consisting of line after line of details.

Reports can be exported to .csv for external processing in a spreadsheet, for example. Reports can be viewed in HTML, XML or .pdf. Reports consist of simple rows of data, analysed by column.

Both Forms and Reports are created using PhreeForm.

PhreeBooks & OpenSource:

Currently and for the foreseeable future (remember this is only my humble opinion), the core PhreeBooks Accounting is made available to the community free via the GNU General Public License (GPL), There is currently only one paid-for add-on extension – OpenCart Interface Extension at a bargain $25.

I would expect that, as the project matures, the number of paid-for Extensions will increase.

Please do not forget to be fair and if you use PhreeBooks, contribute back to this valuable OpenSource project.

PhreeBooks in Production:

I am aware of PhreeBooks users using PhreeBooks in the following ways:

  • PhreeBooks running on a local PC (WAMP, XAMPP) and accessed by other PC’s on a P2P (Peer-to-Peer) network.
  • PhreeBooks running on a local LAN Linux server. Accessed from WAN and LAN.
  • PhreeBooks running on remote hosting. WAN access.

Dave Premo on WAN facing installs:
SSL certs are the best. It encrypts all information transmitted across the garbage dump.
Long usernames and passwords are helpful.
Set your security by user. Every module checks the users permissions before doing anything.”

and Rene:
“…  forcing password change after x days.
Setting a pattern for passwords i.e. one capital and one number
Current password can’t look like the last one  …”

Test Environment & Back-Up

I shouldn’t really need to say this – it is a bit of a ‘no-brainer’:

If you are going to put PhreeBooks into production in your business, please make sure that you have an adequate test install of PhreeBooks (preferably on a separate server) where you can test any modifications / upgrades / additions comprehensively before you modify your production install.

Even then, make sure that you have a full, up-to-date, working back-up, just in case.

If you do not follow this practice, at some point you will regret it.

Useful Resources:
http://sourceforge.net/projects/phreebooks/?source=directory
http://www.ilovefreesoftware.com/24/featured/best-open-source-accounting-software.html
http://wiki.xtronics.com/index.php/Phreebooks
http://writtenandread.net/phreebooks/comment-page-1/
http://www.techrepublic.com/blog/diy-it-guy/diy-get-a-free-erp-accounting-package-in-phreebooks/
http://en.wikipedia.org/wiki/Phreedom

Please post any comments or suggestions to the Forum

June 2014 / PhreeBooksR36RC3mint-logoXAMPP2
Author – Charles

draft

XAMPP is available for:
Windows
Mac
Linux – called LAMPP

DISCLAIMER – you follow these instructions at your own risk.

I am going to describe a three-part process to temporarily install PhreeBooks in RAM on any newish PC or Mac (<5yrs) running pretty much any operating system with >= 2GB of RAM.

The key to this is running a ‘Live-CD‘ Operating System in your RAM – in this case Linux Mint (other ‘lightweight’ Live-CD distro’s e.g. Puppy Linux may well work also – I haven’t tried them). As the Live-CD OS runs entirely in RAM (in theory not touching your hard-drive) it makes no difference what OS is already installed on the computer.

Please bear in mind that, by using the XAMPP versions for Windows, Mac and Linux, you can alternatively install PhreeBooks on XAMPP directly (and more permanently) to your hard-drive. No messing around with a Live-CD. In fact, the ‘direct to hard-drive’ install would be the ‘normal’ test install.

This HowTo will be split into 3 parts:

  1. Getting and running Linux Mint (Live-CD)
  2. Installing XAMPP for Linux (LAMPP ) localhost server
  3. Installing PhreeBooks

If you choose to skip the Linux MInt part and install XAMPP + PhreeBooks onto your hard-drive, parts 2 and 3 will still be useful.

 The benefits of this 3-step process are:

  • this is a temporary install – nothing should be installed on your HDD and when you power-down your computer everything disappears (Linux Mint + LAMPP + PhreeBooks).
  • It should work on almost all newish computers (<5yrs) – PC’s and Mac’s
  • once you have gotten an instance of PhreeBooks up-and-running you will be much more confident about installing it in a more permanent way. You will understand the process.
  • It will help if you decide to only use steps 2 and 3.
  • It’s interesting and fun.

PLEASE BACK-UP ALL FILES ON YOUR COMPUTER BEFORE ATTEMPTING ANY OF THE FOLLOWING:

Part 1 – Linux Mint (Live-CD)

WARNING: If you choose to ‘Install Linux Mint’ to your hard-disc, your stored data will be overwritten and erased. 

Why Live-CD?  Because it works in RAM and is temporary. Actually Mint has grown and now requires a DVD to fit the .iso image.

Why Linux Mint? Because it is very popular and very well supported. It has been suggested by many as a credible alternative to Windows-XP. Linux Mint is also recognised as being amongst the most universally hardware-compatible Live-CD’s available – for this reason it is popular to install on laptops.

Use whichever one of the Linux Mint releases suits you best:mint

  • Download Linux Mint-17 (Qiana)  –  Long Term Support release (LTS), supported until April 2019
  • linuxmint-17-xfce-dvd-64bit.iso
  • Start up your DVD burning software and insert your DVD
  • Burn image of the .iso file to DVD with the slowest speed (normally 4x)
  • You will be running Linux Mint in RAM. DO NOT INSTALL Linux Mint.

There are many articles covering running Linux Mint Live-CD:
http://www.youtube.com/watch?v=8edbi5xctW0
http://www.youtube.com/watch?v=qEGfgy2qlrQ
http://www.ehow.com/how_8380748_boot-linux-mint-cd.html
http://community.linuxmint.com/tutorial/view/20

You will probably need to change the ‘boot order‘ in your computer BIOS (sounds hair-raising, but isn’t) – simple to reset back when finished (make a note of the original ‘boot order’ before changing). This determines where the computer looks first for the Operating System.

http://pcsupport.about.com/od/fixtheproblem/ss/bootorderchange.htm

Part 2 -XAMPP for Linux (LAMPP)

XAMPP project website

  • download xampp-linux-x64-1.8.3-4-installer.run
  • open Xfce Terminal (command line)
  • cd /home/mint/Downloads;dir     …   move to Download directory; see what’s there
  • sudo chmod 755 xampp-linux-x64-1.8.3-4-installer.run     …   change file permissions
  • sudo ./xampp-linux-x64-1.8.3-4-installer.run     …   run the installer
  • click ‘Next >’ a number of times and then ‘Finish’
  • LAMPP is installed to /opt/lampp

xampp

  • sudo /opt/lampp/lampp start     …   start LAMP
  • browse to  http://localhost     ... select your languagexampp-welcome

  • sudo /opt/lampp/lampp security     …   set suitable passwords and make a note of them.
  • check the ‘Security‘ in the orange ‘XAMPP for Linux‘ pagesecurity

Part 3 – Download & Install PhreeBooks

3.1 – Create PhreeBooks Database:

  • First read about database requirements.
  • On the orange ‘XAMPP for Linux’ page click on phpMyAdmin     …   database creation/management
  • User = root, Password = whatever you entered earlier (“set suitable passwords”)
  • Databases > Create database, name = phreebooks, collation = utf8_general_ci  > Create
  • Select phreebooks database (click on it in column on left)
  • Privileges > Users > Add User, user name = pb, host = localhost, password = suitable  > Go

 3.2 – Download PhreeBooks:

  • Sourceforge latest release            GitHub latest PhreeBooks-master     …   Save File
  • open Xfce Terminal (command line)
  • cd /home/mint/Downloads;dir     …   move to Download directory; see what’s there
  • unzip PhreeBooksR36RC3.zip;dir     …   unzip it 🙂
  • mv PhreeBooksR36RC3 pb;dir     …   change the name to something manageable (pb)
  • sudo su –     …   give yourself root permissions
  • tar cf – pb|(cd /opt/lampp/htdocs;tar xvf -)     …   tar copy pb files to the htdocs directory
  • close Xfce Terminal

3.3 – Install PhreeBooks:

  • browse to http://localhost/pb     …  Welcome to PhreeBooks Accountingpb
    • Both /includes and /my_files need to be writable.
    • sudo chmod -R 0777 /opt/lampp/htdocs/pb/includes
    • sudo chmod -R 0777 /opt/lampp/htdocs/pb/my_files

Under normal circumstances 0777 permissions would be tightened up immediately after install (see SMEserver HowTo for a guide).

Fill out details of company, database details and install.

  •  finally check that database tables  journal_item  and  journal_main  are type InnoDB

Please post any queries, comments or suggestions for improvement to the Forum.
Also, if you used all or part of the above HowTo, please post to the Forum and let us know how it went.

Useful Resources:
http://alanedwardes.com/posts/installing-and-configuring-xampp-for-linux-lampp/
http://www.puppylinux.com/