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

SF.net SVN: ledger-smb:[2741] trunk/LedgerSMB



Revision: 2741
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2741&view=rev
Author:   einhverfr
Date:     2009-07-27 18:29:54 +0000 (Mon, 27 Jul 2009)

Log Message:
-----------
Committing two bugfixes from David Bandell regarding timecards and point of sale

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

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2009-07-26 18:00:44 UTC (rev 2740)
+++ trunk/LedgerSMB/Form.pm	2009-07-27 18:29:54 UTC (rev 2741)
@@ -896,7 +896,8 @@
     # we got a connection, check the version
     my $query = qq|
 		SELECT employeenumber FROM employee 
-		 WHERE login = ?|;
+		 WHERE entity_id = 
+			(select entity_id from users where login = ?)|;
     my $sth = $dbh->prepare($query);
     $sth->execute( $self->{login} ) || $self->dberror($query);
 

Modified: trunk/LedgerSMB/JC.pm
===================================================================
--- trunk/LedgerSMB/JC.pm	2009-07-26 18:00:44 UTC (rev 2740)
+++ trunk/LedgerSMB/JC.pm	2009-07-27 18:29:54 UTC (rev 2741)
@@ -138,7 +138,7 @@
         my $sth = $dbh->prepare($query);
         $sth->execute( $form->{project_id} );
 
-        ($parts_id, $form->{customer_id} ) = $sth->fetchrow_array ;
+        ($parts_id, $form->{credit_id} ) = $sth->fetchrow_array ;
         if ( $parts_id ) {
             $form->{project} = 'job';
             $query = qq|
@@ -226,9 +226,9 @@
     my ( $null, $project_id ) = split /--/, $form->{projectnumber};
     $project_id = $dbh->quote($project_id);
 
-    my $query = qq|SELECT customer_id FROM project WHERE id = $project_id|;
-    my ($customer_id) = $dbh->selectrow_array($query);
-    $customer_id = $dbh->quote($customer_id);
+    my $query = qq|SELECT credit_id FROM project WHERE id = $project_id|;
+    my ($credit_id) = $dbh->selectrow_array($query);
+    $credit_id = $dbh->quote($credit_id);
 
     my $where;
 


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