summaryrefslogtreecommitdiff
path: root/sql-ledger/doc/README
blob: 7585f5357ba32716ebbb782149d77facc38d5c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
                SQL-Ledger Accounting
                     Version 2.0


DESCRIPTION:
------------
SQL-Ledger is a double-entry accounting program written
in perl. It has been tested with PostgreSQL, Oracle,
Apache, Netscape, Mozilla, Galeon, Explorer, Links, Lynx,
Konqueror, Voyager, W3M and Opera clients on Linux, FreeBSD,
Solaris, Windows and Mac computers.

Data is stored in a SQL server, either locally or remote,
the display is through a text or GUI web browser. The system
is linked by a chart of accounts.  All transactions for AR,
AP and GL are stored in a transaction table. Hyper-links
from the chart of accounts let you view transactions posted
through AR, AP and GL.

Configuration files let you specify to which SQL server
to connect to, personal preferences such as company name,
language, number and date format, etc.

The admin script can be used to create, edit or delete users
and to create and delete datasets and to setup the Chart
of Accounts and templates needed for the system.
It can be used for PostgreSQL and Oracle. If you want to
use another SQL server the tables and chart of accounts
must be created by hand.

You can have a group of users using the same dataset and
templates for generating Invoices, Income Statements and
Balance Sheets or a different set altogether.

Templates are supplied in html and tex format to generate
most of the forms. Forms can be printed to screen, sent
to a printer or to a mailer agent. To use the tex forms
latex must be installed. Most systems have a latex binary
installed by default. Latex is also available for Windows
and the Mac so we stay compatible across all major platforms.


COPYRIGHT:
----------
You may distribute under the terms of the GNU License.


LATEST VERSION:
---------------
available from http://www.sql-ledger.org


PLATFORMS:
----------
Non specific, see requirements.


REQUIREMENTS:
-------------
1 - Perl, 5+
2 - http server (Apache, NCSA, httpi, ...)
3 - SQL Server with transaction support (PostgreSQL 7.0+, Oracle)
4 - DBD (DBD-Pg, DBD-Oracle)
5 - DBI
6 - LaTeX (optional)


FOREIGN LANGUAGE SUPPORT:
-------------------------
All the required files are in locale/country_code
The main files are 'all' and 'missing'. You can enter
translated strings in either file. When you are done
run locales.pl from the command line to rebuild the
required files.

Some of the translation files are not 100% complete.
If strings are missing, English is used instead.


INSTALLATION:
-------------
unpack the tar.gz file in /usr/local

  tar xzvf sql-ledger-x.x.x.tar.gz

you should now have everything in /usr/local/sql-ledger

copy sql-ledger.conf.default to sql-ledger.conf

edit sql-ledger.conf

create a file sql-ledger-httpd.conf in the same location
where your httpd.conf is and copy the next section into the file

  Alias /sql-ledger/ /usr/local/sql-ledger/
  <Directory /usr/local/sql-ledger>
    AddHandler cgi-script .pl
    Options ExecCGI Includes FollowSymlinks
  </Directory>

  <Directory /usr/local/sql-ledger/users>
    Order Deny,Allow
    Deny from All
  </Directory>

edit httpd.conf and add

  # SQL-Ledger
  Include <ServerRoot>/sql-ledger-httpd.conf

Note: Replace <ServerRoot> with the server's root directory!

restart your web server.


Note: /usr/local/sql-ledger is only a suggested
path, you can install in any directory.


INSTALLATION WITH setup.pl:
---------------------------
Make a directory

  mkdir /usr/local/sql-ledger

Copy setup.pl to /usr/local/sql-ledger

run setup.pl as root and follow the prompts.

Go to the next step, "PREPARE YOUR SQL SERVER".


SET PERMISSION:
---------------
change directory to /usr/local/sql-ledger

# chown nobody:nobody users templates

replace nobody:nobody with the web server
user of your system. Some systems use
apache:apache, www, www-data, ...


PREPARE YOUR SQL SERVER:
------------------------

  PostgreSQL:
  -----------
  add one database user with create database privileges
  to manage the datasets and tables for SQL-Ledger
  
  # su postgres
  $ createuser -d sql-ledger
  
  if you use passwords to access postgres set the user up with a password 
  $ createuser -d -P sql-ledger

  Answer no to the following question.
  Shall the new user be allowed to create more new users? (y/n) n

  You can add more database users to keep datasets
  separated. Each dataset belongs to one company.
  
  
  ORACLE:
  -------
  add one user and one tablespace
  all datasets share the same tablespace
  

SETUP A DATABASE AND THE TABLES:
--------------------------------
Load your web browser and connect to
http://localhost/sql-ledger/admin.pl

Tables are created with the "Database
Administration" function.

Select the "Database Administration" link,
enter a host, port and user you created in the
previous step.

The "Create Dataset" link queries the server
for existing datasets and displays them in a
column. Then you enter a name for the new
dataset and select one of the Chart of Accounts
and click on Continue.
Your new dataset and the tables will be created
and the selected Chart of Accounts loaded. The
owner of the tables is the user you entered in
the previous screen.

NOTE: Be patient, some of the charts are really
big and take some time to create.

The "Delete Dataset" link queries the server
for datasets which are in use by SQL-Ledger
and are not used by any members. This may
take a while to figure out. "Be patient".
If there are any datasets not in use, you get
a screen with the datasets listed where you
can select the one you want to delete.

NOTE: you cannot manage any other datasets
from this interface, only the datasets used
by SQL-Ledger.


SETUP A USER:
-------------
Load your web browser and connect to
http://localhost/sql-ledger/admin.pl

Click on "Add User". In the Database
section select the driver and enter
the user you used to create the dataset.


LOAD THE ACCOUNTING PROGRAM:
----------------------------
Load your web browser and connect to
http://localhost/sql-ledger/login.pl


UPGRADING TO A NEWER VERSION:
-----------------------------
1. unpack the new version over top
2. check the doc directory for specific notes
3. load admin.pl
   click on "Database Administration"
   enter the dba in the "Connect to" field
   click on "Update Dataset"
   select the datasets and click "Continue"


UPGRADING WITH setup.pl:
------------------------
run setup.pl from the command line and follow
the prompts.


INSTALLATION CHECKLIST:
-----------------------
1. untar SL somewhere
2. change permissions for the users and templates directory
3. edit httpd.conf
4. edit sql-ledger.conf
5. a) add the database user sql-ledger in PostgreSQL
   b) add a tablespace and the database user sql-ledger in Oracle
6. load admin.pl
7. create datasets for the companies
8. add users

   In the Database section enter
   
   a) PostgreSQL
   
      Host:     for local connections leave empty
      Dataset:  the dataset created in step 7
      Port:     for local connections leave empty
      User:     sql-ledger
      Password: password for sql-ledger
      
   b) Oracle
   
      SID:      system ID
      Port:     the port Oracle is listening on
      Dataset:  the dataset created in step 7
      Password: password for connection
   

IF SOMETHING DOESN'T WORK:
--------------------------
There is a FAQ online which addresses various questions.
see http://www.sql-ledger.org/misc/faq.html

There are also several mailing lists at
http://www.sql-ledger.org/misc/mailinglist.html
where you can go for help.

If you require support you can order online at
http://www.sql-ledger.com/misc/support.html


=====================================================================
December 4, 2002