summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL9
-rw-r--r--LedgerSMB/Form.pm13
2 files changed, 13 insertions, 9 deletions
diff --git a/INSTALL b/INSTALL
index b9fb44fb..3fcb1013 100644
--- a/INSTALL
+++ b/INSTALL
@@ -51,18 +51,21 @@ recommend as follows:
5) Install tablefunc.sql for PostgreSQL (not optional)
See notes in 4 above for location of script and apply to template1.
-6) Create central database
+6) Install pg_trgm.sql into database or template1.
+ See notes in 4 above for location of script. Apply to template1.
+
+7) Create central database
a) create the ledgersmb role (optional)
b) create the ledgersmb database (if using a multi-company central db)
c) cd to the sql/ directory of the new ledger directory.
d) load the Pg-database.sql script into ledgersmb or your database.
-7) Set the admin password:
+8) Set the admin password:
From psql, determine what admin password you wish to use. Then type:
"update users_conf set password = md5('my_password');"
Naturally you would use your password instead of my_password.
-8) Edit the ledger-smb.conf file as appropriate.
+9) Edit the ledgersmb.conf file as appropriate.
Congratulations, you have manually installed LedgerSMB 1.3.
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 0b96e62e..cb20e03f 100644
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -1700,8 +1700,8 @@ sub all_vc {
$query .= qq| AND (startdate IS NULL OR startdate <= ?)
AND (enddate IS NULL OR enddate >= ?)|;
$where = qq| (startdate IS NULL OR startdate <= ?)
- AND (enddate IS NULL OR enddate >= ?)|;
-
+ AND (enddate IS NULL OR enddate >= ?)
+ AND entity_class = ?|;
push (@queryargs, $transdate, $transdate );
}
@@ -1717,13 +1717,14 @@ sub all_vc {
if ( $count < $myconfig->{vclimit} ) {
$self->{"${vc}_id"} *= 1;
- $where = "AND $where" if $where;
$query = qq|SELECT id, name
FROM entity
WHERE id IN (select entity_id
- FROM $vc)
- $where
+ FROM
+ entity_credit_account
+ WHERE
+ $where)
UNION
@@ -1733,7 +1734,7 @@ sub all_vc {
ORDER BY name|;
shift @queryargs;
- push( @queryargs, $self->{"${vc}_id"} );
+ push( @queryargs, $self->{vc_class}, $self->{"${vc}_id"} );
$sth = $dbh->prepare($query);
$sth->execute(@queryargs) || $self->dberror($query);