FAQ

FAQ Category: (No category)

Yes. IBANs are very long, bank account numbers. LedgerSMB has no problems storing, retrieving and using these without any issue.

Yes. SEPA (Single Euro Payments Area) requires support for very long bank account numbers (IBANs or International Bank Account Numbers). LedgerSMB can store and use these numbers without problems.

This document will contain the extra instructions required to be executed when installing LedgerSMB 1.5 from GitHub (as opposed to from tarball).

This document needs to be written (coming soon).

This page explains how to set up LedgerSMB's first company after having completed the 1.5 quick-start installation instructions.

In case you just completed the quick-start instructions, the base URL at which LedgerSMB is accessible is http://localhost:5762 (If you have a full production setup, you shouldn't need the port indicator [the ":5762" part]). There are two URLs (entry-points) you can use to access the application:

The two entry points each serve their own purpose: setup.pl is the main tool for the database admin (lsmb_dbadmin); it serves to create new companies, create copies of companies, add users to companies and reset user's passwords. login.pl provides access to all other types of users.

Creating the first company

After browsing to setup.pl, the browser should show:

In case the screen only shows the "Database" field, this indicates problems with JavaScript not having loaded correctly. Fill out the fields as follows:

  • Super-user login: lsmb_dbadmin
  • Password: <the password used in the installation>
  • Database: testcompany

Confirm the screen by clicking "Create". When the server is done creating the database for the company, a new screen will be returned. This can take up to 20 seconds.

The resulting screen shows:

Click "Skip" in order to skip loading a pre-defined Chart of Accounts. Select a country code and click Next to list the pre-defined charts of accounts.

The resulting screen then shows a list of available Charts of Accounts:

 

The screen above isn't shown when "Skip" was selected in the step before. Clicking "Skip" in this screen skips loading a pre-defined chart of accounts.

Regardless of whether CoA loading was skipped or performed, the following screen will be presented:

LedgerSMB 1.5 setup.pl company create load templates

 

Select 'demo' templates for use with LaTeX; select 'xedemo' templates for use with XeLaTeX (which has better support for UTF-8 / accented characters and non-latin character sets). The exact choice made in this step is not highly important: templates can later be changed by loading new ones into the database. After confirming the selection by clicking "Load Templates", the following screen shows:

 

With this screen, the first user for this company gets created. There are two modes:

  • Import (Yes): Assumes the username already exists in the database (e.g. because it is already used for another company; re-uses the existing username+password)
  • Create (No): Assumes the username does not already exist; will create a new username

The "Assign Permissions" selection determines the rights assigned to the user:

  • "Full Permissions": The user may perform any task in the application
  • "Manage Users": The user has just enough rights to create new users who have appropriate rights

For the purpose of this quick-start guide, enter the following details:

  • Username: first_user
  • Password: first_user
  • Import: No
  • Salutation: Mr
  • First Name: First
  • Last Name: User
  • Employee Number: 1
  • Date of Birth: (today's date)
  • Tax ID/SSN: 1
  • Country: (your country)
  • Assign Permissions: Full Permissions

After confirming these data by clicking the "Create User" button, the following screen shows:

First user login

The "Start Using LedgerSMB" link opens the main application login screen, which can be used to log in using the initial user created above:

Confirming login results in the following page*:

* Note that the picture shows company name "test10", but when succinctly following the instructions, it should show "testcompany".

Database administration of first company

Once the testcompany has been created, it can be logged into through setup.pl as well as through login.pl. When logging in through setup.pl, the following screen with database administration functions shows:

What's next?

The system is now set up for evaluation and testing. The project has multiple channels to contact other users or the developers. Read all about that on the community project resources page.

Any comments as to this specific article? Please sign up to the site and leave your comments below!

The answer to this question depends on what using means to you.

As a user of the web application, yes, there should be absolutely no problem using a recent (as in: no more than 2 or 3 years old) web browser in order to take advantage of all the features available.

As a platform for running a LedgerSMB server, it's simply been too long since it has been last tested. You might be able to make it work at the expense of considerable effort. If you do, please comment on this FAQ or contact the mailing list to let us know about your process and results!

Those running a LedgerSMB server on the Windows platform - that we know of - do so with virtualization techniques such as VirtualBox.

This page contains the comprehensive version with the installation instructions for LedgerSMB 1.5 (as of beta6) targetting a production installation from release tarbals and deals with these steps:

  • Installing the LedgerSMB Perl module dependencies
  • Configuring the PostgreSQL server
  • Configuring a webserver
  • Configuring LedgerSMB

If you already have all of the above, proceed to the "Preparing for first use" guide.

These are not the Quick start instructions, but instructions for setting up a full production system.

Please note that installation of version 1.5 is completely different from the installation of versions 1.4 or earlier: This version uses Plack to handle integration with front-end webservers. This means LedgerSMB can now be run on many webservers, including (but not limited to):

Of all the things that have become possible with the use of Plack, there's one thing that's no longer possible: running LedgerSMB as set of CGI scripts. This should not be a big concern, since Plack allows plugging LedgerSMB into Apache using mod_fcgid, mod_fastcgi or mod_proxy all of which have been available for versions 2.0 and up.

In order to install LedgerSMB 1.5 from the GitHub repository, a few additional steps need to be performed which fall out of the scope of this document -- these steps come close to being required to set up a development environment. Should you want to proceed regardless, here are the instructions to install LedgerSMB 1.5 from GitHub.

Feel free to log in and share your experiences in the comments at the end of the article.

System requirements

Server

Pre-installed software:

  • Perl 5.10 or newer (full core installation)
  • Perl's "cpanm" module installer
  • PostgreSQL 9.4 or newer
  • FCGI or PSGI compatible webserver (as mentioned above)

There isn't any good advice on the RAM requirement; for very small installations, 256MB or 512MB RAM could be enough.

As for storage requirements: the space required to store the company accounting data is pretty minimal (several 100MB can store years). When storing attachments in the database, storage requirements go up quickly.
Out of the box, there's one major storage requirement: if you want to be able to generate PDF output, LedgerSMB depends on (Xe)LaTeX. When installing (Xe)LaTeX on Debian, that pulls in close to 1GB of packages (unpacked).

Installation of the server side software on Windows isn't explicitly supported by the development team; it might or might not work. If it works for you, please submit your instructions for others to follow.

Client

There are no specific requirements for LedgerSMB clients (web browsers) other than that they should have JavaScript enabled and be able to run Dojo 1.10.

Although the server software isn't explicitly supported on Windows, there's no such restriction for the client software: a broad range of browsers is supported (Chrome, FireFox, Opera, ...), including Microsoft Internet Explorer and Microsoft Edge.

Browsers explicitly not supported are:

  • Lynx
  • w3m
  • IE9 or earlier

Installing the LedgerSMB Perl module dependencies

Please note that some distributions (e.g. Fedora) do not by default install all core modules, but rather, install a subset. LedgerSMB doesn't list core modules as dependencies but assumes modules to be available. To make sure you have the full list of core packages, please install the perl-core package.

Installing the available modules from your distribution

This section may be skipped, however, in that case, all modules will be installed from CPAN -- see the next section.

Most distributions provide at least part of the modules required to run LedgerSMB. Some administrators prefer installation of the available modules from the distribution, adding the ones missing from the distribution from Perl's own comprehensive source: CPAN.

The list of available modules - distributed at the right version by your distribution - varies from distribution version to distribution version. The section below lists only some of the distributions and their versions. If you have information to add for other versions and distributions, please comment and we'll integrate that.

Debian, Ubuntu/Mint

It's strongly recommended to do new installs of LedgerSMB on a currently stable distribution. As Wheezy is "oldstable" (LTS) at the time of writing, it's not included in the list. Since Stretch is still highly in flux and Debian's LedgerSMB maintainer is still adding dependencies, the dependency list for Stretch will be updated when its release is imminent. Below then is the list of commands to execute to install the relevant packages on Jessie:

# Core packages provided by Debian Jessie
apt-get install libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl
apt-get install libdbd-pg-perl libdbi-perl libdatetime-perl
apt-get install libdatetime-format-strptime-perl libdigest-md5-perl
apt-get install libfile-mimeinfo-perl libjson-xs-perl libjson-perl
apt-get install liblocale-maketext-perl liblocale-maketext-lexicon-perl
apt-get install liblog-log4perl-perl libmime-base64-perl libmime-lite-perl
apt-get install libmath-bigint-gmp-perl libmoose-perl libnumber-format-perl
apt-get install libpgobject-perl libpgobject-simple-perl libpgobject-simple-role-perl
apt-get install libpgobject-util-dbmethod-perl libplack-perl libtemplate-perl
apt-get install libnamespace-autoclean-perl libmoosex-nonmoose-perl
apt-get install libxml-simple-perl

# Packages provided by Debian Jessie for PDF/Postscript output
apt-get install libtemplate-plugin-latex-perl libtex-encode-perl
apt-get install texlive-latex-recommended
## Packages provided by Debian Jessie for PDF/Postscript output with UTF-8
apt-get install texlive-xetex

# Stand-alone Perl server
apt-get install starman

# OpenOffice output document
apt-get install libopenoffice-oodoc-perl

After installing the dependencies above, you should continue with the "Installing Perl dependencies directly from CPAN" steps to install any further missing packages.

Fedora, RHEL, CentOS

LedgerSMB  1.5 requires PostgreSQL 9.4+, which isn't avaliable on all RHEL/CentOS distributions. Packages are distributed for these distributions through PostgreSQL's YUM repository. Their site also provides installation instructions.

Note: In recent versions, yum has been replaced by dnf. Other than that, the commands below have remained the same.

# Core packages provided by Fedora 24
yum install perl-CGI-Emulate-PSGI perl-CGI-Simple perl-Config-IniFiles
yum install perl-DBD-Pg perl-DBI perl-DateTime perl-DateTime-Format-Strptime
yum install perl-Digest-MD5 perl-File-MimeInfo perl-JSON-XS
yum install perl-Locale-Maketext perl-Locale-Maketext-Lexicon
yum install perl-Log-Log4perl perl-MIME-Base64 perl-MIME-Lite perl-Math-BigInt-GMP
yum install perl-Moose perl-Number-Format perl-Plack perl-Template-Toolkit
yum install perl-namespace-autoclean perl-MooseX-NonMoose perl-XML-Simple

# Packages provided by Fedora 24 for PDF/Postscript output
yum install perl-TeX-Encode texlive
## Packages provided by Fedora 24 for PDF/Postscript output with UTF-8 support,
## Not found; use the CPAN downloads

# Packages provided by Fedora 24 for standalone Perl server
yum install perl-Starman

# Packages provided by Fedora 24 for OpenOffice output
# Not found; use the CPAN downloads

Installing all required modules directly from CPAN

How to use the modules provided by your distribution is explained in a section below. This section explains how to install (all or all remaining) modules directly from CPAN.

If you want to keep the CPAN-installed modules separate from whatever is in your distribution, you could make use of local::lib. Note that packages installed that way won't be available globally -- a specific environment needs to be set up to make them available.

To install the bare minimum of modules required for LedgerSMB 1.5, issue the following command:

# Installation of LedgerSMB Perl dependencies directly from CPAN
cpanm --quiet --notest --installdeps .
Then, there are a number of features which need additional modules. The modules required for each feature can be installed by appending "--with-feature=<feature-name>" to the above command line. These features are supported:

Feature Description
latex-pdf-ps Enable PDF and PostScript output
Note: In order to make use of this functionality, the server must also have 'latex' or 'xelatex' installed. On many distributions, these packages are called 'texlive-latex' and 'texlive-tetex' respectively.
latex-pdf-images Image size detection for PDF output
starman Starman Perl/PSGI (standalone) webserver
openoffice OpenOffice.org document output
edi (EXPERIMENTAL) X12 EDI support
rest (EXPERIMENTAL) RESTful webservices

In order to install the starman and pdf/postscript output, the command becomes:

# Installation of LedgerSMB Perl dependencies directly from CPAN
# With Starman and PDF & Postscript output

cpanm --quiet --notest --with-feature=starman --with-feature=latex-pdf-ps \
--installdeps .

Configuring the PostgreSQL server

There are only two requirements for the PostgreSQL database server. This section instructs how to configure an pre-installed PostgreSQL installation to meet those requirements. It's assumed that the LedgerSMB server and PostgreSQL are being run on the same system. The requirements to meet are:

  1. A database administrator user (in PostgreSQL called a 'role') for creation and administration of LedgerSMB company databases
  2. Authorization setup so the database administrator can log into the database through LedgerSMB's 'setup.pl' program

Creating the company database administrator account

The database administrator user account needs to have at the bare minimum:

  • The right to create databases (CREATEDB)
  • The right to create roles (CREATEROLE)
  • The right to log in (LOGIN)
  • A password to authenticate logins

The following command issued as root user, creates a user named "lsmb_dbadmin" (which isn't a super user):

$ createuser -S -d -r -l -P lsmb_dbadmin
Enter password for new role: ****
Enter it again: ****

Or - alternatively - this command, issued as a user which has 'sudo rights':

$ sudo createuser -S -d -r -l -P lsmb_dbadmin
Enter password for new role: ****
Enter it again: ****

Configuring database access rights

PostgreSQL takes its access configuration through a file called 'pg_hba.conf'. The location of this file may differ per distribution:

  • Debian derivatives: /etc/postgresql/<version>/<cluster>/pg_hba.conf
  • Redhat derivatives: /var/lib/pgsql/<version>/data/pg_hba.conf

On most systems, this file has four effective lines:

local   all             postgres                                peer
local   all             all                                     peer
host    all             all             127.0.0.1/32            peer
host    all             all             ::1/128                 peer
These lines mean that each system user can connect to the database system with an equally named database user; the connecting source doesn't make a difference: unix and TCP/IP sockets have the same configuration.

The LedgerSMB software needs to be able to connect to the database system as 'lsmb_admin' or as a LedgerSMB user, not as the user that runs the server process. The new content should look like:

local   all             postgres                         peer
local   all             all                              peer
host    all             postgres         127.0.0.1/32     reject
host    all             postgres        ::1/128      reject
host    postgres,template0   lsmb_dbadmin         127.0.0.1/32     md5
host    postgres,template0   lsmb_dbadmin         ::1/128      md5
host    postgres,template0,template1   all          127.0.0.1/32     reject
host    postgres,template0,template1   all          ::1/128      reject
host    all             all             127.0.0.1/32     md5
host    all             all             ::1/128          md5
This configuration takes advantage of the fact that each connection method (unix sockets vs TCP/IP sockets/addresses) can be separately configured. While the default connection method of the 'psql' tool is to connect over the 'local' (unix socket method), the default connection method for LedgerSMB is to use 'localhost' (127.0.0.1/32 or ::1/128).

The above configuration means that the user 'postgres' can't be used any longer to connect from 'localhost', no user can connect to the 'postgres' database through 'localhost' [reject] and all other combinations of users and database names need password authentication [md5].

Notes:

  1. PostgreSQL matches the lines first to last and uses the first matching line, so the order of the lines is of the highest importance.
  2. For more information about the pg_hba.conf configuration options, see the PostgreSQL pg_hba.conf documentation
  3. The databases 'template1' and 'template0' are system databases available in every cluster; this configuration blocks those for access from LedgerSMB as well.

After reconfiguring pg_hba.conf, the PostgreSQL service needs to be restarted. this works with one of the following commands (depending on your distribution):

# restarting postgresql service (as root)
$ service postgresql restart
# - or -:
$ service postgresql-<version> restart
Or similarly, for users with 'sudo' rights, but no root access:

# restarting postgresql service (as user with sudo rights)
$ sudo service postgresql restart
# - or -:
$ sudo service postgresql-<version> restart

Verifying database access

To verify access for the database admin user 'lsmb_dbadmin', an accessible database - not named 'postgres', 'template0' or 'template1' - is required. On new installs, these are the only databases. So the next example creates one. Here's how to verify the setup:

# Verify access configuration (run as root)
$ createdb lsmb_access_test_db
$ psql -h localhost -U lsmb_dbadmin -d lsmb_access_test_db -c "select version()"
PostgreSQL 9.4.7 <--- this line indicates success
$ dropdb lsmb_access_test_db
# - or - as user with sudo rights:
$ sudo createdb lsmb_access_test_db
$ psql -h localhost -U lsmb_dbadmin -d lsmb_access_test_db -c "select version()"
PostgreSQL 9.4.7 <--- this line indicates success
$ dropdb lsmb_access_test_d

Configuring a web server

Regardless of your web server setup, configuration of an "application server" is required. The application server used with LedgerSMB can be any PSGI compatible server. The default application server is Starman, which is widely considered the fastest available. The Starman server process lives behind a reverse proxy. While Starman deals specifically with those HTTP requests which require "application logic", all other requests (mostly static content, such as images or CSS) are dealt with by the proxy.

Configuring the Starman application server

Depending on the distribution, a startup method must be installed; this can be one of:

  • SysV init script
  • Upstart configuration
  • Systemd configuration

At the time of writing, the only configuration that comes with LedgerSMB's tarbal is the systemd configuration. The following common setup is required regardless of the system used to manage services on the target system.

To support priviledge separation, the Starman server should be running as a user which meets these criteria:

  • Not the same user as the web server
  • Does not have write access to the LedgerSMB directories

To that extent, identify an existing (unused) system user, or create one with this command:

# create 'ledgersmb' user for Starman server to run
$ useradd -d /non-existent -r -U -c "LedgerSMB/Starman service system user" ledgersmb

Configuring systemd for Starman

In the directory conf/systemd/ from the tarbal, there is a preconfigured systemd service file, which needs to be copied into place. In case you decided to install dependencies into a local::lib, the service file needs to be edited to set a PERL5LIB environment variable before you can succesfully start the service.

# 'copy' systemd service configuration, enable and start
$ sed -e "s#WORKING_DIR#$PWD#" conf/systemd/starman-ledgersmb.service \
> /etc/systemd/system/starman-ledgersmb.service
$ systemctl enable starman-ledgersmb
$ service starman-ledgersmb start
Note that the above assumes that the commands are being run from the root of the unpacked tarbal. It also assumes that the tarbal has been unpacked at its installation path.

To verify that the service started up correctly, run:

# verify that the Starman/LedgerSMB server started correctly
$ journalctl -u starman-ledgersmb.service

Configuring a reverse proxy

For a quick test-run or demo setup running on localhost only, configuration of a proxy isn't mandatory. However, for a production setup with LedgerSMB being network or even web-exposed, it's ill-advised to run without the reverse proxy for - at least - the following reasons:

  • The proxy can serve static content [much] more efficiently (performance)
  • The proxy guards Starman against public exposure (security)
  • The proxy adds TLS/SSL (security)

The reverse proxies documented below all have been and continuously are being tested and reviewed for correctly handling various kinds of malicious network traffic.

With TLS/SSL certificates being completely free these days through Let's Encrypt, and only a few dollars for the simplest of certificates from commercial vendors, there's really no reason not to secure  traffic to the server. Further documentation below assumes you have such a certificate. As for getting Let's Encrypt certs, use their Getting Started guide.

Of the following sections (Configuring nginx, Configuring Apache, Configuring lighttpd), there's only the need to follow instructions of one section: the one for the proxy of choice.

Configuring nginx

The tarball contains an example virtual host configuration file to set up a reverse proxy with nginx. It needs to be included in the 'http { }' block in your nginx configuration. On Debian derived systems, this is done by copying the file to /etc/nginx/sites-available/ledgersmb.conf. On RedHat/Fedora derivatives, the copying goes to /etc/nginx/conf.d/ledgersmb.conf. After editing the file, replacing the following variables:

  • WORKING_DIR
    Same replacement as before
  • SSL_CERT_FILE
    Should be where your certificate file is stored; probably /etc/certs/your_host.example.com.pem
  • SSL_KEY_FILE
    Probably the same as the SSL_CERT_FILE, but with '.key' extension
  • YOUR_SERVER_NAME
    If nothing else, should be replaced by the output of the command 'hostname -f'

On Debian derivatives, activate this file after it has been edited, using:

# On Debian/Ubuntu/Mint activate the virtual host
$ ln -s /etc/nginx/sites-available/ledgersmb.conf /etc/nginx/sites-enabled/
On RedHat/Fedora derivatives, no symlinking is necessary: the configuration is active immediately. Now, verify that the configuration is acceptable:

# (Re)start nginx service to make nginx reconfigure itself and validate configuration
$ service nginx restart

Configuring Apache

The tarball contains an example virtual host configuration file to set up a reverse proxy with Apache. It needs to be included in the Apache configuration. On Debian derived systems, this is done by copying the file to /etc/apache2/sites-available/ledgersmb.conf. On RedHat/Fedora derivatives, the copying goes to /etc/httpd/conf.d/ledgersmb.conf. After editing the file, replacing the following variables:

  • WORKING_DIR
    Same replacement as before
  • SSL_CERT_FILE
    Should be where your certificate file is stored; probably /etc/certs/your_host.example.com.pem
  • SSL_KEY_FILE
    Probably the same as the SSL_CERT_FILE, but with '.key' extension
  • SSL_CHAIN_FILE
    The chain file provided by your SSL vendor, with a '.pem' extension
  • YOUR_SERVER_NAME
    If nothing else, should be replaced by the output of the command 'hostname -f'

On Debian derivatives, activate this file after it has been edited, using:

# On Debian/Ubuntu/Mint activate the virtual host
$ a2ensite ledgersmb.conf
On RedHat/Fedora derivatives, no symlinking is necessary: the configuration is active immediately. Now, verify that the configuration is acceptable:

# (Re)start service to make apache reconfigure itself and validate configuration
$ service apache2 restart # Debian/Ubuntu/Mint
$ service httpd restart # RedHat/Fedora/CentOS

Configuring lighttpd

<to be done>

Configuring LedgerSMB

The tarball has a default LedgerSMB configuration file conf/ledgersmb.conf.default. Install the configuration file with:

# Install the default ledgersmb.conf configuration file
$ cp conf/ledgersmb.conf.default ledgersmb.conf
That is it.

In case the in-app e-mail feature is going to be used, check the values in the [mail] section and optionally adjust for the mail setup of the target system.

Next steps

Now follow the instructions in the "Prepare LedgerSMB for first use" guide.

Starting 1.4.17 account hierarchies - which were part of LedgerSMB for a looong time already - will now be used for financial reporting: balance sheet and income statement. In addition to grouping accounts into the subgroups defined by the hierarchy, amounts are aggregated up the tree as well. This article demonstrates how to use this feature. Scroll all the way to the end to see what happens if you don't want to update your configuration (yet).

Hierarchies?

There are multiple reasons for wanting to use hierarchies. One of those reasons is that expense accounts are currently listed as one long list under Expenses while income accounts are listed as a -usually shorter- list under Income. Personnel expenses are usually spread across multiple expense accounts. With lots of other expense accounts also listed, what's the total expense on personnel?

Another use-case for using hierarchies might be because you're running a "margin business". That is, you're only every buying what you're selling and the cost of goods sold is the large part of your expenses. In cases like this it can be a good idea to use a different setup of the income statement: one where cost of goods sold is immediately subtracted from income, leaving gross margin to cover all other expenses in the company.

In all versions (that I ever used) prior to 1.4.17, there was no way to create a report layout which matches either of the use-cases described above. As off 1.4.17, the account hierarchy in the reports solves exactly this problem.

Example output

As shown in the output below (left) the new balance sheet aggregates numbers into the headings and headings of headings: The "Current assets" heading is the total of allowance for doubtful accounts and Checking account while "All assets" is the tottal of "Current assets" and "Capital assets" heading amounts. On the right, the old balance sheet report is shown. Even though the first-level headings (Capital Assets, Current Assets, ...) were defined in the system, they did not show up in the report.

Please scroll down for a comparison of the income statement report.

On the right, there's the old report again to be compared to the new report on the left. The right report shows only the total expenses, while the one on the left shows total expenses, total payroll expenses and total General & administrative expenses.

Income statement comparison

 

Additional configuration

The example above has been created using the "General" US Chart of Accounts which can be found in the standard LedgerSMB distribution. The standard version only includes only a single level hierarchies, meaning only "5600 - General & Admin expenses" (and the like).

To create the demo above, I added the other levels (with nodes marked <pre-existing> part of the standard CoA as distributed):

  • ALL ASSETS
    • CURRENT ASSETS <pre-existing>
    • CAPITAL ASSETS <pre-existing>
  • ALL LIABILITIIES
    • CURRENT LIABILITIES <pre-existing>
  • 3299 TOTAL EQUITY
    • SHARE CAPITAL
    • 4998 NET MARGIN (P&L Result)
      • GROSS MARGIN
        • ​INCOME <pre-existing>
        • COST OF GOOS SOLD 
      • OPERATIONAL EXPENSES
        • PAYROLL EXPENSES <pre-existing>​​​

​​​Headings with a heading

In order to build the hierarchy of headings, each heading needs to have a heading on its own, except for the "root" headings "ALL ASSETS", "ALL LIABILITIES" and "TOTAL EQUITY". The P&L is reported as part equity, meaning that the P&L result will have "TOTAL EQUITY" as its parent.

In order to set a heading's parent, go to the Chart of Accounts menu item under the General Journal main menu. Click on the [Edit] link in the column before the last. The resulting screen shows below. The "Heading" dropdown allows selection of any of the other existing headings.

Please note that an error will be thrown if you're trying to set the heading of the current heading to one which has the current heading as its own heading: this creates a cycle in the headings which is not supported (where does roll-up begin and end, if you're going round in circles?).

The above is enough to make your Income Statement work. For the Balancesheet, there's one more step to be taken.

Identifying the profit/loss heading

In order to summarize the P&L result as a single line no the balance sheet, the heading which totalizes the profit/loss must be marked as such. This should de done through the main menu item System, under the Defaults submenu as shown below.

As you can see, in casu the example above, the heading "4998 -- NET MARGIN" has been selected; exactly the heading which is used as the highest level for the P&L and lowest level at which income and expenses are being reported in the balance sheet.

What if I don't ...

... want to change my configuration (just yet). Will it stop working?

Backward compatibility report

No, it won't: backward compatibility selections have been added to the Income statement and Balance sheet reports. The image below shows the compatibility setting on the Income statement report.

When running with the "Account category" option, the account category ("Income", "Expense") will be used as the hierarchy instead of the account hierarchies. The output of the income statement from the example above with this setting looks like the picture below, with a balance sheet run with the same compatibility setting right next to it.

Note that the compatibility report is *not* the default setting, meaning that in order to be provided the default report, the "Account category" "hierarchy" needs to be selected explicitly.

IMPORTANT NOTE: The instructions on this page, are retained for historical purposes only.
For Up To Date installation instructions please refer to [Installing LedgerSMB](http://ledgersmb.org/installation)

***NOTE: As of 1.4.29, LedgerSMB doesn't use a Makefile.PL anymore; instead it uses a 'cpanfile' -- instructions below have been adjusted to include this difference

** Work in progress...
Goal: In this tutorial we will install LedgerSMB 1.4.10.1 on Debian Wheezy 7.x.

System requirements
• Debian Wheezy 7.8 at 64 bits
• Apache v2.x
• PostgreSQL 9.0+
• Perl 5.10+

Next actions
• This tutorial is roughly 90% done. When 100% done this note will be remove.
• We need volunteer(s) to complete the remaining 10% of this tutorial. Any volunteer? You are welcome to edit this page now :) So far the below "make test" command returns lots of errors. The following "INSTALL" text file might help to identify the missing steps or errors. https://sourceforge.net/p/ledger-smb/code/HEAD/tree/branches/1.4/INSTALL (link is external) It is unclear if that "INSTALL" text file is up to date for LedgerSMB 1.4.10.1.

Notes
• For installing LedgerSMB 1.3-x on Ubuntu find that other tutorial at http://ledgersmb.org/news/ubuntu-installation-tutorial-ledgersmb-13-series
• For installing LedgerSMB 1.4.10.1 on Ubuntu please consider create a new tutorial for Ubuntu. Please do not hijack this tutorial with Ubuntu instructions, because instructions, commands, and packages for Debian and Ubuntu are similar but different.
• All passwords in this tutorial are: "org" without the quotes. Feel free to change those of course.

Steps

Using Terminal as Root run the following command to install the required Perl-modules, required Texlive-modules, and their required dependencies

apt-get install libdata-dumper-simple-perl perl-modules liblocale-maketext-lexicon-perl libdbi-perl libdbd-pg-perl libconfig-any-perl libmime-lite-perl libhtml-linkextractor-perl libnet-tclink-perl libparse-recdescent-perl libmodule-build-perl libperl5.14 libuuid-perl liblocale-gettext-perl libyaml-tiny-perl libtext-iconv-perl libtext-charwidth-perl libmodule-install-perl liblatex-driver-perl libclass-std-perl libconfig-std-perl

Using Terminal as Root run the following command to install the required texlive modules, and their required dependencies. Note that this will download ~1,949 MB and could take long time.

apt-get install texlive-fonts-extra texlive-latex-extra-doc texlive-lang-all texlive-latex-extra texlive-fonts-recommended texlive texlive-doc-en texlive-generic-extra

Using Terminal as Root run the following command to install the required Apache, and related packages

apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert build-essential

Using Terminal as Root run the following four line of commands to install LedgerSMB 1.4.10.1
cd /tmp
wget http://downloads.sourceforge.net/project/ledger-smb/ledgersmb/1.4.10.1/ledgersmb-1.4.10.1.tar.gz
tar xvfz ledgersmb-1.4.10.1.tar.gz
mv ledgersmb /usr/local/

In the following steps we will configure Apache for LedgerSMB

Using Terminal as Root run the following command to get full access to Apache
chown -R www-data:www-data /usr/local/ledgersmb

Using Terminal as Root run the following command to connect Apache server with the appropriate config-files
sed -e "s|WORKING_DIR|$PWD|g" /usr/local/ledgersmb/ledgersmb-httpd-2.4.conf.template > /etc/apache2/conf.d/ledgersmb-httpd.conf

Using Terminal as Root run the following command to enable "mod_rewrite" Apache module
a2enmod rewrite

Using Terminal as Root run the following command to restart of Apache
service apache2 restart

Using Terminal as Root run the following command to do some modifications of the configuration-files
mv /usr/local/ledgersmb/ledgersmb.conf.default /usr/local/ledgersmb/ledgersmb.conf

Using Terminal as Root run the following command to restart of Apache again
service apache2 restart

Using Terminal as Root run the following 3 command lines to validate the installation
cd /usr/local/ledgersmb

***NOTE: the next command depends on your LedgerSMB version; up to 1.4.28, you need the commands below, which are equivalent to this single command for 1.4.29 and up:

# Executed this command for 1.4.29 and up
cpanm --notest --quiet --with-feature=latex-images --with-feature=edi \
--with-feature=latex-pdf-ps --with-feature=openoffice --installdeps .

(step only applicable for 1.4.28 and lower)
perl Makefile.PL

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 12 mandatory module(s) from CPAN?"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 4 optional module(s) from CPAN?". "Starman, CGI::Emulate::PSGI, Plack::Builder, Plack::Middleware::Static"

n

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 1 optional module(s) from CPAN?". "Image::Size"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 1 optional module(s) from CPAN?". "X12::Parser"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 2 optional module(s) from CPAN?". "Template::Plugin::Latex, TeX::Encode"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 2 optional module(s) from CPAN?". "XML::Twig, OpenOffice::OODoc"

y

Using Terminal as Root run the following command to resume the compile from source procedure, and install dependencies(step only applicable for 1.4.28 and lower)

make

Terminal will return the following message
"- Your preferred file format is [2] (OOo=1 ODF=2)."
"Is that OK (y/n) ?" (step only applicable for 1.4.28 and lower)

y

Using Terminal as Root run the following command to install "Template::Latex" and its dependencies

apt-get install libtemplate-plugin-latex-perl

Notes
• Template::Latex is included in Template::Plugin::Latex which is now included in Debian as libtemplate-plugin-latex-perl.
• That command can take a long time. When done it will return the message "PASS".

Using Terminal as Root run the following command to run "test" and resume the compile from source procedure, and install dependencies (step only applicable for 1.4.28 and lower)

make test

Using Terminal as Root run the following command to install the Perl-files LedgerSMB put on Apache

cd /usr/local/ledgersmb
sh install.sh

Terminal will return the following message
"Would you like to configure as much as possible automatically?" (step only applicable for 1.4.28 and lower)

yes

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Would you like me to automatically choose some CPAN mirror sites for you? (This means connecting to the Internet)"

yes

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 4 optional module(s) from CPAN? [n]"
"- Starman ...missing."
"- CGI::Emulate::PSGI ...missing."
"- Plack::Builder ...missing."
"- Plack::Middleware::Static ...missing."

n

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"- TeX::Encode ...missing."
"==> Auto-install the 1 optional module(s) from CPAN? [n]"

y

Terminal will return the following message
"Which user does your web server run as?"

www-data

Notes: Make sure you do not add any space. Type in "www-data" as is without the quotes.

Terminal will return the following message
"Where do we copy the ledgersmb-httpd.conf file to?"

/etc/apache2/conf.d

Note: Ensure there are no space

Using Terminal as Root run the following command to restart of Apache again

service apache2 restart

Using Terminal as Root run the following 2 commands to install and configure Posgresql.

apt-get install postgresql-9.1 postgresql-client-9.1 postgresql-contrib-9.1 libaprutil1-dbd-pgsql
su postgres -c psql template1

Terminal will now read as following. This means you successfully entered PosgreSQL.
"postgres=#"

Using Terminal as Root run the following command to install and configure PosgreSQL. In that command replace with a password of your choosing. Keep the two 'apostrophes'. To reduce the risk of errors, you password must be lower case, letter and numbers only, no symbols, and less than 16 characters.

ALTER USER postgres WITH PASSWORD '';

Using Terminal as Root run the following command to leave PosgreSQL. This will also alter the password for within the database. Then return you to Debian Terminal.

\q

Using Terminal as Root run the following command to alter the password for the unix user "postgres"

passwd -d postgres

Using Terminal as Root run the following command to create ledgersmb database who has full rights on the database with user ledgersmb

adduser ledgersmb

Using Terminal as Root run the following command to switch to "ledgersmb" user

su postgres

Using Terminal as "ledgersmb" user run the following command to switch to continue the ledgersmb database setup

createuser -D -A -P ledgersmb

Terminal will return the following message.
"Enter password for new role:"
Type in a password. To reduce the risk of errors, you password must be lower case, letter and numbers only, no symbols, and less than 16 characters.

createdb -O ledgersmb ledgersmb

Terminal will return the following message.
"Shall the new role be allowed to create more new roles? (y/n)"

y

Still using Terminal as Root run the following command to reboot your system and resume activating all the above actions

reboot

In the following steps we will setup LedgerSMB

Using your favorite modern web browser such as Iceweasel go to http://localhost/ledgersmb/setup.pl (link is external)

Notes
• The name for the company database can only contain letters, digits and underscores;
• Additionally, it must start with a letter;
• Company database names are case insensitive, meaning you can't create two separate company databases called 'Ledgersmb' and 'ledgersmb'."

For the password you type give the password you gave above when you set the database user's password in the database ('postgres' was the example password given).

For the database (=database of the organization) you can choose the company by yourself: type name of Company/Organization, in this example mycompany

Click on “login” button

On the next page select yes and click on "next" button

Then you are directed to the "Database Management Console" page (This could take several minutes because the database for the company will be made)

Choose a language from scroll down menu, such as "us"

Then "Next" button

On the next page, select a option from the scroll-down menu. The default "General.sql" option is best option to see all features.

Click on "Next" button

On the "Enter User" page fill in the data needed according to your choice:

Import: "no"
Assign permission: "choose full permissions"

Click on "Create User" button

On the next screen click on "Start Using LedgerSMB" link

On the log-in page fill here in the data you already have inserted according to the previous pages

Note that the next time you want to login LedgerSMB go to http://localhost/ledgersmb/login.pl (link is external)

Click on "Login" button

On "Preferences for ***" page, for security reason, you should change your password. Also you can modify your preferences in the listed formats.

Note: A major difference between 1.4- and 1.2-series is the creation of users and their authorizations. Here you simply click on “System” link and then “admin users”.

Enjoy :)

Below is a listing of demos available from different hosting companies:

Efficito.com

 

StartIT

 

Promote LedgerSMB - more users - bigger community - better software

  • Rate LedgerSMB by clicking on the thumbs up button on Sourceforge
  • Click "Like" on Facebook and connect on LinkedIn
  • Share your story on Twitter and recommended LedgerSMB on Google+
  • Link to us from your blog or web page: 
    <a href="http://www.ledgersmb.org" target="LedgerSMB"> 
    <img style = "border: 0px;" 
    src = "http://ledgersmb.org/sites/default/files/lsmb.jpg"alt ="LedgerSMB"> </ a>
    

     

  • Write a short "User Review" on Sourceforge
  • Write a testimonial to the LedgerSMB website.

The LedgerSMB team is seeking contributions in - among others - the following areas:

  • Translations
    LedgerSMB has been translated into a (large) number of languages. However, development has continued, but many translations haven't kept up with the change.
  • Windows installer
    We'd like to have an installer which contains all the dependencies (PostgreSQL, Apache, Perl, ...) which "just work"
  • Testing
    While the APIs can be tested using automated tests (and they are), the web UI is much harder to test. For this we currently mostly depend on people actually using the application. So, we want you to go through the application over and over - especially in the beta and gamma phases - and report the errors you find
  • Graphics
    We need a new favicon logo which when presented in the browser at least looks somewhat like our current logo
  • UI design
    We could use lots of feedback on improving our UI to make it more intuitive for non-accounting user

Next to the above, we could really use your migration feedback: If you succesfully migrated your database from older LedgerSMB versions or SQL-Ledger, let us know!

For real-time help try IRC - you will usually find most of the core team hanging out at irc.freenode.net / #ledgersmb

The IRC channel is also bridged to the Matrix Network as #ledgersmb

There are people there who range from users to developers who are willing to help. We have agreed to adopt the Ubuntu code of conduct for our community. Please read it if you plan on joining us.

Please keep in mind that the community (especially the people you may need help from) are scattered around the world and will likely be in a different timezone to you.
This means that it can sometimes take quite a few hours before someone responds.
For email lists this is not a big problem, but if you are using IRC (directly or via a matrix guest session) you will need to stay connected until someone answers otherwise we have no way to contact you :-)

If you ask for help as a signed up Matrix user, please log back in and check for a response occasionally, we will always respond as soon as someone is available.

Pasting multiple lines

We also ask that you always use a paste site when pasting more than 2-3 lines.

Paste sites include:

  • http://paste.lisp.org/
  • http://scsys.co.uk:8002/ - direct past url to #ledgersmb via irc boot
  • If you are using Matrix, pasting images and files will use a pastebin site (provided by matrix) automatically, but large blocks of text still need to be manually placed in a pastebin
Matrix vs IRC
    Pros
  • Guest Access using the vector.im web client (with limited matrix features)
  • Easy account signup via vector.im
  • Room (Channel) history, even from when you are not online.
    Cons
  • Still a few features not implemented in the Matrix => IRC bridge
    but they shouldn't affect most users
  • Inconvenient to change your NICK on the IRC side of the bridge
    You need to do this from a private chat with @appservice-irc:matrix.org
    then....
  • It is currently almost impossible to authenticate on the IRC network (you shouldn't need to)
  • At this time you shouldn't use matrix to send any commands to the IRC network that contain sensitive information as they will be visible to all users in the matrix room

We suggest you create an account as that will allow you to log back in later to see our response to your question.

All in All, matix (using the IRC bridge) is possibly a better fit for many users.

Connecting to IRC
Webclient
  • You can use a browser-based irc client to join the channel.
  • You can use a browser-based matrix client to join the channel.
    It defaults to guest access with reduced features, but it is trivial to sign up and get additional benefits like channel history and other things.
Dedicated IRC client

The best way to get (free) help is to join one of the LedgerSMB mailing lists:

Browse the mailing list archives for past advice.
 
Announce List
https://lists.sourceforge.net/lists/listinfo/ledger-smb-announce
User List
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
Developer List
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
SVN commits List (not used since the shift to github)
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits
 
Gmane - LedgerSMB mail lists as RSS and NNTP
ledger.smb.* groups. Nice web reader and list search in relevant lists.

Posting rate stats graph, comp.finance.ledger.smb.user

 

Latest posts:

 

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 [ http://en.wikipedia.org/wiki/Perl ]

Perl 5 is a highly capable, feature-rich programming language with over 24 years of development.
http://www.perl.org/&#13;

Learn Perl
http://www.perl.org/learn.html&#13;

The Bernard Chan Perl Tutorial
http://geek.scorpiorising.ca/lcms/index.php?page=perl&#13;
http://www.cbkihong.com/index.pl?op=perltut&lang=e&#13;


Perl on CPAN
Requires: Perl 5.004, Carp, Exporter, GD (optional)
http://search.cpan.org/~wrw/Barcode-Code128-2.21/lib/Barcode/Code128.pm…

Example:
use Barcode::Code128 'FNC1';
$code = new Barcode::Code128;
$code->text(FNC1.'00000123455555555558');

This is CODE128 which may not be what you want if you are trying to print barcodes for retail purposes. In the US you would want to use UPC-E (for those reading from Europe, this is similar to EAN there). Different barcode scanners encode information differently so using the wrong type will result in problems.

Recommend readinging before you start:
http://www.scandit.com/2011/10/13/types-barcode-upc-ean-code128-vs-qr-d…

Also note: Most barcode decoders (on-scanner or otherwise) have to be programmed to know what sort of barcode they are expecting so you don't want to mix these in an environment.

Pdftricks and pstricks can be used to generate barcode images in LaTeX templates.
http://mirror.hmc.edu/ctan/graphics/pstricks/contrib/pst-barcode/pst-ba…
http://ctan.cermin.lipi.go.id/graphics/pstricks/contrib/pst-pdf/pst-pdf…
http://www.ctan.org/pkg/pdftricks

Q: Brian Wolf
A: Chris Travers
Source: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6822

The simple one:
Sales order: Customer wants to buy something.
Sales invoice: Customer owes for goods and services delivered.

Business-flow-wise, typically you take an order before everything is done necessary for the transaction to hit the books, and convert it to an invoice when everything that has been done for the income to be realized has happened. This typically means:

1) Goods or services are delivered
2) Any approval/error checking the business requires has happened

One big thing in 1.4 is that approval for invoices is possible so instead of two steps you can actually have three (goods ordered, invoice pending approval, and approved/posted to the books).

An other expl:
A sales invoice hits the books, and represents a financial transaction.

A sales order does not show up in the books. It's upstream of any financial transaction, and so anything on it will not be reflected in any financial report or have any transactions on any of the account charts.

So orders are more for managing your workflow. Invoices are for accounting. Your accountants probably do not care about your orders -- all they care about are invoices.

An other example:
A sales order is what I write down when you want to buy something from me. You ask me to ship you 10,000 staples next week. When I actually *do* ship you the 10,000 stables, I generate an invoice to go with it. Before I ship, I have no receivable asset, but I have 10,000 stables. After I ship, I have a receivable asset posted, but I don't have the 10,000 staples.

If this happens between 10am and 2pm, not a huge difference. If it happens between noon on Dec. 31 and I ship on Jan 4, the next year, this might matter.

Unless I post the order, my factory floor might not actually produce the 10,000 staples, or they shipping department might ship the last 10,000 staples to someone else.

Q: Brian Wolf ( http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6417 )
A: Chris Ttravers, John Locke and Michael Richardson

To give folks an idea of where the next release is coming, I figure it is worth posting this and updating it from time to time.

Changelog for 1.4 Series
Forthcoming

General Enhancements:
* scripts/* files moved to make inheritance possible (Chris T)
* PostgreSQL contrib dependencies removed, now require Pg 8.4 (Chris T)
* Performance enhancements on menu routines (Chris T and Steven M)
* Removed the Config::Std dependency and moved to Config::General (Chris T)
* Improved error handling using Try::Tiny and die (Chris T)
* Added +/- selection indicators to menu CSS (Chris T)
* Added "dynatable.html" template that can be included in templates (Chris T)
* Dynatable forms obtained through GET now show link back to form (Chris T)
* LedgerSMB->error and Form->error now show db version and company (Chris T)
* Simpler use of Log::Log4perl instead of LedgerSMB::Log (Chris T)
* Changing all auth calls to hit postgres db instead of template1 (Chris T)
* Centralized database commit for new code (Chris T)
* invoice.unit is now unbounded numeric to reduce errors (Chris T, 3516235)
* Invoices with inventory subject to draft/vouchers workflows (Chris T)
* Added Equity (Temp) account type (Chris T)
* Added description field to transaction and invoice screens (Chris T)
* Removed ability to repost/delete transactions (Chris T)
* Partsgroups can now be nested though this is not yet used by LSMB (Chris T)
* Added file attachments to parts (Chris T)
* Added file attachments to customers, vendors, employees, leads etc (Chris T)
* LaTeX format detection now run-time call, not configured (Chris T)
* Bringing back inactivity-based logouts (Chris T)

New RESTful Web Services Framework
* Supports XML and JSON as input formats
* Supports XML and JSON as output formats
* Supports read/write for Contacts:
* Customers
* Vendors
* Employees
* Leads
* More

New Reporting Framework
* Easy bridge between SQL and display (Chris T)
* All reports exportable to CSV (Chris T)
* All reports exportable to PDF (Chris T)
* Unified UI for reports (Chris T)
* Enhanced trial balance allows for partial trial balance (Chris T)
* Enhanced trial balance allows for saved criteria (Chris T)

Customer/Vendor Handling
* Added sales tax id and license number fields for companies (Chris T)
* Simpified database schema (Chris T)
* Full text search of notes for customers/vendors (Chris T)

New CSV Import Module
* Imports GL transactions (Chris T)
* Imports AP batches (Chris T)
* Imports charts of accounts entries (Erik H)
* Imports GIFI tables (Erik H)
* Imports SIC tables (Erik H)
* Imports timecards (Chris T)
* Imports initial inventory and periodic counts (Chris T)
* Extensible
* field maps can be overridden

New Business Reporting Unit System (Chris T)
* Replaces Projects and Departments
* Business reporting units may be nested
* Allows one to do funds accounting, track jobs separately from projects, etc
* Report on any combination of business reporting units (up to one per class)

Security issues should be reported by filling out the form at Report Security Issue

Current security advisories include:
        (Click "Read More" to see the full article)

1.3.20 and below:

 

A security oversight has been discovered in LedgerSMB 1.3 which could allow a malicious user to cause a denial of service against LedgerSMB or otherwise affect the way in which certain forms of data would get entered.  In most cases we do not believe this to be particularly severe in the absence of poor internal process controls.  Users in some jurisdictions however may need to take this more seriously (see full details below).
 
Basic details:
 
Login required:  Yes
Complexity of Attack: Low
Impact:  Can alter software settings in excess of authorization
Most likely impacts:  Malicious employee could cause denial of service for some features and regulatory compliance problems.
Impact Level:  Low for most users, moderate for others. 
 
Who is not affected:  Single user environments
 
Recommended Mitigating Measures:  Proper internal process controls greatly mitigate the impact of this issue.
 
Patch Availability:  A patch is available from the LedgerSMB team but it has not been fully regression tested.  It can be obtained by emailing chris@metatrontech.com and is scheduled for inclusion in 1.3.21.
 
Scope of Patch:  This patch fixes the issue on the middleware level.  It has no impact on third party applications writing to the database directly.  It does not fix the problem on 1.2.x, and existing workarounds are insufficient to address the issue in 1.2.x.  If you are using 1.2.x your best option is to upgrade to 1.3.x.
 
Full Details:
 
LedgerSMB stores many system settings in the database and many of these must be incremented by ordinary users, so permissions are widely granted to these setting tables.  A malicious user could craft a carefully formed URL and cause LedgerSMB to overwrite existing settings.   A few settings, however, are security-critical.   Because some invoice numbers, etc. are guaranteed to be unique, this could interfere with posting of transactions in an automated environment, and it could be used to ensure that password resets would lock users out of the system.  There were insufficient permissions checks on the routines which update system settings and so consequently, could overwrite existing values.  These settings range in function from email addresses where invoices are sent from, to the next invoice number, to password duration.  A malicious individual can thus change security-related aspects of configuration, and change the value for the next invoice to be generated.  This cannot be used to grant additional permissions to the user however.
 
Additionally in some locations invoices are required to be numbered in a gapless way.  Some countries require this in order to help cut down on tax evasion.  Because next invoice number settings can be overwritten, this problem can run users into regulatory compliance problems.  Users in areas which require gapless numbering of financial documents need to treat this problem as more severe.
 
Discovery:
 
Chris Travers found the problem during work on forthcoming versions.
 
Best Wishes,
Chris Travers

Update 2012:
Installing LedgerSMB 1.3.21 on Mac OS X 10.6.8 (Snow Leopard) 2012-08-06
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6347
LedgerSMB 1.3.14
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/5934

Please help us to make this a better guide. Post your comments on the mailinglist.

Here's how to get LedgerSMB up and running on OSX Leopard / MacOS X (vs 10.6.8).

Software
* PostgreSQL (version 9.1.3-1)
* Perl
* LedgerSMB 1.3.X

PostgreSQL
EnterpriseDB provides a nice OSX installer here http://www.enterprisedb.com/products-services-training/pgdownload#osx. You will need to restart your computer as part of the installation. After restarting run the installer again. Install with the default values. Set and remember a password for the postgres user when prompted. Don't launch the Stack Builder at exit.

"the postgresql is installed in the Library folder and not the usr/share/...
etc folder (unless you modify the path during installation). " (apallik)

"This changes things quite significantly (especially when modifying the ledgersmb.conf file)." (apallik)

Perl
Perl comes installed on OSX. (2011: Version 5.10.0 )

LedgerSMB
Download from our Sourceforge project page and extract to /usr/local/. Your LedgerSMB directory should be /usr/local/ledgersmb.

Installation

Go to the location of ledgersmb (cd /usr/local/ledgersmb)
Copy the apache config to the correct folder and restart apache.
$ sudo cp ledgersmb-httpd.conf /etc/apache2/other
$ sudo /usr/sbin/apachectl restart

Copy and modify the default ledgersmb.conf file. Change the default_db value to ledgersmb.
Set PATH variables in your ledgersmb.conf
$ cp ledgersmb.conf.default ledgersmb.conf

and run the makefile. Select yes to installing the required modules. Select no for the optional ones.
$ cd /usr/local/ledgersmb
$ perl Makefile.PL

Run make install. This installs the required perl modules.
$ sudo make install

Ledger 1.3.x : The setup and login screen: http://localhost/ledgersmb/setup.pl
http://www.ledgersmb.org/help/install/Ubuntu_Installation_Tutorial_Ledge...

=====
Alternative install metod to http://localhost/ledgersmb/setup.pl

Homebrew
Homebrew allows you to easily build other needed software. Get it here http://mxcl.github.io/homebrew/.
gnu-sed
The install scripts for LedgerSMB aren't compatible with the default version of sed shipped with OSX. We need to install gnu-sed.
$ brew install gnu-sed
$ sudo mv /usr/bin/sed /usr/bin/sed-bsd
$ sudo ln -s /usr/local/Cellar/gnu-sed/4.*/bin/gsed /usr/bin/sed
The above commands installs gnu-sed and makes it useable.

gnu-getopt
We need gnu-getopt for the same reason as gnu-sed.
$ brew install gnu-getopt
$ sudo mv /usr/bin/getopt /usr/bin/getopt-bsd
$ sudo ln -s /usr/local/Cellar/gnu-getopt/1.*/bin/getopt /usr/bin/getopt

As an alternative to installing Homebrew and installing gnu-sed and gnu-getopt I made binaries of these programs available as gnu.zip. Just unzip to /usr/bin. Make backups of the original getopt and sed if you care about them.

Modify the tools/prepare-company-database.sh file. Replace line 190 with the following.
cat <&1 | unchatter

Run prepare-company-database.sh. The option --coa sets the charter of accounts. I selected an Australian coa. You will be prompted for your postgres password.
$ sudo tools/prepare-company-database.sh --company yourcompanyname --pgsql-contrib /Library/PostgreSQL/9.0/share/postgresql/contrib --coa sql/coa/au/chart/General-00000.sql
Now go to http://localhost/ledgersmb/. Log in with username admin, password admin, and company yourcompanyname.

App X could be Microsoft Money, QuickBooks, Sage, KMyMoney, Gnucash, Grisbi and others
Source: mail list: ledger.smb.user (Chris Travers and others)

With unknown programs you need to to find out:
1) How much data can you get out?
2) What database system does it use on the back-end?
3) If you cant export data, are there other means (i.e. custom ODBC
drivers, cvs export) that can access the info?

If you can get that information, you are about 50% of the way there.

A few pointers about such migrations :
1) Import into holding tables that match the existing schema of your
old application first. This gives you a backup in case you need to
re-import the data in order to get it right.

The doc is work in progress..., (all the help we get makes it better..)
but you my start with this:
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/REA...
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/sql...
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/sql...

Database autodocs:
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/doc...

This tread has some info (Jan. 2012)
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.devel/3359

3) If you get stuck in specific areas, ask on the mailing list or irc, we may be able to be of more help

A lot of people are wondering how to manage their migration to LedgerSMB from SQL-Ledger. While there is no one simple answer that will suit everyone's situation, there is some general advice.

First thing to know is - you are among friends. LedgerSMB is built on a community of people who want to see the software and it's users succeed. Information is freely shared, and as long as you are prepared to have a go at helping yourself, we are happy to jump right in and help you do that!

We now have a mailing list, whether you are actively working on migrating to LedgerSMB or even if you are staying with SQL-Ledger for now and want some friendly community support, join up the User List to get SQL-Ledger to LedgerSMB migration help

The best course of action depends on your situation:

I am running SQL-Ledger 2.8.0+

Short answer: roll-back to a backup or test the new experimental support for migrating to LedgerSMB 1.3.x

Update 2012-03-22: LedgerSMB 1.3.x: Experimental support for migrating from SQL-Ledger via Setup.pl
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/sql...

Update 2011: LedgerSMB 1.3.x: Take a look at this documents in cvs for the latest info:
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/REA...
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/sql...

Currently we have an automated migration path under development for installations of SQL-Ledger-2.8.0. We can however give (free) case-by-case assistance if you are stuck at 2.8.0 and want to move to LedgerSMB - it may be fairly straightforward for your case, we just can't guarantee it across the board yet.

If you can revert to an SL version prior to 2.8.0 without data loss (ie, you upgraded but haven't entered any new data and can restore your old version) then you can migrate most easily by reverting to your previous SL install, then following the advice below for users not yet on 2.8.0

If you have upgraded to SQL-Ledger 2.8.0 and have new transactions in it that are not in your old backup (or you don't have a prior backup) then your best bet is to wait until LedgerSMB 1.3.0 is released, or contact us on the lists or IRC channel for specific advice on the best way to migrate. We plan to have a direct migration path for 2.8.0 users once 1.3.0 is out.

I am running an older SQL-Ledger (pre-2.8.0)

Short answer: Jump in, the water's great

Excellent, this is right now the easiest migration path. Current recommendation is that you migrate to LedgerSMB 1.1.12 which includes some important security fixes and data integrity controls not found in any SQL-Ledger version, but if you want to jump straight up to 1.2 you have options there as well.

I want the easiest, quickest way to LedgerSMB

Short answer: Upgrade to LedgerSMB 1.1.12

The best way is to upgrade to the latest 1.1.x release (1.1.12 as of this writing). These releases contain fixes for some serious security flaws not fixed in any SQL-Ledger version and several improvements for data integrity. It is also a clean GPL'd release without any licensing concerns for translations, contributions etc.

From Chris Travers' list email April 14 2007:

The upgrade to 1.1.x should be as simple as any SQL-Ledger upgrade. However, we do tighten some of the integrity controls and occasionally people run into problems cases where the data in the db is in an inconsistant state. If you do, write for help or contact us on #irc and we can help you sort through it.

Note that currently the upgrade from 1.1.x to the 1.2.x series involves some changes to user authentication and template variables which might require some manual intervention for some installs. This migration path might be smoothed out a bit as time goes by, so if you are feeling cautious, stay with 1.1.x until you are comfortable with moving to 1.2.x or directly 1.3.x.

However, if you want to get the pain out of the way, or just want to be running the latest and greatest...

I want the latest, shiniest LedgerSMB

Short answer: Great! Go straight for LedgerSMB 1.2.x

From Chris Travers' list email April 14 2007:

The upgrade from 1.1.x to 1.2.x is a little rough. We have made a number of changes, which although they are again good security design, break a lot of backwards compatability. These include:
1) User information is stored in the database (we have a script to migrate users)
2) No server writeable and executable perl scripts ;-)

Remember, you might have some small issues with migrating from anything up to 1.2.x currently. That's OK though - there is plenty of expedient help available and most of the hiccups are easily fixed up. Try the users mailing list, or for rapid-response support try the IRC channel - there are usually a few members from the core team online to help you out of any migration issue you might have.

 

But I'm glad to be able to deny your conclusion above: the system will search on any partial match, both on the customer number or on the customer name. So, there's no need to spell them quite exactly.

Also, if you want the drop downs back, there's a setting in the System -> Defaults screen (third item below the currency settings input box; "Max per dropdown"). If you enter 99999 into that (assuming you don't have that many customers), you'll be presented the selection list you're used to.

source: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/5828

Deploying LedgerSMB with nginx and Plack on FreeBSD by Mikkel Høgh
http://mikkel.hoegh.org/blog/2012/04/05/deploying-ledgersmb-with-nginx-a...

FreeBSD Installation by Yuriy Kulyev
My comments on installation from tarball ledgersmb-1.3.13.tar.gz on FreeBSD 8.2 versions of prerequisites are
apache-2.2.22_5
perl-5.12.3
postgresql-client-9.1.3
postgresql-contrib-9.1.3 (installation required upgrade of m4 to m4-1.4.16,1)
postgresql-server-9.1.3

Installation manual which from tarball is quite clear but the one who decided to do it for FreeBSD should pay special attention to section "LedgerSMB depends on these required modules". Of course it is possible to install modules from cpan but this way make further upgraded via portupgrade more difficult. Most perl-modules presented in ports tree as p5-Module-Submodule and they spread in different directories and names of some of them do not match exactly as listed in "INSTALLATION" e.g. Template -> p5-Template-Toolkit, Math::BigFloat -> p5-Math-BigInt, Locale::Country -> p5-Locale-Codes.

Script prepare-company-database.sh doesn't work because of different format of utility getopt in FreeBSD I have installed from web browser http://localhost/ledgersmb/setup.pl but before you need to:
1) cp ledgersmb-httpd.conf.template /usr/local/etc/apache22/ledgersmb-httpd.conf
and change in it all WORKING_DIR entries to real path to ledgersmb/
2) add to /usr/local/etc/apache22/httpd.conf
# LedgerSMB
Include etc/apache22/ledgersmb-httpd.conf
3) cp ledgersmb.conf.default ledgersmb.conf
and edit section [database]
contrib_dir = /usr/local/share/postgresql/extension/
4) temporary for setup from remote desktop make in ledgersmb-httpd.conf some changes
Order Allow,Deny
Allow from All
# Allow from 127.0.0.1
# Allow from localhost
# Deny from All

And that was enough for me to get it installed and working. However I have not check yet all functions.

Thank you very much for developers and contributors of this package. I will keep on exploring it.

Regards,
Yuriy

By Erik Huelsmann

In summary: adding to or changing LedgerSMB can be extremely easy

For one of my businesses, I needed to create an application to store some data on the services and products we provide. Basically, there would be one central table with some references to a few other tables, mostly to provide (short) selection lists. Also, there's one bigger complexity, because we wanted to link to our customer data.

The customer data is all stored in LSMB, so, developing this database inside LSMB's database seemed like a logical choice.

Since my colleague and I were completely unfamiliar with the web development framework for LSMB, we first had a start with the tools we did know. (Internally developed stuff, nothing particularly fancy.) However, due to other priorities, things didn't quite roll forward as we wanted; it was simply too much work to get it done.

Last week we scrapped our own development. As a replacement I started looking at the tools that LSMB provides to get the same job done. Again, without prior knowledge how this should be done, I simply studied the budgetting module. I figured that if budgetting was an extension, we might consider our own administration as an extension and that it should probably work (roughly) the same way.

And it did: in 1,5 day I had our administration up and running, featuring a data entry screen and a search screen. The current version of the data entry screen searches and links to a customer only if it finds an exact match. [Chris and I are working on functionality every module can use to look up cross table references like these, so it'll be replaced by something better soon.]

The steps I had to take were really simple:

* Develop 2 main stored procedures:
- [mymodule]__search()
- [mymodule]__save()
and 1 stored procedure for each drop down in the data-entry screen:
- [mymodule]__list_[characteristic1]()
- [mymodule]__list_[characteristic2]()
- ... etc...

* Create a class in LedgerSMB/DBObject/[objectname].pm
which contains functions callable from perl and maps those
to calls to the stored procedures in the database as simple as
containing:

sub search {
my ($self) = @_;
my $results = $self->execmethod({funcname=>[mymodule]__search'});
$self->merge($results);

return $results;
}

* Create two Template Toolkit template file for my module:
- ./UI/services/entry.html
- ./UI/services/search_criteria.html

* Create an LedgerSMB 'module' [mymodule].pl, with three entry points:
- edit
- search
- update

* Create a top level handler file by copying ./file.pl to ./[mymodule].pl

* Add menu items

Basically, the out of the 1,5 days I've spent, most time was spent learning what I had to do. The actual time spent coding was negligeable.

In summary: adding to or changing LedgerSMB can be extremely easy. It was a refreshing surprise to me how easy. We'll definitely develop the rest of our application using LedgerSMB's own framework and when it's done, we might be able to donate it to the project.

Anyway, I hope the above inspires others to try it out themselves. If you have any questions, both Chris and me will be glad to help you out!

Source: Developers mailing list: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.devel/3505

Content by Chris Bennett, (source: ledger-smb-devel mail list: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.devel/3231 and http://64.85.161.47:8081/docs/Installing_1.3_on_OpenBSD.html)
Edited by Havard Sorli
This tutorial may not be complete, please help us make it better.
Date: 30-12-2011

These instructions are for base Apache included with OpenBSD, not Apache2.
I have not yet gotten LedgerSMB fully functional in chrooted Apache.

I do not intend to continue experimenting until I find a complete answer, as I now run all mod_perl, so please start Apache with:
# httpd -u

A possible method to get faster responses would be to run mod_perl using PerlRun.But I still see that needing to be outside the chroot due to need for LaTeX.

Prepare Apache for use.
Make suexec setuid:
# chmod 4755 /usr/sbin/suexec

Check the file /etc/fstab
The /var partition is set by default to nosuid (no setuser id):


/dev/wd0a / ffs rw 1 1
/dev/wd0d /tmp ffs rw,nodev,nosuid 1 2
/dev/wd0g /usr ffs rw,nodev 1 2
/dev/wd0f /var ffs rw,nodev,nosuid 1 2
/dev/wd0h /home ffs rw,nodev,nosuid 1 2


This might not allow Apache to function correctly.
If you have any problems, you can change:

/dev/wd0f /var ffs rw,nodev,nosuid 1 2
to:
/dev/wd0f /var ffs rw,nodev 1 2

Edit /etc/rc.conf.local to have the following:
# use -u to disable chroot, see httpd(8)

httpd_flags="-u" # for normal use: "" (or "-DSSL" after reading ssl(8))

You will need to reboot because you cannot umount /var.

Install Needed Packages
Postgresql

Specify a PKG_PATH, for OpenBSD -current, use a similar command:
# export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/snapshots/packages/i386/
Note: http:// package sources tend to make more stable connections.
You may be able to install some of the optional packages on earlier release versions. I have not verified it.
Then add PostgreSQL server and client:
# pkg_add -i postgresql-server
This will add the server and will also add the client package.

To use the PostgreSQL server you have to create a database first.
You find detailed instructions on how to install a database in the file
/usr/local/share/doc/pkg-readmes/postgresql-server-9.1.1p0 (numbers will agree with your version)
Please read this file completely, as it contains useful information.
Which contains, as needed for LedgerSMB installation (as of -current):

Using PostgreSQL in an OpenBSD environment

At least two different accounts are involved when working with PostgreSQL:
One is an OpenBSD userid, '_postgresql', which is used as the userid of files
that are part of PostgreSQL. The other, usually named 'postgres', is not an
OpenBSD userid, i.e. you will not find it in /etc/passwd, but an account
internal to the database system. The 'postgres' account is called the dba
account (database administrator) and is created when a new database is
initialized using the initdb command.

If you are installing PostgreSQL for the first time, you have to create
a default database first. In the following example we install a database
in /var/postgresql/data with a dba account 'postgres' and md5 authentication.
We will be prompted for a password to protect the dba account:

# su - _postgresql
$ mkdir /var/postgresql/data
$ initdb -D /var/postgresql/data -U postgres -A md5 -W

Please note that by default the cluster's encoding will be SQL_ASCII. If you want to have an another default encoding, use the option -E with initdb. If your cluster is already created, you can specify an another encoding when you create a new database with this command:
=> CREATE DATABASE xxx TEMPLATE template0 ENCODING 'xxx' ;

Follow the steps for creating a superuser - postgres - above.

You will need to enter a superuser password for postgres. This is NOT the same as the passwords you will use later on!
You should also read the man page for rc.d. This is how postgres is now started and stopped.
If you want PostgreSQL to start and stop on boot and shutdown, add the following to /etc/rc.conf.local:
pkg_scripts="postgresql"

Now follow the instructions to start PostgreSQL server:
$ pg_ctl -D /var/postgresql/data -l logfile start

This step needs to be done while still operating as _postgresql user. Then you should exit as that user.
$ exit
You could also reboot if you wish to check that everything is working correctly in /etc/rc.conf.local.

Add additional needed packages:
# pkg_add -i p5-Module-Install

# pkg_add -i p5-DBI
# pkg_add -i p5-DBD-Pg
# pkg_add -i p5-MIME-Lite

# pkg_add -i p5-Class-Std
# pkg_add -i p5-HTML-Tagset
# pkg_add -i p5-Data-Dump

# pkg_add -i p5-Test-Tester
# pkg_add -i p5-HTML-Parser
# pkg_add -i p5-Test-Trap

# pkg_add -i p5-Math-BigInt-GMP
# pkg_add -i p5-Locale-Maketext-Lexicon Must be 0.62 or greater

# pkg_add -i texlive_base
# pkg_add -i p5-Config-Std Use CPAN if unavailable, this is required
# pkg_add -i p5-CGI-Simple

# pkg_add -i p5-File-MimeInfo
# pkg_add -i p5-DateTime
# pkg_add -i p5-Log-Log4perl

# pkg_add -i gsed For some command line scripts
# pkg_add -i p5-Template-Plugin-Latex This one is essential for PDF and Postscript output

# pkg_add -i p5-Parse-RecDescent (optional for CLI host scripts)

Note: OpenBSD -current may soon offer the following ports and/or packages:
I have included unofficial copies of these as ports at: Ports for OpenBSD that meet requirements for LedgerSMB

# pkg_add -i p5-LaTeX-Driver
# pkg_add -i p5-LaTeX-Encode
# pkg_add -i p5-LaTeX-Table

# pkg_add -i p5-MooseX-FollowPBP
# pkg_add -i p5-MooseX-Param
# pkg_add -i p5-Excel-Template

# pkg_add -i p5-Excel-Template-Plus
# pkg_add -i p5-Net_TCLink
# pkg_add -i p5-XML-Twig

DO NOT use CPAN to install a later version of Locale::Maketext::Lexicon than 0.79, as it is not compatible with Locale::Maketext used in base perl!
You will have to search for this version on CPAN, it is not available on the release page!

Next run the following:
# perl Makefile.PL
# make
# make test
# make install
# make clean

Then run this, choosing a company name and where the postgresql contrib directory is at (check this first!):
./tools/prepare-company-database.sh --company testinc --pgsql-contrib /usr/local/share/postgresql/contrib
For a list of other options you may wish to change, use:
./tools/prepare-company-database.sh --help

I like to use command line stuff more than GUI stuff.
I did not find at this time that using setup.pl through the web interface would work.
prepare-company-database.sh asked me many times for ledgersmb password. Ugh.
I decided it was easier to install from command line after I set up a .pgpass

file with both postgres and new ledgersmb.
This will eliminate needing to enter passwords multiple times.
This file can be kept, edited or discarded after installation.
This file must have mode 0600.

localhost:*:*:postgres:POSTGRESPASS
localhost:*:*:ledgersmb:LEDGERSMBINITIAL

Problems I had, that may already be patched

I had 3 problems with prepare-company-database.sh
______________________________________________________________________________________________________________________________

-if ! options=$( getopt -u -l company:,coa:,gifi:,srcdir:,dstdir:,password:,host:,port:,help,progress,pgsql-contrib: '' "$@" )
+if ! options=$( getopt company:,coa:,gifi:,srcdir:,dstdir:,password:,host:,port:,help,progress,pgsql-contrib: '' "$@" )

For OpenBSD, bash has to be added. sh/ksh is standard.
This fails in sh and bash for me.
If we drop the -u -l, will that work OK for others?

______________________________________________________________________________________________________________________________

-cat <<EOF | su -c "psql -U postgres -d postgres " postgres 2>&1 | unchatter
+cat <<EOF | psql -U postgres -d postgres 2>&1 | unchatter

I even tried changing this to OpenBSD's user _postgresql and reordering it, but I couldn't get this to work with su -c
It works fine for me like second one.
Is there any need for su -c for others to use psql?

______________________________________________________________________________________________________________________________

ERROR: language \"plpgsql\" already exists|\
[[:space:]0-9-]*$|\
\([0-9[:space:]]+rows?\)\
-)/d" -
+)/d"
}

In sub unclutter, dropping the dash at the end lets it work with OpenBSD's sed which is different than GNU sed.
Why is there a dash there?
With the dash, it would be necessary to use gsed instead of sed.

Copy ledgersmb-httpd.conf to the directory where you keep Apache conf files. Probably at /var/www/conf/modules.
Stop and restart Apache:
# apachectl stop
# httpd -u
or
# httpd -u -DSSL

Last Updated December 27, 2011

Username and password have to be sent via auth fields.
company= is an accepted argument.

This works:
http://localhost/ledgersmb/login.pl?company=database_name

Start with a blank browser or browser tab.
write/paste url (This can be bookmarked in your browser)
http://localhost/ledgersmb/login.pl?company=database_name

Get the login page
The Company field are filled inn from the company=database_name argument in the url.

Fill inn
Name: myusername
Password: mypassword

Hit "Login"

Compiled from this e-mail treads:
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/5356
Question from: Håvard Sørli
Answer and software fix from Chris Travers

Yes, its Open source. The tools we use (Perl, PostsgreSQL, Apache ++) is also Open source.
Open source means that the source code of the software is available for free to everyone and you can modify the code and distribute it yourself. https://en.wikipedia.org/wiki/Open_source

Look for a place to contribute. This means not only programming, but also documentation, theme design, art work, or architectural design. Join the mailing list.

GNU GENERAL PUBLIC LICENSE Version 2
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/trunk/LICENSE

We can't gotten to to the user proposals for 2.0 yet but here are the general code management, API's and the like:

1) SODA 2.0

SODA provides discoverable database query functionality (sort of like web service principles applied to stored procedures). It is not a replacement for direct table access, but rather a way of storing named queries in the database for easy use. It also allows other programs to make use of these queries without reinventing the business logic.

The major proposed differences between 1.x and 2.0 currently are limited to argument semantics and coding policies. In 1.3, all arguments are arranged in a flat form with some nested arrays possible. In 2.0, object-bound data will be passed in as a single data structure, allowing for other arguments to be specified as developer-provided. These data structures will be defined in the database as well.

Additionally we are re-iterating that functions should only be labelled as "security definer" when necessary and that table permissions should be used as much as possible.

2) Modularity

LedgerSMB 1.2 is quite large and complex. 1.3 is substantially moreso. In order to prevent this from getting out of hand, we are proposing to modularize the program into different portions. The areas which are most stable and basic will be a part of the core package (Stripped down contact management, AR/AP/GL transactions, separation of duties, configuration management, and the like). Other areas will be available as addons. Some bundles will be distributed including some sets of addons specific to a market segment.

3) Perl code:

We are going to refactor much of the application and create something that can be ported to various web frameworks or run on it's own very easily. One major change is that namespaces will have defined structures.

Feel free to comment on this, leave us feedback, etc. As always, spam will be deleted and spammers banned.

1: Base Architecture Goals

The new architecture is designed to solve the following problems with the current codebase:

A) Maintenance difficulty. The current codebase is quite unstructured and difficult to maintain. 1.2.x has already been a bit of a mess due to the issues of fixing something one place and having it break something else.

B) Interoperability difficulty. In 1.2.x interoperating with the codebase requires very brittle and opaque interfaces. We need to change this to allow for add-ons in different languages using a number of stable methods.

C) Ease of customization. Many vertical solutions require customizations to work effectively. The current software is not easy to customize. 1.3.x makes some progress in this area but more work is needed.

2: Current Approach

We are refactoring the code along the lines of an MVC architecture. This architecture, however, is slightly different than other MVC implementations and hence we have decided not to use any framework and simply refactor code as appropriate.

A) Model: Unlike most MVC implementations, the model will be defined as much as possible in the database and methods will be implemented in stored procedures. A lightweight Perl wrapper will exist to allow us to dynamically discover these methods. Essentially, the ORM will be defined in the db.

Currently we require an explicit mapping between object methods and database stored procedures. We may replace this with something like Module::Compile down the road.

The in-db ORM will allow the entire data model of the application to be accessible to other components possibly written in other languages. Other implementations of the entire web software could easily be written in arbitrary languages (Java and Python have both been discussed), as well as add-on components.

B) View: The current approach to the is to support a non-default subset of Template Toolkit which is in line with XML, SGML, and HTML standards. This should allow for easier access to the templates in other languages due to our use of PI tags. More mature areas may be moved over to XSLT-based templates based on XML representation.

The second point of interoperability will also be through a view component: those of RESTful web services. Many or all objects in the system will have XML representations and these can be accessed using standard HTTP operations (GET, PUT, POST, etc).

C) Controller: The controller components will be light-weight workflow scripts automating the interaction of the user with the view and model components.

3: Stored Procedure Conventions

Stored procedures will be named according to the following convention of class_method (all lower case).

Stored procedures may use named arguments corresponding to object properties. Because PostgreSQL does not allow for arguments to have the same names as columns used, all named IN variables will be prefaced with in_. The model wrapper will discover these names, strip the prefix, and match with appropriate properties.

4: Why not use a framework like Catalyst?

Most MVC frameworks assume that the MVC components are broken down along specific lines which are not condusive to our goals. In particular the ORM layers do not work well with our approach.

In general, the consensus has been that these frameworks are the wrong tool for the job, that they add needless complexity, and that using them would create pressure to abandon our architecutral goals in favor of a single-language solution. In short, we have yet to be convinced that the added complexity would be worth it.

Since we never put forth a story describing what features and major changes have made it into 1.3 when feature freeze was declared I figured it would be a good idea to describe these here.

The first thing to keep in mind is that 1.3 is (hopefully) the last major release of LedgerSMB which re-engineers basic security concepts for a while. This means that, while user migration may not be perfectly smooth, the tradeoffs will mean a much more secure system. In 1.2 and prior versions, there was no robust enforcement of permissions. Permissions largely were means of addressing user interface changes rather than denying an individual access to a part of a the program. In 1.3 that changes, finally.

Users in 1.3 are full database users, meaning that one user could access more than one company database and have different permissions on each. The permissions are enforced on the database level, enabling access from other tools without circumventing security enforcement.

Closely related to the enhanced security, we have put in place a system of separation of duties, both for batches and single transactions. This means one person can enter a transaction and it can then be reviewed for accuracy by a second individual. That second individual can delete or post the transaction to the books. This is an important feature because it allows standard accounting controls against theft and human error to be implemented on the software without breaking standard transaction reversal rules. It also allows transactions to be saved while they are works in progress and edited prior to being posted to the books which is something smaller businesses often find helpful as well.

On top of this, there are a number of areas where the changes in the software address workflow issues as well. The first of these that most individuals will see is the fact that customer/vendor management has been completely changed. A single company can be both a customer and vendor, and can have multiple customer/vendor accounts attached for easy tracking. Multiple shipping addresses can be attached to each account as well, and much greater flexibility exists for tracking contact information, bank account information, and the like. Additionally, tax form data can be tracked, such as whether a given account should be subject to 1099-MISC or 1099-INT reporting in the US, or subject to similar reporting abroad. These tax forms can be defined as needed.

A second point that has received a great deal of attention is the payment workflow. As in previous versions, there are two workflow options here: a single payment workflow which is generally helpful in paying a single vendor at a time, and a bulk payment workflow for creating batches of many (perhaps hundreds) of payments at once. The bulk payment workflow has received a great deal of attention in terms of performance and now scales up to thousands of invoices per run. The single payment workflow has enhanced handling of prepayments, etc.

A third point that has received substantial attention is bank account reconciliation. Past versions of the software had a number of specific issues with bank reconciliation including unpleasant surprises in multi-user environments, and an inability to go back and understand what was reconciled when. The new version was designed to allow easy reconciliation of accounts, whether that account has a few transactions per month against it or whether it has a thousand. Furthermore the reconciliation process is subject to separation of duties (see above) and it can be later audited. An individual with access can review past reconciliation efforts in order to determine who reconciled which transactions, who approved the reconciliation, and when it happened. In the reconciliation screen, transactions are grouped by whether or not they are marked as cleared, and can be sorted within each of these groups based on a number of criteria. Additionally there is a plug-in model for building bank import scripts. This allows, with minimal programming, the ability to import files directly from the bank. These are then matched against the transactions in the system, and questionable matches flagged for human review. This allows businesses to minimize the labor involved in reconciling their books.

We trust that these new features and substantial enhancements will make the program far more useful to a wide variety of users. As of this writing, LedgerSMB 1.3.0 is currently undergoing beta testing and could use more testers. Please see our Sourceforge page for more information.

Versions affected: LedgerSMB 1.2.x

The decision was made because there is no way to hide this information from the web server, since it needs to log into the database. It is better not to have a false sense of security. SQL-Ledger obfuscates this information but does not truly encrypt it.

Anyway, this problem is going away because 1.3 changes the way db passwords are handled.

[originally submitted by fling]

I am currently building an online travel suite for a client of mine who is interested to integrate with a full accounts package.
Is this software similiar to Sage ? Q from: Justin Fenech

Chris Travers: Yes, it is similar to Sage. We don't support payroll yet, but working on it.

Contributing to the LedgerSMB project with documentation and articles is easy. This short document will get you going in no time...

Getting started

  • Make sure you have created an account and logged in
  • Click on "Add content" on the menu at the left.
  • Choose a suitable content type - essentially FAQ entries for, well... FAQ's, or choose "Article" for most other purposes.
  • Start typing!

Submitting

Community submissions are moderated on LedgerSMB.org, so once you have submitted your article or FAQ entry it will go into the moderation queue. You will see your article appear on the right-hand side of the site under the "Pending Content" heading. From here, your content may be published directly (at which point it will no longer show on the right sidebar, but will become part of the site) or a moderator may post some feedback on the content with suggestions or questions.

You might like to send a quick note to the mailing lists or on IRC to let the Moderators know that your new content is ready to be reviewed.

You can add new comments to your pending content, allowing discussion to flow during the editing / moderating process.

Publishing

Once your content has been "published", it will no longer appear in the sidebar and will be available to all users within the site. You will be able to make changes to your content if necessary.

Those who have contributed a few quality items are likely to be promoted to the "Moderator" role, which allows direct publishing and moderating of other users' contributions.

Recently, I did a talk at the Greater Toronto Area LUG (GTALUG) on LedgerSMB (experiencing MySQL problems at time of posting, tsk-tsk, should have used PostgreSQL ;-). Since I'm not an accountant, the talk focused mostly on the history, architecture and future of the project. Some of the folks at the talk asked if I could provide them with the slides that I used. Nothing fancy, just typical point-form talk stuff. I've uploaded it to the LedgerSMB site for anyone who is interested.

Commercial support for LedgerSMB is also available. This can be installation support, training, custom features or hosting. Currently there are several commercial support providers (and more soon):

  • Metatron Technology Consulting
    (Chris Travers of Metatron Technology is a core LedgerSMB committee member and deeply involved in all aspects of the project)
  • Anix
    (Håvard Sørli of Anix, support LedgerSMB in Norway. Håvard helps maintain our web site, has contributed to the software, and is a member of the LedgerSMB core committee.)
  • StartIt
    (Pongrácz István of StartIt, support and hosting of LedgerSMB in Hungary. He is a contributor to the project and a member of the LedgerSMB Core Committee.)

  • Efficito
    (Efficito offers hosting, support, and customization for LedgerSMB.  Co-founders Chris Travers and Erik Huelsmann are both core contributors and committee members.)

  • Command Prompt, Inc
    (Command Prompt employs two individuals with commit access, and provides top-tier support for LedgerSMB.  They were deeply involved in virtually all of the improvements for LedgerSMB 1.3, and many of the improvements pending for 1.4 builds upon their contributions.  Josua Drake is a former member of the LedgerSMB core committee and has personally been deeply involved in the formation of our approach to database design.)

  • MrKask.com
    (Maanus Kask as Mr Kask offers hosting, support, and customization for LedgerSMB in Estonia)

The LedgerSMB manual is free, available in the form of a PDF. The most recent version is available from our subversion repository here.

(updated link 17th Aug 2007 - Link tested Nov 2011)

LedgerSMB is a fork of a popular general ledger software package called SQL-Ledger largely written and maintained by Dieter Simader.

SMB is an acronym for Small Medium Business.

Some of the improvements that we've made to the code base so far include:

  • Enhanced security
  • More reports
  • An Open Development Model
  • Code quality improvements
  • Quality assurance measures (automated testing)
  • Better data integrity controls

FAQ Category: Installation

The table below lists the compatibility of LedgerSMB versions with Perl versions. Products for which support has ceased due to End-of-Life date being reached are not listed and should not be used.

PostgreSQL compatibility
PostgreSQL1.4.x1.5 planned1.6 planned
5.10yesyesno
5.12yesyesno
5.14yesyesyes
5.16yesyesyes
5.18yesyesyes
5.20yesyesyes
5.22yesyesyes
5.24yesyesyes

Versions 1.0, 1.1, 1.2 and 1.3 are not in this table due to the fact that they're past End of Life.

## At the terminal, and from your LedgerSMB directory:
### Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

### While Starman is running

#### Reload Starman

pkill -HUP -f "starman master"

#### Restart Starman {#RestartStarman}

pkill -TERM -f "starman master"

#### Release the port if Starman is terminated
NOTE: try [Restart Starman](#RestartStarman) before doing this.

pkill -KILL -f "starman master"

First of all, you need to backup all your company databases followed by an upgrade of your PostgreSQL installation. There are plenty of places on the web to explain how to do that. The high-level process is to install the two versions in parallel and run the pg_upgradecluster command.

When the technical upgrade has succeeded, however, you're not ready to see the performance improvements promised by the 8.4+ versions of PostgreSQL with respect to the menu-generation. This is because the database doesn't automatically use the new 8.4+ code definitions.

To take advantage of the performance improvements of 8.4+, you'll need to re-run setup.pl on all your company databases. With each of the databases, you can clean up after having run setup.pl: the tablefunc contrib is no longer required, meaning you can

psql -U ledgersmb -d -f /uninstall_tablefunc.sql

On my own database I needed to run the above command three times to make it stop reporting "ERROR: Can't DROP because other objects depend on it." (On each round the number of other errors increased: on each round the number of objects successfully being dropped increased.)

That should do it. You should have a clean 8.4+ PostgreSQL database with LedgerSMB.

Yes; there's at least one known (relatively current) story at https://wiki.koumbit.net/LedgerSmbUpgrade#A1.2.25_to_1.3.18 (written by 'anarcat' on irc)

In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.

The default configuration limits access to the /ledgersmb/login.pl page to connections from localhost (127.0.0.1) only for maximum security.

If you want to allow connections from other locations, it's highly advisable to use encrypted (VPN) connections to access your ledger in order to maintain good security.

Q: This particular merchant runs Windows. I don't think they have a pole display, though I can check. Ideally, it would be great to accommodate, with or without pole display. If it runs better on Linux, going forward I would propose Linux workstations for new merchants.

Ok. Let's first explain what the problems we have to solve are, then discuss the solutions that are bundled.

In general web browsers are engineered so that malicious sites can't access your computer's hardware. In general we don't want to change the browser (for example with an add-on) to make it do this because there might be a capacity for abuse elsewhere. So things like receipt printers, pole displays, cash drawers, and barcode scanners cannot be directly be accessed by the browser. This makes a web-based point of sale rather challenging, but we have solutions to these problems. The solutions though are only tested on Linux. On Windows they will require slight modification and I would recommend some extra testing. Backup/fallback methods are discussed below as well.

What we do instead preferably is to turn the point of sale terminal into a server for the point of sale hardware. Scripts to do this (written in Bash) are in the utils/pos directory of the LedgerSMB installation. the client-side script is pos-hardware-client-startup-script which basically fires up netcat and listens for data to redirect to a hardware port. You probably want to use firewall software to limit this traffic to approved servers. The ports are configurable on both ends. On the LedgerSMB side, see the pos.conf.pl.

The other is directnet.pl which is used to send printable documents over this (and to the POS printer on the other side). This is designed to be a low-latency alternative to using CUPS and the like. It redirects pole display logic usually to a serial port, and the printer logic to a parallel port.

This means you can use any printer that accepts ESC/POS and it will send signals to open the cash drawer (programmable in the pos.conf.pl) if the cash drawer is the kind that plugs into the printer. You can also use a pole display although currently we only have drivers for the LC3000 by Logic Controls. The drivers are really easy to write though. Feel free to ask for help or contribute one.

Barcode scanners and magnetic stripe readers need to come into the computer as keyboard input. Typically this means a keyboard wedge interface for magstripe readers, and either a keyboard interface for a barcode scanner, or a barcode scanner attached to a POS keyboard with a built-in barcode decoder. I have had better luck with the latter in terms of long-term maintenance, but they both work.

On to the pos.conf.pl. The default values here are in the pos.conf.pl.template, so please cp pos.conf.pl.template pos.conf.pl

For the miost part this defines a single variable for storing the information called $pos_config. Keys for this and their significance are:

rem_host: Remote host to send pole display/printer info to. By default this is the remote host. However if you are running X11 applications remotely you may have to change this.

pd_host; Host for the pole display. Defaults to rem_host
pd_port: Port for the pole display. Defaults to 6601
pd_proto: Protocol for pd. Either 'tcp' or 'udp' defaulting to udp.

rp_host
rp_port
rp_proto

Same as pd_* above but for printer

rp_cash_open: The code to open the printer. Defaults to those for the Epson U220D iirc, which is binary string of values 27, 112, 0, 25, 250

coa_prefix: prefix for the till amounts. If you have a till '16' and a coa_prefix of 1300, the till account will be 1300.16. This account must exist or you will get errors.

close_cash_accno: Cash account to put closing cash into. Must exist by closing time.

$pos_sources is used to define memo fields for different types of payment. You can customize this as you want.

$pos_source_default is the default for the sources drop down.

curren is the currency
breakdown covers your currency denominations. Used in closing. I dont know if you want to add a 0.5 as 50 cent piece there since those are rare.

till_type is either the 'cashier' meaning the employee id becomes the till number or 'terminal' in which the last octet of the IP address becomes the till number. If you need to customize this handling you can do so underneath the request to stop editing at a certain point.

Advanced options include

source_accno_override used to override cash account handling of various sources (such as gift certs for example)

disable_tables is no longer necessary. But you can use this if you aren't using projects and/or departments. It defaults to disabling everything.

If the directnet approach for printing does not work for you you can comment out the printer definition at the bottom of the pos.conf.pl and set up cups to process and send the file to the workstation to be printed. This adds a few seconds often, however, so where directnet works, it is preferred especially in time-critical point of sale environments.

Q : Brian Wolf
A: Chris Travers
Source: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6290

By Steven Marshall

I found something very interesting. I created a test HTML page containing solely text called testpage.html. I dropped this file in two locations. One in the Apache root directory (/srv/www/htdocs/) and the other in the ledgersmb directory (/user/local/ledgersmb/). I changed ownership of the file to wwwrun:www. I then ran the following tests:

Test 1:
URL: http://192.168.1.10/testpage.html
Results: Page loaded almost instantaneously.

Test 2:
URL: http://192.168.1.10/ledgersmb/testpage.html
Results: Page loaded in about 14 seconds

It seems to be choking on page loads for files that reside in the ledgersmb directory. My ledgersmb-httpd.conf is located in my ledgersmb directory at /usr/local/ledgersmb. I had added my "Include /usr/local/ledgersmb/ledgersmb-httpd.conf" to the bottom of default-server.conf.

I believe I have solved the issue. I am still testing just to make sure, but it appears that my issue was in ledgersmb-httpd.conf. In the section where by default you "Allow from localhost", I had changed to the following adding two additional "Allow from" statements so that I could connect remotely to Ledgersmb:

Order Deny, Allow
Allow from 127.0.0.1
Allow from localhost
Allow from 192.168.1
Deny from All

It appears that it was struggling with the multiple "Allow from" statements. Based on Apache documentation I believe I should have been able to do it this way, but I decided to change it to the following, using just one "Allow from" statement and separating the addresses with spaces, and my performance issue cleared up. This is what my modified version that works looks like:

Order Deny, Allow
Allow from 192.168.1 localhost 127.0.0.1
Deny from All

Source: http://archive.ledgersmb.org/ledger-smb-users/msg05639.html

I manage several companies on LedgerSMB, can I login to any of these companies with one user?
Applies to LedgerSMB 1.3.x -->
V. 0.1 - 22. Nov 2011

I have 100 companies though on my system and decide to change my password, wouldn't I have to change it a 100 times (one for each company)? What would be the best approach to setting up a user that could be used on several companies (databases)?

In LedgerSMB all your users are database users in PostgreSQL. All PostgreSQL users do not have access to login with LedgerSMB on each company database(s). LedgerSMB has to give access to each user as an LedgerSMB application user, even if the user have PostgreSQL superuser rights on the database level.

You can add the Postgresql user to be a LedgerSMB application user when you make an new database or after the database is created. If you import the account into all the other databases, the password management is consistent cross the databases. However, you are not guaranteed the same permissions on all databases. You could have one set on one database and another set on another.

Fast route: User get "Manage Users" or "Full Permissons" access to LedgerSMB
Use setup.pl to create company database number 1 with ledgersmbdbadm user.
Add a normal application user in the proses ("Enter User" screen) example: your_100_db_user_name

Use setup.pl to create company database number 2, 3, 4... with ledgersmbadm user (or a special admin user for each db).
Import the normal application user you made in database 1 ("Enter User" screen in setup.pl)
Username: your_100_db_user_name
Password: Do not set a password. Leave it blank
Import : Yes
Fill inn first name, last name and select Country and assign permissions.

You can also add the user to the db later:
System->Admin Users->Add Users
Username: your_100_db_user_name
Password: Only set a password in the firstdb. Leave it blank in db 2, 3, 4..
Import : Yes
Fill inn first name, last name and select Contry and assign permissions.

If you add the users later you have the opions to add only the permissions the user needs to do a spesific task.

Technical solution:
From LedgeSMB use this user to setup the database you create a databaseuser with Superuser priviliges.
CREATE USER ledgersmbdbadm WITH superuser password 'somepassword';

Create a normal user
CREATE USER your_100_db_user_name WITH password 'somepassword';
(normal user with no drop db rights)

When you create the db:
Use setup.pl to make the company database(es). Use the ledgersmbdbadm user to login to create the company database (first screen) and add a new user on the ("Enter User" screen)
Username: your_100_db_user_name
Password: Do not set a password. Leave it blank
Import : Yes
Fill inn first name, last name and select Contry and assign permissions.

You can add the user to the db later:
System->Admin Users->Add Users
Username: your_100_db_user_name
Password: Do not set a password. Leave it blank
Import : Yes
Fill inn first name, last name and select Contry and assign permissions.

If you add the users later you have the opions to add only the permissions the user needs to do a spesific task.

Direct login to correct company, take a look at this:
/faq/can-ledgersmbloginpl-take-arguments

Compiled from this e-mail treads:
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/5334
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/5356
Question from: Steven Marshall
Answer from Håvard Sørli and Chris Travers

 

Short error:
Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc

Full error message:
[Thu Nov 10 22:53:58 2011] [error] [client 127.0.0.1] Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc at /usr/local/share/perl/5.10.1/LedgerSMB/Form.pm line 61, referer: http://localhost/ledgersmb/menu.pl?login=username&menu=1&id=103&open=:

What should you do with this? Nothing or install math libs

From irc:
ehu: you can run without it, just slower.
ehu: but you can install it and rid yourself of the error reported.

Install Math:BigInt:GMP to get rid of the message.

Debian:
apt-get install libmath-bigint-gmp-perl

Ubuntu 10.4 LTS:
sudo apt-get install libmath-bigint-gmp-perl

RPM (Centos, Redhat...)
perl-Math-BigInt-GMP is available from the rpmforge repository - http://repoforge.org/

From irc:
haso: The setup script do not check for it. ... Should it ?
ehu: well, since you can run without, I don't think so.
ehu: do you?
haso: It could be an informed option.
ehu: well, that's indeed an idea.
ehu: it's in the install file for debian and RH, I think.

When trying to use XeLaTeX, you may get a message like:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! You are attempting to make a LaTeX format from a source file
! That is more than five years old.
!
! If you enter to scroll past this message then the format
! will be built, but please consider obtaining newer source files
! before continuing to build LaTeX.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! LaTeX source files more than 5 years old!.
l.545 ...aTeX source files more than 5 years old!}

?
! Emergency stop.
l.545 ...aTeX source files more than 5 years old!}

No pages of output.
Transcript written on xelatex.log.
Error: `xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
/var/lib/texmf/web2c
for details.
###############################################################################

This is a summary of all `failed' messages and warnings:
`xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

This is confirmed to be a problem on CentOS 6, Scientific Linux 6, Red Hat Enterprise Linux 6, and Fedora Core 13.

You can correct this issue (as root) by:

cd /usr/var/texmf/web2c
xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini

Once you type this you will get the same message, but have the option to press return and generate the file anyway.

(admin.pl is replaced with setup.pl in LedgerSMB v. 1.3.x and upwards)

I am trying to install ledgerSMB on SuSE 11.1 and have followed the INSTALL and README documents to do so, and have also installed all dependencies.

When I get to the following instruction I get some errors.

$ ./Build test

The errors are seen in the last few lines of output following the instruction. I list them below. Note that prior to these last few lines are many lines starting with "BEGIN failed--compilation aborted ..."

Also note the last line "Failed 6/6 test programs. 58/76 subtests failed." Clearly something is wrong here.

================================================
BEGIN failed--compilation aborted at LedgerSMB/Sysconfig.pm line 8.
Compilation failed in require at LedgerSMB/Form.pm line 37.
BEGIN failed--compilation aborted at LedgerSMB/Form.pm line 37.
Compilation failed in require at t/99-versioning.t line 8.
BEGIN failed--compilation aborted at t/99-versioning.t line 8.
# Looks like your test died before it could output anything.
t/99-versioning.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-9
Failed 9/9 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/01-load.t 12 3072 30 12 1-3 5 11-12 14 16 20 26-27 29
t/02-number-handling.t 255 65280 ?? ?? ??
t/03-date-handling.t 255 65280 ?? ?? ??
t/10-form.t 255 65280 ?? ?? ??
t/12-menu.t 255 65280 37 74 1-37
t/99-versioning.t 255 65280 9 18 1-9
Failed 6/6 test scripts. 58/76 subtests failed.
Files=6, Tests=76, 1 wallclock secs ( 0.93 cusr + 0.12 csys = 1.05 CPU)
Failed 6/6 test programs. 58/76 subtests failed.
================================================

After restarting both postgresql and apache, I tried to go to http://localhost/ledgersmb/admin.pl and received the following error on Firefox:

================================================
Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: admin.pl

If you think this is a server error, please contact the webmaster.
Error 500
localhost
Mon Nov 2 08:59:41 2009
Apache/2.2.10 (Linux/SUSE)
================================================

=======================================================
PROBLEM SOLVED ==> See below for the solution to this installation problem.
=======================================================

The problem was solved with the help of irc.freenode #ledgersmb. Here is how:

The error message says, "BEGIN failed--compilation aborted at LedgerSMB/Sysconfig.pm line 8." Line 8 in LedgerSMB/Sysconfig.pm is "use Config::Std;" This suggests that there was something wrong with Config::Std. Either it was not installed or there was some problems with its installation.

So, I tried reinstalling Config::Std and I received error messages suggesting problems with dependencies that were not reported when I ran "perl Build.PL"

http://search.cpan.org/ allows you to look up modules, such as Config::Std. Once found, there is a "dependencies" link, which lists dependencies, each of which have further dependencies, which have dependencies... . Well, you get the idea. Be patient and follow through noting all the dependency modules and dependent on dependent modules. Download and install each of these. I started installing those with least dependencies themselves.

I then reran "perl Build.PL" and "./Build test" and then restarted Apache and PostgreSQL. Voila! When I went to http://localhost/ledgersmb/admin.pl, I received the login page with no error!!

Written by: Joe

Q: How could I set it up ledgersmb to support SSL connection?

SSL support on Apache is handled by configuring Apache. For having LedgerSMB connect to PostgreSQL using SSL, you can set the PGSSLMODE environment variable to 'require' in the ledgersmb.conf. Note that by default, LedgerSMB will try to connect to PostgreSQL via SSL and fall back to unsecured connections if this is not available.

We highly recommend using SSL for any access to LedgerSMB over the network.

Make sure you have TexLive installed. Older TeTeX was recommended but according to Ubuntu repositories, TexLive is the new package to install.

You can install this with the following command:

apt-get install texlive-latex-extra

 

Adding support for other database management systems would require that the database logic be coded to the least common denominator. We have decided that we want to eventually allow add-ons in different languages, and thus the database becomes the only point where we can enforce accounting logic consistantly across all parts of the application. Porting and maintaining such logic across database systems is not feasible for this project.

Additionally PostgreSQL is an outstanding RDBMS and we have no desire to move from it.

The table below lists the compatibility of LedgerSMB versions with PostgreSQL versions. Products for which support has ceased due to End-of-Life date being reached are not listed and should not be used.

PostgreSQL compatibility
PostgreSQL1.4.x1.5 planned1.6 planned
8.4nonono
9.0yesnono
9.1yesnono
9.2yesnono
9.3yesnono
9.4 yesyesyes
9.5yesyesyes

Versions 1.0, 1.1, 1.2 and 1.3 are not in this table due to the fact that they're past End of Life.

FAQ Category: Localization / Internationalization

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)
 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation
 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

The templates use the Template Toolkit scripting language to generate actual content.
Depending on the typesetting language, the files use
* HTML;
* (Xe)LaTeX; or
* plain text
as the typesetting system.

While LaTeX and XeLaTeX are extremely similar, some differences exist, mainly in the area of font selection and document preamble.


Latex cheat sheet - http://www.stdout.org/~winston/latex/&#13;
Latex in 157 minutes - http://tobi.oetiker.ch/lshort/lshort.pdf&#13;


The LATEX Font Catalogue - http://www.tug.dk/FontCatalogue/about.html&#13;
Guide in Norwegian: http://dag.at.ifi.uio.no/latex-links/uiofonts.pdf&#13;

 

There's a section dedicated to translation. That should help you to get started.
 
The basic idea is that everything you can learn from the web about translating with gettext applies to LedgerSMB's gettext translation as well, with the note that you should be able to find a recent POT file in the repository next to the source code for the latest development version (trunk) and the latest stable release (1.3).

We don't know enough about the ideosyncracies with your laws to evaluate that. But quite frankly Free Software sometimes poses an issue with local regulation. If you go with LedgerSMB, I'd recommend working with us to detail any shortcomings and get those resolved.

You can help us to make a list over "X country" laws and LedgerSMB shortcomings according your countrys law.

FAQ Category: Contributing

# diff -u "original file" "new edited file" > “diff file”

Submit your patches ( “diff file” through the Sourceforge project tracker. If you are going to do somewhat largish changes, it's best to discuss how to do them on the developers list. That increases chances for acceptance which is in general the best solution for you and the lsmb community.

At least three active committers and many more developers.

The ledger-smb-devel mailing list have 196 subscribers (22. Mai 2012).
Check the mailing lists at https://sourceforge.net/p/ledger-smb/mailman/

Community: /following-and-contributing

192 subscribers (1. Nov 2011)

We ask that all IRC members follow the Ubuntu Code of Conduct.

We also ask that you always use a paste site when pasting more than 2-3 lines. Paste sites include:

FAQ Category: Administration

Assuming you have created a backup file using setup.pl, you can restore your database using the command:

 $ pg_restore [options] your_backup.bak

It should be pointed out that it's not possible to restore a backup to a database with a different name than the one you made the backup from!

If the database to restore into doesn't exist: replace [options] with -C new_database.
If you want to restore replacing an existing database: replace [options] with --clean -C new_database.

Note: You need to restore the roles backup before restoring the data backup.

As of 1.3.7 the backup functionality moved to setup.pl, the database administration interface.

Login with your ledgersmb database user / admin user. This can't be done using your normal LedgerSMB login account since it doesn't have enough rights to backup db and roles. The default address for setup.pl is http://localhost/ledgersmb/setup.pl.

The setup.pl backup facility consists of two parts:

  1. Backup of the data (parts, customers, accounting records, etc)
  2. Backup of the roles (your login accounts and rights)

The backup can be mailed to an e-mail account, or you can download it with your browser, depending on your output selection in the backup screen.

 

Note that alternative methods include the use of autopostgresqlbackup and PostgreSQL's command line utility pg_dump. See the Restore FAQ item for an example of the latter.

In the 'setup.pl' administrative interface, there are 2 buttons:

  • Backup database
  • Backup roles

One creates a backup of the content of your database. The other creates a backup of the roles.

Roles are elements which are required to exist before creation of a database, and assign fine-grained access control.

When restoring, you need both files and you need to restore the roles before the database.

[work in progess...]
The PDF and PS invoices are generated using a program called LaTeX which handles the layout and typesetting. The actual LaTeX files are creating using Template Toolkit with extensions for LaTeX. These extensions are in the Template::Latex package available from CPAN. The software then generates a LaTeX file which is then processed to create a PDF or PS.

Typically the first thing to do is to install a LaTeX distribution like TexLive (distributed with many Linux distributions and available for OSX and Windows). This provides LaTeX and many of the modules needed. In general I recommend that if your distro has a texlive-extras package that you install this too.

After this is installed, you must then install Template::Latex. This can be done by typing on the command line:

Note: Debian & Ubuntu look below.

cpan Template::Latex

This will also install a number of dependencies including LaTeX::Driver, which will need to know where your LaTeX binaries are. It is usually pretty good at finding them.

If things go wrong and you can't get it to work, the following commands may provide useful diagnostic information when requesting help:

>From the LedgerSMB application directory:
perl -MLedgerSMB::Template::Latex -e print

>From the doc/manual directory in the LedgerSMB application directory:
pdflatex LedgerSMB-manual


Debian & Ubuntu note:
Template::Latex is included in Template::Plugin::Latex which is now in Debian as
libtemplate-plugin-latex-perl. (It has migrated to Debian Testing ('wheezy')).
http://packages.debian.org/search?keywords=libtemplate-plugin-latex-perl
Install with apt-get install libtemplate-plugin-latex-perl


Ref: Latex in templates & Debian squeeze and xelatex
http://ledgersmb.org/faq/localization/im-using-non-ascii-unicode-charac…

Source:
How the LaTeX templates work
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6347 &#13;

With answers from Chris Travers, Robert James Clay

I had created a second database. To delete it, do I just drop the database from postgresql?

On a GNU-ish *nix platform use the script:
tools/delete-company-database.sh
it'll remove the roles and the database.

Copy db :
In psql or your sql client:
CREATE DATABASE my_newdb WITH TEMPLATE my_old_db;

Note this will clone everything.
If you want to get rid of the transactions, you will need to delete everything in the acc_trans, ar, ap, and gl tables.

Also if goods and services are used, delete from invoice and inventory as well, and if wishing to clear out all orders, delete from
orderitems and oe.

Sql ledger has the option to add a barcode to a part.

In 1.4, you will be able to add a barcode per make/model record.

How are barcodes added when using LedgerSMB?

Sort term solution:
It's not optimal for a UPC management but it solves the immediate problem:

Add a space separated list with the barcodes to the partnumber field

The partnumber is the "Number" filed on the same line as "Description" in the "Add Part" page.
And yes, "space separated list" works in the POS interface. (If you scan one of the codes in the space separated list )

Here's how the partnumber and description fields work
-----------------------------------------------------------------
It searches for any substring match for the entry.
If there is only one match it populates and moves on
If there are no matches it asks you if you want to create one
If there are multiple matches it gives you a list to choose from
same on the invoice screens

Long term solution:
------------------------
- add a UPC field to the makemodel table.

Question from: Tau (2009)

No: Our templates are in LaTeX or HTML (your choice), and use TemplateToolkit for variable interpolation. No xslt, no xsssl, no programming language other than TT directives......

http://template-toolkit.org/

I have successfully installed LegerSMB and logged in. However, no matter the type of user (i.e. administrator, supervisor or user) the access control of them is always the same. I cannot amend the user access control rights. Therefore many functions such as amending the chart of account are not working. Are there any error on my installation?
Thx
[Chris Travers : the Role field in 1.2 affects some aspects of reports but not much more than that. use the check boxes to show/hide menu items. In 1.3, the roles are significantly different.]

In 1.3.x :
Go to the System -> Admin Users -> Search users page, click "Search" and select "[edit]" for the user you're trying to change.

You'll be presented with a long list of authorizations that can be assigned to the user.

There are a number of possible causes for login problems. Some of the more common causes are:

Login in 1.3.x is new. Take a look at this screen guide:
http://www.ledgersmb.org/help/install/Ubuntu_Installation_Tutorial_Ledge...

Magic Characters in passwords:
The legacy code from SQL-Ledger has some issues with parsing passwords that contain either the equals sign ("=") or the ampersand (&). This is gradually being resolved in the LedgerSMB codebase but for now avoid using either of these characters in your passwords. The issue is that the equals and ampersand characters are used as delimiters in query strings and posted content - this is being worked on so should not be an issue "soon".

Googlebait: Symptoms of this include "Error! Cannot connect to datasource" and "no database driver specified and DBI_DSN env var not set at LedgerSMB/Form.pm" (suspect this is for admin password).

Browser plugin
The noscript Firefox plugin can prevent the Super-user login and Password box from being created. Disable noscript on your login page.

Password "popup"
Installed in a fresh install of Ubuntu. All seemed fine on in the evening when I went home for the weekend. (I was able to login) Now when I login I get an other password request popup opening with: A username and password are being requested by http://127.0.0.1. The site says: "LedgerSMB"

The likely issue here is that the initial password creation temporarily valid, with the idea that the individual setting the password may not be the application user. Consequently the password has expired and you cannot log in.

To solve the Password "popup", you can do one of a couple things:
By: Chris Travers

1) You can locate your pg_hba.conf file and change the authentication type to "trust" briefly while logging in and changing your password. This requires telling PostgreSQL to reload its files (or restarting PostgreSQL)

2) You can log into PostgreSQL with something like: sudo -u postgres psql and then change the expiration date. (on Centos or Red Hat su to the postgres user and run psql: su - postgres) Something like:

ALTER USER 'myusername' WITH VALID UNTIL '2011-11-09';

Then when you log in, you should be able to change your password under the preferences screen or if it will expire within a week, it should pop up that screen when you log in, with a warning on top.

PostgreSQL authorization settings (pg_hba.conf)
Read the "pg_hba.conf settings for production"
http://ledger-smb.svn.sourceforge.net/viewvc/ledger-smb/branches/1.3/INS...

The PostgreSQL doc about client authentication and pg_hba.conf
http://wiki.postgresql.org/wiki/Client_Authentication
https://www.postgresql.org/docs/8.4/static/auth-pg-hba-conf.html
https://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html

FAQ Category: Integration

REST -- we are working on it. (1. Nov 2011) Check developer mailing list and latest code.
Other language independent API--- we have it for the new code in the form of discoverable SQL interfaces, and are working on rewriting the rest with that in mind

Depends what your online store produces.
We're currently ( 1st Nov 2011) working on creating web service API's but freelock (a frequent visitor of the IRC channel) is already doing it. He doesn't mind sharing his code.

Web service API's discussion is ongoing on the development mailing list. Join and contribute

From the users mailinglist (2011.05.22):
Nigel Titley has an operational bridge working between Oscommerce and
LedgerSMB. He is happy to throw into the pot, especially once the
Ledgersmb RESTful interface comes out of the woodwork. It transfers new orders, new parts and new customers across from OSCommerce to LedgerSMB, handling multiple currencies and it updates the OSCommerce inventory from LedgerSMB. It runs as a regular cron job.
http://ledgersmb-oscom.svn.sourceforge.net/viewvc/ledgersmb-oscom/trunk…

From the users mailinglist (2012.03.07):
LSMB integration with e-commerce?
http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/5748

The faq: REST API or other language-independent interface ?
http://ledgersmb.org/faq/integration/there-rest-api-or-other-language-independent-interface

FAQ Category: Accounting

What you need to do is look for rows in payment_links which have type=0

Then, in acc_trans, you need to identify those rows which have an entry_id of a row which has a 0 amount. That row is probably an fx_transaction row.

The preceding entry_id row is likely one for the same transaction, with a non-zero, non-fx_transaction amount.

You need to insert a new row into the payment_links table with:

  • payment_id: same as for the fx_transaction
  • entry_id: entry_id of preceeding entry in acc_trans
  • type: 0

When you do that, the customer balances should be fixed.

If you find yourself in this situation, the answer is to create a 0 (null) payment: Select both the voiding and the voided invoice in the Cash->Payment (or Cash->Receipt) screen. This will clear the invoices against each other with a net-zero result.

Unfortunately, the LedgerSMB 1.3 version doesn't automatically clear a voiding invoice against a voided invoice upon posting of the former. The workflow described works around this issue.

I have made a payment to a vendor, but entered an incorrect date, far in
the future. Consequently the payment does not show when I try to reconcile
the relevant bank statement.

How do I back-out the incorrectly entered payment?

Cash/Vouchers/Reverse Payment.

Then when you are done adding the payments you want to reverse,
approve the batch.

Tested on: LedgerSMB 1.3.15.
source: http://permalink.gmane.org/gmane.comp.finance.ledger.smb.user/6087

When I open a screen to enter a GL transaction, there is no list to select accounts from. How do I know which accounts are available?

These are AJAX-completed boxes. Just wait after starting to type the account number or the beginning of the account name and a list of items to select from will pop up.

Short answer: Yes

LedgerSMB can tie product sales to a tax class so that VAT can automatically be split off into the required VAT accounts on a sale, and when cancelling an invoice, automatically perform the reverse bookings.

Each product can be 'attached' to an account and the associated % will be applied automatically.

NOTE: LedgerSMB has a Fixed assets module as of 1.3. The FAQ below is out-dated.

LedgerSMB does not have a built-in assett tracking / depreciation feature. Depreciation can be managed manually using General Ledger Transactions. You should probably confirm this with your accountant, but the basic procedure (kindly suggested by Tony Fraser) is, assuming a computer asset over 5 years:


Set up 3 accounts:

  • An asset account such as "Computers"
  • An asset account such as "Accumulated Amortization, Computers" that is normally a negative balance therefor it is a contra account
  • An expense account such as "Computer Depreciation"

Upon purchasing a depreciable asset (in this case, a computer):

AccountDebitCreditNotes
On purchasing the computer
Computers1000.00  
Bank Account 1000.00 
End of Year 1
Computer Depreciation400.00 (40% of $1000)
Accumulated Amortization, Computers 400.00 
End of Year 2
Computer Depreciation240.00 (40% of $600)
Accumulated Amortization, Computers 240.00 
End of Year 3
Computer Depreciation144.00 (40% of $360)
Accumulated Amortization, Computers 144.00 
Disposal
Bank Account75.00 (sale of computer)
Accumulated Amortization, Computers784.00 (reversing entry)
Computer Depreciation141.00 (residual value)
Computers 1000.00(reversing entry)

 

Quite a few users find some of the terminology and accounting processes a little confusing at first. Some of the more popular small business accounting packages tend to hide these aspects of book-keeping from users for simplicity, so with the current user interface there is often some new ideas to grasp.

First step is the manual - the LedgerSMB manual is free and highly recommended reading.

If you would like some background on general accounting practices, there is an (unassociated) tutorial So, you want to learn Bookkeeping" which seems a good place to start.

Another excellent resource is second-hand book stores. Lots of MBA studends sell off their textbooks (presumably to finance their first business rather than pay of gambling debts) so second-hand bookstores will often have very good texts on accounting at bargain prices - these can make great reference books.

Finally it would be remiss not to recommend securing the services of an accountant to help you out with the finer points from time to time, should you feel the need or have a legal obligation to do so.

Wikipedia articles:
https://en.wikipedia.org/wiki/Accounting
https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system
https://en.wikipedia.org/wiki/Accountant

FAQ Category: Support

Bug reports can be submitted and viewed at GitHub LedgerSMB Issues

Before raising a bug please check that it doesn't already exist.

It can be useful to discuss potential bugs on the Mailing List or IRC channel before raising them incase there is a known solution

Active support

Versions 1.4 and higher are under active development and are supported by the community.

End of life

If you're looking for help on how to use EOL-ed versions, please try mailing the users mailing list. If you're looking someone to create bugfixes, please check with one of the parties providing commercial support.

Version 1.3 has been declared end-of-life on 2015-12-23. The last release in the series is 1.3.47. No further releases will be made by the community.

LedgerSMB versions 1.0, 1.1 and 1.2 won't be maintained any further due to the fact that there are some known security issues which can't be fixed.

Is there a place where we could buy some consulting for LedgerSMB?
or a minimal setup according to our specs?

Take a look at Commercial Support