[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1469] trunk



Revision: 1469
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1469&view=rev
Author:   einhverfr
Date:     2007-08-26 22:47:43 -0700 (Sun, 26 Aug 2007)

Log Message:
-----------
Correcting Form::all_vc() for new entity management

Modified Paths:
--------------
    trunk/INSTALL
    trunk/LedgerSMB/Form.pm

Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL	2007-08-27 05:04:14 UTC (rev 1468)
+++ trunk/INSTALL	2007-08-27 05:47:43 UTC (rev 1469)
@@ -51,18 +51,21 @@
 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.
 

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-08-27 05:04:14 UTC (rev 1468)
+++ trunk/LedgerSMB/Form.pm	2007-08-27 05:47:43 UTC (rev 1469)
@@ -1700,8 +1700,8 @@
         $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 @@
     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 @@
 				  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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.