preamble.tex : No such file or directory

templates are provided as is, some templates may have links to other files
which are not included.
The preample.tex file is a separate file which holds
the header information for a template. Find a template with the header,
that is everything up to \begin document, and put the stuff into a file
called preamble.tex or simply cut and paste the header into the file and
remove the directive.

wrong papersize

If the papersize for postscript and PDF does not match set the proper
size with texconfig-sys

texconfig-sys pdftex paper letter

Install Notes for Lighttpd

Make sure mod_cgi and mod_alias are in server.modules list

Add sql-ledger directory as an alias, ie:

alias_url = ( "/sql-ledger/" => "/usr/local/sql-ledger/" )

Set up perl as hander for *.pl files.

cgi.assign = ( ".pl" => "/usr/bin/perl" )

Note: server.follow-symlink is on by default in lighttpd.

Deny access to users directory

$HTTP["url"] =~ "/sql-ledger/users" { url.access-deny = ("") }

PostgreSQL 8.x

PostgreSQL added a restriction in v8.x that a sequence cannot be dropped
after if it is referenced by a table. However backups created with
SQL-Ledger v2.6.13 and earlier have a DROP SEQUENCE step in the backup
which will fail. To fix this edit the backup before restoring on a 8.x
system.

PostgreSQL template1

template1 is a template to build new databases
from. Anything you put into template1 will be copied to a new database.
When you try to create a new dataset, the tables are already created from
template1 and when SQL-Ledger tries to create them you'll get an error that
the tables already exist.

PostgreSQL 8.0+ and SQL-Ledger v2.6.3 and older

To use SQL-Ledger < v2.6.3 with 8.0+ you have to modify the Pg-tables.sql file.
The file is in the sql directory.

If you already built a dataset without this change you will get
an error when you try to save a PO or assembly.

"ERROR: column "oid" does not exist"

Drop the tables and rebuild WITH OIDS.

Japanese characters

modify apache so that EUC_JP is the main additional language.
comment out all unrelated languages except, UTF_8 shift jis, EUC_JP
restart apache
Fire up psql and do the encoding as per the table:-
Table 5-2. Postgres Client/Server Character Set Encodings

Create the dataset from admin.pl, now the Japanese shows up in multibyte encoding

Now you can write in Hiragana, Katakana, Kanji and English

Error posting a check/receipt

DBD::Pg::db do failed: ERROR: syntax error at or near "," at character 114
Error!
INSERT INTO acc_trans (trans_id, chart_id, transdate,amount)
VALUES (13314, , '03-22-2005',1.00 * 1)
ERROR: syntax error at or near "," at character 114

This error is caused by a transaction which does not have links to
an AR/AP account.
set up your chart of accounts properly and create at least one
AR and AP account. Then edit all your transactions and repost.

session timeouts

If you get frequent timeouts or can't even log in synchronize
the clock with your server.

lineitems not printing

Templates edited on a UNIX platform don't work on a DOS platform.
To make them work load the template either with the builtin editor
or a text editor and save. Templates designed on a Windows platform have the
same problem and won't work on a UNIX platform. Once you strip the ^M's
the'll work just fine. This only affects the .tex templates because latex
can't process them properly.

UTF-8 character encoding

Most of the translations are in ISO format. To convert the translations
change directory to locale/cc and convert the files with iconv to UTF-8.
You should also convert the COAs too and make sure you select UTF-8
encoding when you set up a new dataset.

characterset problems

If you have problems displaying the correct characterset try adding

AddDefaultCharset On

in your httpd.conf file.

About installation

The easiest is to use the setup.pl script as root.
You don't need to know very much about your system, just login as root,
run 'perl setup.pl' and follow the prompts.

setup.pl does not check for missing software packages and it is your
responsibility to have the required software
installed either from source or from a package.

Requirements are clearly indicated in the README file and on the
download page.

cannot create function

either run createlang and install the plpgsql language handler or
install yourself. For more information how to do that, visit
PostgreSQL and
read the interactive documentation for procedural languages.

load admin.pl

unlock the system

login

The requested URL /sql-ledger/admin.pl was not found

Your webserver doesn't know where to find the script. Most commonly this
is from distributions hiding webserver configuration files in different
locations or files and setup.pl wasn't able to configure the location for
you. Find out which file (httpd.conf, httpdcommon.conf, ...)
controls your webserver configuration and add

# SQL-Ledger
Include /etc/httpd/sql-ledger-httpd.conf

Create a file 'sql-ledger-httpd.conf' in /etc/httpd and copy the next part
into the file.

If you run Apache and configuration files are in a conf.d directory
you don't need to change httpd.conf but simply copy sql-ledger-httpd.conf
into /etc/apache/conf.d and restart apache.

users/members : Permission denied

Your webserver must have write access to the users directory.
If your server runs as user/group 'apache:apache' then set the
users directory to owner/group apache:apache.

# chown -R apache:apache users

Dataset newer than version

You are trying to use an older version with a dataset which was
created with a newer version.

PDF option not working

Check if you have latex and pdflatex installed.

Apache 2.0 "error 500"

Some of the early versions of Apache 2.0 (< patchlevel 44) had a rewrite engine
which unescaped escaped strings. This created a lot of problems and I worked
around it by escaping strings twice.
If you get a server 500 error 'filename too long' or if collapsed menus
don't expand you may have to adjusted the following code in
SL/Form.pm and change the number (44) on line 84.

IDENT Authentication failed for user "sql-ledger"

The file is in the 'data' directory of your postgresql installation.
This is different with every distribution so look for it.

# find / -name 'pg_hba.conf'

Some people can't read and seem to think 'localhost' is just some
fancy name for a local machine.
'localhost' is a host like any other host on a network.
A 'local' entry in pg_hba.conf will allow local connections ONLY and
not allow host connections. If you then try to connect to 'localhost'
postgres will come back with an authentication error because you tried
to connect to a host.

WARNING! DO NOT just put a 'host all all trust' in pg_hba.conf
and leave your computer hooked up to the Internet. It's ok for trusted
internal networks but NOT when you are hooked up to the Internet.

DBD-Pg for Mandrake 9.0

LaTeX error

If for some reason LaTeX produces an error message check for strange
characters in your account description and parts description
and use \usepackage[latin1]{inputenc} in the preamble.

LaTeX templates

If you don't want to edit tex code by hand,
you could use Lyx, Abiword, or any WYSIWYG editor capable of exporting
latex code.
To do that you must change the tokens for the variables to something
like << and >>. % is the comment character in tex. There is also a
pagebreak block which must be commented out.
When you are done with the changes
replace << and >> with and uncomment the pagebreak block.

LaTeX is difficult but it also offers a much superior environment
to produce professionally looking forms in postscript and PDF format.
Unfortunately with all that power there is also a steep learning curve.

W3M

pass terminal=mozilla when you start w3m

$ w3m -F http://localhost/sql-ledger/login.pl?terminal=mozilla

To use without frames

$ w3m http://localhost/sql-ledger/login.pl?terminal=lynx

PDF option disappeared

Edit sql-ledger.conf and set $latex = 1;
sql-ledger.conf is perl code. If there is a mistake in the file it
will not be loaded and
the internal defaults are used which turn off $latex, hence no PDF option.

What do I enter for the language

If you use English, nothing, if you want to use a foreign language for
the login screen and admin stuff enter the language code, this is the
directory in the locale directory.

printing to a printer

Printers are defined in sql-ledger.conf

%printer = ( 'Default' => 'lpr', 'Color' => 'lpr -PEpson' );

Check in your /etc/printcap file for the names of available printers.

If you have LaTeX installed set

$latex = 1;

in sql-ledger.conf

To send the document to the printer check the "Postscript" or "PDF" format,
enter the number of copies and click on the "Print" button.

The printer you enter in your preferences is the default printer.
You can choose any other available printer. This makes it possible
to print from anywhere on the network to any printer.

Note: html format is for screen preview. Use the "Print" option from your
browser to print to a printer.

Using samba to send printjobs to a printer attached to a Windows XP workstation

The next part applies to roll your own print filters only. If you use CUPS or
LPRng use this as a guide how printing works.
I use the printer 'Epson' as an example which is
attached to a XP workstation called Raven.

beginning balances

Add a GL Journal entry and enter the beginning balance for your accounts.
Beginning balances are the balances from your last balance sheet. If you also
add open invoices to account for COGS for inventory, add the invoices
and make the appropriate adjustments.

establish a beginning inventory

add the parts with a vendor invoice. Use the real cost for the items,
not zero. If you use zero cost then the cost of goods will be zero when you
sell the item.

Assemblies

Assemblies are manufactured goods assembled from parts, services and
assemblies. Because you do not buy assemblies you 'stock assemblies' by
adding assembled units to your inventory. The quantity for individual parts
is reduced and the quantity for the assembly increased. To disassemble an
assembly you simply return the parts to inventory by entering a negative
quantity for the number of assemblies to stock.

html and graphics files don't show up on screen

switch display to a foreign language

Load your preferences and select the language.
Language selection is in accordance to
ISO 3166-1 standards.

Text shows in English when I use a foreign language

This is because the corresponding hash entry is missing.
Add the missing text in the locale/cc/all or locale/cc/missing
file and run 'perl locales.pl' from the command line to rebuild
the individual files.
cc refers to the country code.

switch to a foreign language for the login and admin screen

Edit sql-ledger.conf and enter the code for the $language variable

$language = "de";

This is a global change and applies to all logins, individual settings
can be changed by setting the language in your Preferences.

SQL-Ledger security

The security features built into SQL-Ledger provide password
and access control.
If you expose your server on the Internet we strongly advise to use your
web server's authentication mechanism as well.

SQL-Ledger was not designed to be run wide open on the Internet.

Some precautions which are out of our control must also be taken.
It matters where you install SL and how you configure your web server and
SQL database server.

Typical setups:
/usr/local/vh/www
/usr/local/vh/www
The location for the users directory can be specified in sql-ledger.conf

Set permission for the users and templates directory to 711

If you do not want anyone to change the templates with the builtin
editor set the files in templates/directory/ to read only or disable
the menu item to edit the templates.

You can set up a read-only environment if you disable the menu items
to add data. i.e 'Add Transaction' if unchecked you will not be able to add
a transaction or repost a transaction. You may look at it but nothing else.

There are various settings for audit control and you can disable
reposting entirely or up to a certain date. And with audit trails enabled
you can keep tab of who is doing what.

For PostgreSQL you can also set who has access to the server in the file
pg_hba.conf
Authentication crypt does not work because not all SQL servers
accept encrypted passwords.

in addition you can secure the tables from unauthorized access by
setting up a different database user and GRANT rights. For instance,
users without DELETE rights will still be able to use the program, change
customers and vendors, add transactions but will not be able to delete or
repost transactions.
To lock all the tables to create a RO system GRANT SELECT rights only.