summaryrefslogtreecommitdiff
path: root/LedgerSMB/HR.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/HR.pm')
-rw-r--r--LedgerSMB/HR.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/LedgerSMB/HR.pm b/LedgerSMB/HR.pm
index c9869e15..105a4365 100644
--- a/LedgerSMB/HR.pm
+++ b/LedgerSMB/HR.pm
@@ -44,7 +44,7 @@ sub get_employee {
my $notid = "";
if ( $form->{id} ) {
- $query = qq|SELECT e.* FROM employees e WHERE e.id = ?|;
+ $query = qq|SELECT e.* FROM employee e WHERE e.id = ?|;
$sth = $dbh->prepare($query);
$sth->execute( $form->{id} )
|| $form->dberror( __FILE__ . ':' . __LINE__ . ':' . $query );
@@ -63,7 +63,7 @@ sub get_employee {
# get manager
$form->{managerid} *= 1;
- $sth = $dbh->prepare("SELECT name FROM employees WHERE id = ?");
+ $sth = $dbh->prepare("SELECT name FROM employee WHERE id = ?");
$sth->execute( $form->{managerid} );
( $form->{manager} ) = $sth->fetchrow_array;
@@ -79,7 +79,7 @@ sub get_employee {
# get managers
$query = qq|
SELECT id, name
- FROM employees
+ FROM employee
WHERE sales = '1'
AND role = 'manager'
$notid
@@ -107,11 +107,11 @@ sub save_employee {
my $uid = localtime;
$uid .= "$$";
- $query = qq|INSERT INTO employees (name) VALUES ('$uid')|;
+ $query = qq|INSERT INTO employee (name) VALUES ('$uid')|;
$dbh->do($query)
|| $form->dberror( __FILE__ . ':' . __LINE__ . ':' . $query );
- $query = qq|SELECT id FROM employees WHERE name = '$uid'|;
+ $query = qq|SELECT id FROM employee WHERE name = '$uid'|;
$sth = $dbh->prepare($query);
$sth->execute
|| $form->dberror( __FILE__ . ':' . __LINE__ . ':' . $query );
@@ -129,7 +129,7 @@ sub save_employee {
if !$form->{employeenumber};
$query = qq|
- UPDATE employees
+ UPDATE employee
SET employeenumber = ?,
name = ?,
address1 = ?,
@@ -180,7 +180,7 @@ sub delete_employee {
# delete employee
my $query = qq|
- DELETE FROM employees
+ DELETE FROM employee
WHERE id = | . $dbh->quote( $form->{id} );
$dbh->do($query)
|| $form->dberror( __FILE__ . ':' . __LINE__ . ':' . $query );
@@ -232,8 +232,8 @@ sub employees {
my $query = qq|
SELECT e.*, m.name AS manager
- FROM employees e
- LEFT JOIN employees m ON (m.id = e.managerid)
+ FROM employee e
+ LEFT JOIN employee m ON (m.id = e.managerid)
WHERE $where
ORDER BY $sortorder|;