summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/RC.pm6
-rw-r--r--UPGRADE6
-rw-r--r--install.sh2
-rw-r--r--ledger-smb.conf6
-rw-r--r--sl2ls.sh9
5 files changed, 19 insertions, 10 deletions
diff --git a/LedgerSMB/RC.pm b/LedgerSMB/RC.pm
index 7ba6770a..48f184cd 100755
--- a/LedgerSMB/RC.pm
+++ b/LedgerSMB/RC.pm
@@ -232,11 +232,11 @@ sub payment_transactions {
if ($form->{fx_transaction}) {
$fx_transaction = qq|
AND NOT (ac.chart_id IN
- (SELECT value AS fxgain_accno_id FROM defaults
+ (SELECT value FROM defaults
WHERE setting_key = 'fxgain_accno_id'
UNION
- SELECT value AS fxloss_accno_id FROM defaults
- WHERE setting_key = 'fxloss_accno_id))|;
+ SELECT value FROM defaults
+ WHERE setting_key = 'fxloss_accno_id'))|;
} else {
$fx_transaction = qq|
AND ac.fx_transaction = '0'|;
diff --git a/UPGRADE b/UPGRADE
index deaca635..1d7bcee6 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -13,6 +13,10 @@ Also this document assumes that the reader is already familiar with the release
notes. If you have not already done so, please read the release_notes file in
the doc/ directory.
+Before you begin, make sure that you are running at least PostgreSQL 8.0. If
+you are running a prior version, you will need to dump your data, upgrade the
+database server and restore the data before proceeding.
+
MANUAL UPGRADE:
===============================================================================
@@ -78,6 +82,8 @@ sql/Pg-central.sql file into it.
7) Copy the files from the LedgerSMB tarball over your existing installation.
8) Delete the users directory.
+9) Edit the ledger-smb.conf file as appropriate.
+
Congratulations, you have manually upgraded to LedgerSMB 1.2.
TODO: Add upgrade.pl script and automate the above process.
diff --git a/install.sh b/install.sh
index 085e0310..645bde4b 100644
--- a/install.sh
+++ b/install.sh
@@ -7,7 +7,7 @@ sed -i "s|WORKING_DIR|$CWD|"
echo "Which user does your web server run as?"
read username
-chmod $username spool templates css
+chown $username spool templates css
echo "Where do we copy the ledger-smb-httpd.conf file to?"
read location
diff --git a/ledger-smb.conf b/ledger-smb.conf
index 6166265d..68a75d33 100644
--- a/ledger-smb.conf
+++ b/ledger-smb.conf
@@ -13,6 +13,6 @@ PATH: /usr/local/pgsql/bin
#
[globaldb]
##uncomment below and set to correct values
-#DBConnect: dbi:Pg:dbname=ledgersmb;host=localhost;port=5432
-#DBUserName: ledgersmb
-#DBPassword: password
+DBConnect: dbi:Pg:dbname=lsmb13;host=localhost;port=5432
+DBUserName: postgres
+# DBPassword: password
diff --git a/sl2ls.sh b/sl2ls.sh
index fcbf031f..531b8512 100644
--- a/sl2ls.sh
+++ b/sl2ls.sh
@@ -12,6 +12,9 @@ SLOWN=SQL-Ledger_Owner
LSDB=lsmbprod
LSOWN=ledgersmb
+# Installation directory
+
+IDIR=`pwd`
psql template1 -c "DROP DATABASE ${LSDB};"
@@ -22,7 +25,7 @@ sed -i -e "s/SQL_ASCII/LATIN1/" sl2ls.sql
createdb -O ${LSOWN} ${LSDB}
-psql ${LSDB} ${LSOWN} -c "\i /usr/local/ledger-smb/sql/Pg-central.sql"
+psql ${LSDB} ${LSOWN} -c "\i ${IDIR}/sql/Pg-central.sql"
psql template1 -c "ALTER USER ${LSOWN} WITH superuser;"
@@ -30,7 +33,7 @@ psql ${LSDB} ${LSOWN} -c "\i sl2ls.sql"
psql template1 -c "ALTER USER ${LSOWN} WITH nosuperuser;"
-cd /usr/local/ledger-smb/sql/legacy/
+cd ${IDIR}/sql/legacy/
psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
@@ -54,7 +57,7 @@ psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
psql ${LSDB} ${LSOWN} -c "update users_conf set password = md5('apasswrd');"
-cd /usr/local/ledger-smb
+cd ${IDIR}
./import_members.pl users/members