LedgerSMB

Overview

LedgerSMB is a fork of the SQL-Ledger project. LedgerSMB forked at SQL-Ledger version 2.6.17.

Migrating SQL-Ledger to LedgerSMB

It is apparently easiest to upgrade from version 2.6.x of SQL-Ledger to version 1.1.12 of LedgerSMB. However, upgrading to 1.2.x is also possible, although manual intervention may be required.

See http://www.ledgersmb.org/node/30

However, version 1.1.12 only supports PostgreSQL 8.1 and 8.2, whilst version 1.2.16+ supports PostgreSQL 8.3. Therefore, on Debian 5.0 (Lenny) it may be easier to migrate straight to version 1.2.x.

Notes on Migrating from SQL-Ledger 2.6.x

These notes are based on migrating from version 2.6.12/2.6.22 of SQL-Ledger to LedgerSMB version 1.2.20. (It's not clear what the SQL-Ledger version actually was, as the dataset states it's version 2.6.12 whilst the application runtime states 2.6.22.)

  1. Install the application

    $ cd /usr/local
    $ tar -zxf ledgersmb-1.2.20.tar.gz
    
  2. Optionally, add plpgsql language as default language for all databases

    $ sudo -i
    # su - postgres
    $ createlang plpgsql
    
  3. Create the database

    CREATE DATABASE ledgersmb WITH ENCODING='UTF-8' OWNER=ledgermsb;
    
    
    $  psql -h localhost -U ledgersmb -d ledgersmb -f sql/Pg-central.sql
    
    
    UPDATE users_conf SET password = md5('SECRET') WHERE id=1;
    
  4. Ensure all required packages are installed:

    $ sudo aptitude install `cat ledgersmb/dists/deb/required_debs.txt`
    
  5. Test for unmet dependencies using the build script

    $ cd ledgersmb
    $ perl Build.PL
    
  6. Install stuff from cpan

    cpan
    > install Class::Std
    > install Config::Std
    > install Test::Trap
    

    Note: This list differs from that described in the install instructions

  7. Run upgrade scripts in sql/ledgersmb - See UPGRADE file in distribution source folder for details

  8. Follow instructions for creating users and datasets in INSTALL file in the distribution. For each dataset you create, if you didn't add the pl/pgsql language to template1 (above):

    $ plsql
    CREATE LANGUAGE plpgsql;
    

Supported PostgreSQL Versions

PostgreSQL Versions 8.1 and 8.2 are supported for all versions of LedgerSMB. 8.3 is fully supported as of 1.2.16 and is known to work for core operations in 1.2.13 and later.

See http://www.ledgersmb.org/node/6

Also:

Logos

It would appear that references to logos in tex templates must use the name 'logo' and reference files called logo.eps and logo.png in the relevant template directory.

Debugging

Perhaps the easiest way is to write output to STDERR which should go to the Apache error log.

    print STDERR "Debug";

menu.pl handles initial form submission and will execute the sub named as the 'action' attribute of the form for the current script in the ./bin/ folder named by the 'action' parameter for the form.

E.g. When viewing System->Taxes, clicking update submits the form with the form name set to 'am.pl' and the submit button name as 'update'. This executes sub update() in ./bin/am.pl

Related Topics: PostgreSQL, SQL-Ledger

-- Frank Dean - 09 Oct 2009