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

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



Revision: 866
          http://svn.sourceforge.net/ledger-smb/?rev=866&view=rev
Author:   einhverfr
Date:     2007-03-08 11:18:07 -0800 (Thu, 08 Mar 2007)

Log Message:
-----------
Moved other .pm's from 'employee' to 'employees'

Modified Paths:
--------------
    trunk/LedgerSMB/AA.pm
    trunk/LedgerSMB/BP.pm
    trunk/LedgerSMB/CT.pm
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/HR.pm
    trunk/LedgerSMB/IC.pm
    trunk/LedgerSMB/IS.pm
    trunk/LedgerSMB/JC.pm
    trunk/LedgerSMB/OE.pm
    trunk/LedgerSMB/PE.pm
    trunk/LedgerSMB/RP.pm
    trunk/LedgerSMB/User.pm

Modified: trunk/LedgerSMB/AA.pm
===================================================================
--- trunk/LedgerSMB/AA.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/AA.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -694,8 +694,8 @@
 		          a.ponumber $acc_trans_flds
 		     FROM $table a
 		     JOIN $form->{vc} vc ON (a.$form->{vc}_id = vc.id)
-		LEFT JOIN employee e ON (a.employee_id = e.id)
-		LEFT JOIN employee m ON (e.managerid = m.id)
+		LEFT JOIN employees e ON (a.employee_id = e.id)
+		LEFT JOIN employees m ON (e.managerid = m.id)
 		LEFT JOIN exchangerate ex ON (ex.curr = a.curr
 		          AND ex.transdate = a.transdate)
 		LEFT JOIN department d ON (a.department_id = d.id) 
@@ -916,7 +916,7 @@
 		          e.name AS employee, e.id AS employee_id
 		     FROM $form->{vc} c
 		LEFT JOIN business b ON (b.id = c.business_id)
-		LEFT JOIN employee e ON (e.id = c.employee_id)
+		LEFT JOIN employees e ON (e.id = c.employee_id)
 		    WHERE c.id = ?|;
 
 	@queryargs = ($form->{"$form->{vc}_id"});

Modified: trunk/LedgerSMB/BP.pm
===================================================================
--- trunk/LedgerSMB/BP.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/BP.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -156,7 +156,7 @@
 			       '' AS ordnumber, '' AS quonumber, '0' AS invoice,
 			       '$arap{$form->{type}}[0]' AS module, s.spoolfile
 			  FROM jcitems j
-			  JOIN employee e ON (e.id = j.employee_id)
+			  JOIN employees e ON (e.id = j.employee_id)
 			  JOIN status s ON (s.trans_id = j.id)
 			 WHERE s.formname = ?
 			       AND s.spoolfile IS NOT NULL|;

Modified: trunk/LedgerSMB/CT.pm
===================================================================
--- trunk/LedgerSMB/CT.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/CT.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -55,7 +55,7 @@
 			      FROM $form->{db} ct
 			 LEFT JOIN business b ON (ct.business_id = b.id)
 			 LEFT JOIN shipto s ON (ct.id = s.trans_id)
-			 LEFT JOIN employee e ON (ct.employee_id = e.id)
+			 LEFT JOIN employees e ON (ct.employee_id = e.id)
 			 LEFT JOIN pricegroup g ON (g.id = ct.pricegroup_id)
 			 LEFT JOIN language l ON (l.code = ct.language_code)
 			     WHERE ct.id = ?|;
@@ -655,8 +655,8 @@
 		          l.description AS language, m.name AS manager
 		     FROM $form->{db} ct
 		LEFT JOIN business b ON (ct.business_id = b.id)
-		LEFT JOIN employee e ON (ct.employee_id = e.id)
-		LEFT JOIN employee m ON (m.id = e.managerid)
+		LEFT JOIN employees e ON (ct.employee_id = e.id)
+		LEFT JOIN employees m ON (m.id = e.managerid)
 		LEFT JOIN pricegroup g ON (ct.pricegroup_id = g.id)
 		LEFT JOIN language l ON (l.code = ct.language_code)
 		    WHERE $where|;
@@ -713,8 +713,8 @@
 				      FROM $form->{db} ct
 				      JOIN $ar a ON (a.$form->{db}_id = ct.id)
 				 LEFT JOIN business b ON (ct.business_id = b.id)
-				 LEFT JOIN employee e ON (a.employee_id = e.id)
-				 LEFT JOIN employee m ON (m.id = e.managerid)
+				 LEFT JOIN employees e ON (a.employee_id = e.id)
+				 LEFT JOIN employees m ON (m.id = e.managerid)
 				     WHERE $where
 				           AND a.invoice = '0'
 				           $transwhere
@@ -749,8 +749,8 @@
 				     FROM $form->{db} ct
 				     JOIN $ar a ON (a.$form->{db}_id = ct.id)
 				LEFT JOIN business b ON (ct.business_id = b.id)
-				LEFT JOIN employee e ON (a.employee_id = e.id)
-				LEFT JOIN employee m ON (m.id = e.managerid)
+				LEFT JOIN employees e ON (a.employee_id = e.id)
+				LEFT JOIN employees m ON (m.id = e.managerid)
 				    WHERE $where
 				          AND a.invoice = '1'
 				          $transwhere
@@ -781,8 +781,8 @@
 				     FROM $form->{db} ct
 				     JOIN oe o ON (o.$form->{db}_id = ct.id)
 				LEFT JOIN business b ON (ct.business_id = b.id)
-				LEFT JOIN employee e ON (o.employee_id = e.id)
-				LEFT JOIN employee m ON (m.id = e.managerid)
+				LEFT JOIN employees e ON (o.employee_id = e.id)
+				LEFT JOIN employees m ON (m.id = e.managerid)
 				    WHERE $where
 				      AND o.quotation = '0'
 				          $transwhere
@@ -815,8 +815,8 @@
 				     FROM $form->{db} ct
 				     JOIN oe o ON (o.$form->{db}_id = ct.id)
 				LEFT JOIN business b ON (ct.business_id = b.id)
-				LEFT JOIN employee e ON (o.employee_id = e.id)
-				LEFT JOIN employee m ON (m.id = e.managerid)
+				LEFT JOIN employees e ON (o.employee_id = e.id)
+				LEFT JOIN employees m ON (m.id = e.managerid)
 				    WHERE $where
 				          AND o.quotation = '1'
 				          $transwhere
@@ -1022,7 +1022,7 @@
 		          $invjoin
 		     JOIN parts p ON (p.id = i.parts_id)
 		LEFT JOIN project pr ON (pr.id = i.project_id)
-		LEFT JOIN employee e ON (e.id = a.employee_id)
+		LEFT JOIN employees e ON (e.id = a.employee_id)
 				 WHERE $where
 			  ORDER BY $sortorder|;
 

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/Form.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -547,7 +547,7 @@
 	my $dbh = $form->{dbh};
 	# we got a connection, check the version
 	my $query = qq|
-		SELECT employeenumber FROM employee 
+		SELECT employeenumber FROM employees 
 		 WHERE login = ?|;
 	my $sth = $dbh->prepare($query);
 	$sth->execute($form->{login}) || $form->dberror($query);
@@ -1662,7 +1662,7 @@
 	$login =~ s/@.*//;
 
 	my $query = qq|SELECT name, id 
-					 FROM employee 
+					 FROM employees 
 					WHERE login = ?|;
 
 	$sth = $self->{dbh}->prepare($query);
@@ -2084,7 +2084,7 @@
 				c.language_code, a.ponumber
 			FROM $arap a
 			JOIN $vc c ON (a.${vc}_id = c.id)
-			LEFT JOIN employee e ON (e.id = a.employee_id)
+			LEFT JOIN employees e ON (e.id = a.employee_id)
 			LEFT JOIN department d ON (d.id = a.department_id)
 			WHERE a.id = ?|;
 

Modified: trunk/LedgerSMB/HR.pm
===================================================================
--- trunk/LedgerSMB/HR.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/HR.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -45,7 +45,7 @@
 	my $notid = "";
 
 	if ($form->{id}) {
-		$query = qq|SELECT e.* FROM employee e WHERE e.id = ?|;
+		$query = qq|SELECT e.* FROM employees e WHERE e.id = ?|;
 		$sth = $dbh->prepare($query);
 		$sth->execute($form->{id}) || $form->dberror(__FILE__.':'.__LINE__.':'.$query);
   
@@ -64,7 +64,7 @@
 		# get manager
 		$form->{managerid} *= 1;
 
-		$sth = $dbh->prepare("SELECT name FROM employee WHERE id = ?");
+		$sth = $dbh->prepare("SELECT name FROM employees WHERE id = ?");
 		$sth->execute($form->{managerid});
 		($form->{manager}) = $sth->fetchrow_array;
     
@@ -110,10 +110,10 @@
 		my $uid = localtime;
 		$uid .= "$$";
 
-		$query = qq|INSERT INTO employee (name) VALUES ('$uid')|;
+		$query = qq|INSERT INTO employees (name) VALUES ('$uid')|;
 		$dbh->do($query) || $form->dberror(__FILE__.':'.__LINE__.':'.$query);
     
-		$query = qq|SELECT id FROM employee WHERE name = '$uid'|;
+		$query = qq|SELECT id FROM employees WHERE name = '$uid'|;
 		$sth = $dbh->prepare($query);
 		$sth->execute || $form->dberror(__FILE__.':'.__LINE__.':'.$query);
 
@@ -130,7 +130,7 @@
 			if ! $form->{employeenumber};
 
 	$query = qq|
-		UPDATE employee 
+		UPDATE employees 
 		   SET employeenumber = ?,
 		       name = ?,
 		       address1 = ?,
@@ -182,7 +182,7 @@
 	# delete employee
 	
 	my $query = qq|
-		DELETE FROM employee 
+		DELETE FROM employees 
 		      WHERE id = |.$dbh->quote($form->{id});
 	$dbh->do($query) || $form->dberror(__FILE__.':'.__LINE__.':'.$query);
 
@@ -235,8 +235,8 @@
 
 	my $query = qq|
 		   SELECT e.*, m.name AS manager
-		     FROM employee e
-		LEFT JOIN employee m ON (m.id = e.managerid)
+		     FROM employees e
+		LEFT JOIN employees m ON (m.id = e.managerid)
 		    WHERE $where
 		 ORDER BY $sortorder|;
 

Modified: trunk/LedgerSMB/IC.pm
===================================================================
--- trunk/LedgerSMB/IC.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/IC.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -1238,7 +1238,7 @@
 					          ON (a.vendor_id = ct.id)
 					LEFT JOIN partsgroup pg 
 					          ON (p.partsgroup_id = pg.id)
-					LEFT JOIN employee e 
+					LEFT JOIN employees e 
 					          ON (a.employee_id = e.id)
 					$makemodeljoin
 					    WHERE $invwhere|;
@@ -1265,7 +1265,7 @@
 					          ON (a.customer_id = ct.id)
 					LEFT JOIN partsgroup pg 
 					          ON (p.partsgroup_id = pg.id)
-					LEFT JOIN employee e 
+					LEFT JOIN employees e 
 					          ON (a.employee_id = e.id)
 					$makemodeljoin
 					    WHERE $invwhere|;
@@ -1331,7 +1331,7 @@
 					          ON (a.customer_id = ct.id)
 					LEFT JOIN partsgroup pg 
 					          ON (p.partsgroup_id = pg.id)
-					LEFT JOIN employee e 
+					LEFT JOIN employees e 
 					          ON (a.employee_id = e.id)
 					$makemodeljoin
 					    WHERE $ordwhere 
@@ -1371,7 +1371,7 @@
 					          ON (a.vendor_id = ct.id)
 					LEFT JOIN partsgroup pg 
 					          ON (p.partsgroup_id = pg.id)
-					LEFT JOIN employee e 
+					LEFT JOIN employees e 
 					          ON (a.employee_id = e.id)
 					$makemodeljoin
 					    WHERE $ordwhere
@@ -1438,7 +1438,7 @@
 					          ON (a.customer_id = ct.id)
 					LEFT JOIN partsgroup pg 
 					          ON (p.partsgroup_id = pg.id)
-					LEFT JOIN employee e 
+					LEFT JOIN employees e 
 					          ON (a.employee_id = e.id)
 					$makemodeljoin
 					    WHERE $quowhere
@@ -1478,7 +1478,7 @@
 					          ON (a.vendor_id = ct.id)
 					LEFT JOIN partsgroup pg 
 					          ON (p.partsgroup_id = pg.id)
-					LEFT JOIN employee e 
+					LEFT JOIN employees e 
 					          ON (a.employee_id = e.id)
 					$makemodeljoin
 					    WHERE $quowhere

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/IS.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -1752,7 +1752,7 @@
 			          a.customer_id,
 			          a.language_code, a.ponumber
 			     FROM ar a
-			LEFT JOIN employee e ON (e.id = a.employee_id)
+			LEFT JOIN employees e ON (e.id = a.employee_id)
 			    WHERE a.id = ?|;
 
 		$sth = $dbh->prepare($query);

Modified: trunk/LedgerSMB/JC.pm
===================================================================
--- trunk/LedgerSMB/JC.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/JC.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -68,7 +68,7 @@
 			       pr.production, pr.completed, 
 			       pr.parts_id AS project
 			  FROM jcitems j
-			  JOIN employee e ON (e.id = j.employee_id)
+			  JOIN employees e ON (e.id = j.employee_id)
 			  JOIN parts p ON (p.id = j.parts_id)
 			  JOIN project pr ON (pr.id = j.project_id)
 			 WHERE j.id = ?|;
@@ -483,7 +483,7 @@
 		  FROM jcitems j
 		  JOIN parts p ON (p.id = j.parts_id)
 		  JOIN project pr ON (pr.id = j.project_id)
-		  JOIN employee e ON (e.id = j.employee_id)
+		  JOIN employees e ON (e.id = j.employee_id)
 		 WHERE $where
 		ORDER BY employee, employeenumber, $sortorder|;
 

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/OE.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -84,8 +84,8 @@
 			m.name AS manager, o.curr, o.ponumber
 		FROM oe o
 		JOIN $form->{vc} ct ON (o.$form->{vc}_id = ct.id)
-		LEFT JOIN employee e ON (o.employee_id = e.id)
-		LEFT JOIN employee m ON (e.managerid = m.id)
+		LEFT JOIN employees e ON (o.employee_id = e.id)
+		LEFT JOIN employees m ON (e.managerid = m.id)
 		LEFT JOIN exchangerate ex 
 			ON (ex.curr = o.curr AND ex.transdate = o.transdate)
 		WHERE o.quotation = ?
@@ -138,7 +138,7 @@
 		}
 
 		$query .= qq|
-			LEFT JOIN employee e ON (o.employee_id = e.id)
+			LEFT JOIN employees e ON (o.employee_id = e.id)
 			LEFT JOIN exchangerate ex 
 				ON (ex.curr = o.curr 
 					AND ex.transdate = o.transdate)
@@ -796,7 +796,7 @@
 				o.ponumber
 			FROM oe o
 			JOIN $form->{vc} vc ON (o.$form->{vc}_id = vc.id)
-			LEFT JOIN employee e ON (o.employee_id = e.id)
+			LEFT JOIN employees e ON (o.employee_id = e.id)
 			LEFT JOIN department d ON (o.department_id = d.id)
 			WHERE o.id = ?|;
 		$sth = $dbh->prepare($query);

Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/PE.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -1499,7 +1499,7 @@
 		          p.partnumber
 		     FROM jcitems j
 		     JOIN project pr ON (pr.id = j.project_id)
-		     JOIN employee e ON (e.id = j.employee_id)
+		     JOIN employees e ON (e.id = j.employee_id)
 		     JOIN parts p ON (p.id = j.parts_id)
 		LEFT JOIN $form->{vc} c ON (c.id = pr.$form->{vc}_id)
 		    WHERE pr.parts_id IS NULL

Modified: trunk/LedgerSMB/RP.pm
===================================================================
--- trunk/LedgerSMB/RP.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/RP.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -2200,7 +2200,7 @@
 			     FROM acc_trans ac
 			     JOIN $form->{db} a ON (ac.trans_id = a.id)
 			     JOIN $table c ON (c.id = a.${table}_id)
-			LEFT JOIN employee e ON (a.employee_id = e.id)
+			LEFT JOIN employees e ON (a.employee_id = e.id)
 			          $dpt_join
 			    WHERE ac.chart_id = $ref->{id} $where|;
 
@@ -2227,7 +2227,7 @@
 				  FROM acc_trans ac
 				  JOIN gl g ON (g.id = ac.trans_id)
 				  LEFT 
-				  JOIN employee e ON (g.employee_id = e.id)
+				  JOIN employees e ON (g.employee_id = e.id)
 				       $dpt_join
 				 WHERE ac.chart_id = $ref->{id} $glwhere
 				       AND (ac.amount * $ml) > 0

Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm	2007-03-08 19:02:30 UTC (rev 865)
+++ trunk/LedgerSMB/User.pm	2007-03-08 19:18:07 UTC (rev 866)
@@ -185,7 +185,7 @@
 		# no error check for employee table, ignore if it does not exist
 		my $login = $self->{login};
 		$login =~ s/@.*//;
-		$query = qq|SELECT id FROM employee WHERE login = ?|;
+		$query = qq|SELECT id FROM employees WHERE login = ?|;
 		$sth = $dbh->prepare($query);
 		$sth->execute($login);
 
@@ -198,7 +198,7 @@
 					\%myconfig, "employeenumber", $dbh);
       
 			$query = qq|
-				INSERT INTO employee 
+				INSERT INTO employees 
 				            (login, employeenumber, name, 
 				            workphone, role)
 				     VALUES (?, ?, ?, ?, ?)|;
@@ -810,10 +810,10 @@
 			{AutoCommit => 0}) 
 				or $self->error($DBI::errstr);
 
-		# add login to employee table if it does not exist
+		# add login to employees table if it does not exist
 		my $login = $self->{login};
 		$login =~ s/@.*//;
-		my $sth = $dbh->prepare("SELECT id FROM employee WHERE login = ?;");
+		my $sth = $dbh->prepare("SELECT id FROM employees WHERE login = ?;");
 		$sth->execute($login);
 
 		my ($id) = $sth->fetchrow_array;
@@ -822,7 +822,7 @@
 		my @values;
 		if ($id) {
 
-			$query = qq|UPDATE employee SET
+			$query = qq|UPDATE employees SET
 			role = ?,
 			email = ?, 
 			name = ?
@@ -835,7 +835,7 @@
 			my ($employeenumber) = Form::update_defaults(
 				"", \%$self, "employeenumber", $dbh);
 			$query = qq|
-				INSERT INTO employee 
+				INSERT INTO employees 
 				            (login, employeenumber, name, 
 				            workphone, role, email, sales)
 				    VALUES (?, ?, ?, ?, ?, ?, '1')|;
@@ -863,7 +863,7 @@
   
 	my $login = $form->{login};
 	$login =~ s/@.*//;
-	my $query = qq|SELECT id FROM employee WHERE login = ?|; 
+	my $query = qq|SELECT id FROM employees WHERE login = ?|; 
 	my $sth = $dbh->prepare($query);
 	$sth->execute($login) || $form->dberror(__FILE__.':'.__LINE__.': '.$query);
   
@@ -871,7 +871,7 @@
 	$sth->finish;
 	
 	my $query = qq|
-		UPDATE employee 
+		UPDATE employees 
 		   SET login = NULL,
 		       enddate = current_date
 		 WHERE login = ?|;


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