File: UPGRADE

package info (click to toggle)
sql-ledger 3.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 35,524 kB
  • ctags: 4,556
  • sloc: perl: 64,519; sql: 28,330; sh: 34; makefile: 21
file content (322 lines) | stat: -rw-r--r-- 10,476 bytes parent folder | download | duplicates (3)
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
UPGRADING
---------
This file is devided into sections describing the steps required to
upgrade. You only have to read the sections which apply to your
version, i.e if you are upgrading from v1.8.6 to v2.6.27 you
should read the sections from v1.8.6 up to v2.6.27

If there is no section for a range of versions no additional steps
are required.

The software can be upgraded using setup.pl. If setup.pl cannot
download the file over the Internet (proxy, missing utilities, etc)
download the tarball with your browser and save the file.
You may then proceed with a manual installation or let setup.pl
do the work for you.
  
The steps to do it yourself are:
--------------------------------
1. ungzip/untar SQL-Ledger over top your old installation
   $ cd /usr/local
   $ tar zxvf sql-ledger-x.x.x.tar.gz

2. fix permissions
   # chown -hR nobody:nogroup *
   # chmod 711 templates users css spool

   Note: replace nobody:nogroup with your web server user and group


Using setup.pl passing filename:
--------------------------------
1. download sql-ledger-x.x.x.tar.gz and save in the sql-ledger folder

2. change directory to

   $ cd /usr/local/sql-ledger

3. become the root user

   $ su root

4. run setup.pl from the commandline

   # ./setup.pl sql-ledger-x.x.x.tar.gz
   

Upgrading Datasets:
-------------------
Datasets are upgraded when a user logs in. There is no need to load
admin.pl, there is also no need to install intermediate versions, all
the upgrade steps are included in the current version.

The sections below describe additional steps required such as
copying templates to bring a system up to date.

Before you log in please read the relevant sections below.


Version 1.6 to 1.8
------------------
1. copy the following templates to your template directory

   $ cd sql-ledger/templates

   $ cp Default-email_purchase_order.html your_template_dir/email_purchase_order.html
   $ cp Default-purchase_order.html your_template_dir/purchase_order.html
   $ cp Default-email_sales_order.html your_template_dir/email_sales_order.html
   $ cp Default-sales_order.html your_template_dir/sales_order.html
 
2. Two new accounts were hopefully added to your chart of accounts
   One account for Foreign Exchange Gains and one for
   Foreign Exchange Losses
   edit and change to suit your COA. You can safely change
   the account number too.
      
3. Edit your preferences

   In field 'Stylesheet' enter -> sql-ledger.css
   Stylesheet is in the css directory

   Add your foreign currencies in the Currencies field
   The first currency in the list is your default
   i.e CDN:USD:EUR:YEN
   If you used a nativecurr then it should be listed in the
   new currencies field.

4. <%nativecurr%> has changed to <%currency%>
   edit all the templates and change nativecurr to currency

5. We also added four more variables which can be used the templates.
   <%contact%>, <%shiptocontact%>, <%shiptophone%>, <%shiptofax%>
   
6. Nameing convention for templates has changed from an
   underscore to a minus sign. If you designed your own
   master templates rename the templates from
   industry_invoice.html to industry-invoice.html,
   industry_packing_list.html to industry-packing_list.html, etc.
   The minus sign is used to separate the name and list them in
   the setup screen.
   
   This change only applies to the master templates in the
   templates root directory NOT the individual templates which
   are used by users.


Version 1.8.0 to 1.8.3
----------------------
1. copy sql-ledger.conf.default to sql-ledger.conf

   $ cp sql-ledger.conf.default sql-ledger.conf

   if sql-ledger.conf was modified merge the changes from the
   .default file rather than copying over top.

2. copy the following templates to your personal template directory

   $ cd sql-ledger/templates

   $ cp Default-invoice.tex your_template_dir/invoice.tex
   $ cp Default-packing_list.tex your_template_dir/packing_list.tex
   $ cp Default-purchase_order.tex your_template_dir/purchase_order.tex
   $ cp Default-sales_order.tex your_template_dir/sales_order.tex

3. edit sql-ledger.conf
   instructions are in the file


Version 1.8.4 to 1.8.7
----------------------
There are two new variables (<%customernumber%> and <%vendornumber%>)
which can be used in the templates. These can be used instead of the
internally generated customer_id and vendor_id.

Typically these numbers are used to retrieve a customer, vendor
by some ID. In most counter operations the phone number is used.


Version 1.8.7 to 2.0.0
----------------------
1. copy the following templates to your personal template directory

   $ cd sql-ledger/templates

   $ cp Default-check.tex your_template_dir/check.tex
   $ cp Default-receipt.tex your_template_dir/receipt.tex
   $ cp Default-statement.html your_template_dir/statement.html
   $ cp Default-statement.tex your_template_dir/statement.tex


Version 2.0.9 to 2.2.0
----------------------
1. copy the following template to your personal template directory

   $ cd sql-ledger/templates
   
   $ cp Default-pos_invoice.txt your_template_dir/pos_invoice.txt


Version 2.2.7 to 2.4.0
----------------------
1. install the plpgsql language compiler for PostgreSQL
   # createlang plpgsql <dataset>

2. install plpgsql in template1
   # createlang plpgsql template1

Edit Pg-upgrade-2.3.4-2.3.5.sql and change the way addresses are
rewritten if you don't want US style addresses.

North-american addresses are usually in the form of

Five Star Stables
123 Horsehoe Blvd.
Sweetgrass, MT 19867
U.S.A

addr1 --> address1
addr2 --> city
addr3 --> country
addr4 --> state

addr4 was put into the state field to bring the field forward
to the new layout. To check if there is something in the field run
a report and sort by the "State" field.

Either edit the records or run the SQL queries below to take them apart.

If you have anything in the "state" field change the records to match
the others before you run the following queries.

dbname=# update customer set state = substr(city,strpos(city,' ')+1);
dbname=# update customer set zipcode = substr(state,strpos(state,' ')+1);
dbname=# update customer set state = substr(state,1,strpos(state,' ')-1);
dbname=# update customer set city = substr(city,1,strpos(city,',')-1);

do the same with the vendor and shipto table, replace 'customer'
with 'vendor' and 'shipto'.

3. create a new set of templates

  * load admin.pl and edit one of the user's
  * in the "New Templates" field enter "new" and save the user
  * step back in your browser so you have the same screen again
    as before
  * change the template directory back to what it was before
    the change and save the user
  * drop into a shell window
  * cd to sql-ledger/templates/new
  * copy the additional templates to your private template directory

4. Printers

   printer setup has changed to multiple printers which allow
   users to choose a printer. Printers can be defined in sql-ledger.conf


Version 2.4.2 to 2.4.3
----------------------
1. copy the following templates to your private template directory

   $ cd sql-ledger/templates

   $ cp Default-ar_transaction.html your_template_dir/ar_transaction.html
   $ cp Default-ar_transaction.tex your_template_dir/ar_transaction.tex
   $ cp Default-ap_transaction.html your_template_dir/ap_transaction.html
   $ cp Default-ap_transaction.tex your_template_dir/ap_transaction.tex


Version 2.4.16 to 2.6.0
-----------------------
1. copy the following templates to your private template directory

   $ cd sql-ledger/templates
   
   $ cp Default-timecard.html your_template_dir/timecard.html
   $ cp Default-timecard.tex your_template_dir/timecard.tex


Version 2.6.27 to 2.8.0
-----------------------
1. copy the following templates to your private template directory

   $ cd sql-ledger/templates
   
   $ cp Default-credit_invoice.html your_template_dir/credit_invoice.html
   $ cp Default-credit_invoice.tex your_template_dir/credit_invoice.tex
   $ cp Default-credit_note.html your_template_dir/credit_note.html
   $ cp Default-credit_note.tex your_template_dir/credit_note.tex
   $ cp Default-debit_invoice.html your_template_dir/debit_invoice.html
   $ cp Default-debit_invoice.tex your_template_dir/debit_invoice.tex
   $ cp Default-debit_note.html your_template_dir/debit_note.html
   $ cp Default-debit_note.tex your_template_dir/debit_note.tex

2. Go to System -> Defaults and enter the company name


Version 2.8.0 to 2.8.2
----------------------
1. If you receive the following error while upgrading

   ERROR:  trigger "del_recurring" for table "oe" does not exist

   load admin.pl and "Unlock" the system and log in again.

NOTE: The error is intentional and may or may not show up on your system.


Version 2.8.2 to 2.8.4
----------------------
1. copy the following templates to your private template directory

   $ cd sql-ledger/templates
   
   $ cp Default-remittance_voucher.html your_template_dir/remittance_voucher.html
   $ cp Default-remittance_voucher.tex your_template_dir/remittance_voucher.tex
   

Version 2.8.6 to 2.8.7
----------------------
1. go to System -> Currencies
   and enter/edit the currencies

2. go to System -> Defaults
   and enter the default precision
      

Version 2.8.23 to 2.8.30
------------------------
1. copy the following templates to your private template directory

   $ cd sql-ledger/templates
   
   $ cp Default-reminder1.html your_template_dir/reminder1.html
   $ cp Default-reminder2.html your_template_dir/reminder2.html
   $ cp Default-reminder3.html your_template_dir/reminder3.html
   $ cp Default-reminder1.tex your_template_dir/reminder1.tex
   $ cp Default-reminder2.tex your_template_dir/reminder2.tex
   $ cp Default-reminder3.tex your_template_dir/reminder3.tex


Version 2.8.30 to 3.0
---------------------
1. edit the members file and add the name of the dataset
   to every login so the logins are 'login@dataset'
2. make a copy of the section of one user and change the
   login to 'admin@dataset'
3. create a directory with the same name as the dataset
   in the spool and templates directory
4. move the private templates to the dataset directory
5. move the spoolfiles to the dataset directory
6. copy the following template to your dataset directory

   $ cd sql-ledger/templates
   
   $ cp Default-payslip.tex dataset/payslip.tex
   $ cp Default-barcode.tex dataset/barcode.tex

7. set up printers in System -> Workstations

Note: replace 'dataset' with the name of your dataset.