summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-12-07 23:23:07 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-12-07 23:23:07 +0000
commit5e745821a5bb8610c342073cfd97a63380f8538f (patch)
treebd6d4deae5b5e75b51636fec315db0f3779726e7 /LedgerSMB
parentdee2efb4095eea720dba50fb1115dd41b3f2be14 (diff)
Fix date undefs for editing employees
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@745 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm2
-rwxr-xr-xLedgerSMB/HR.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index da95f509..dce093c3 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -2854,6 +2854,8 @@ sub update_defaults {
}
sub db_prepare_vars {
+ my $self = shift;
+
for (@_){
if (!$self->{$_} and $self->{$_} ne "0"){
undef $self->{$_};
diff --git a/LedgerSMB/HR.pm b/LedgerSMB/HR.pm
index 1b9d0ad5..0b08b13f 100755
--- a/LedgerSMB/HR.pm
+++ b/LedgerSMB/HR.pm
@@ -154,7 +154,7 @@ sub save_employee {
managerid = ?
WHERE id = ?|;
$sth = $dbh->prepare($query);
- $form->db_prepare_vars('startdate', 'enddate');
+ $form->db_prepare_vars('dob', 'startdate', 'enddate');
$sth->execute(
$form->{employeenumber}, $form->{name}, $form->{address1},
$form->{address2}, $form->{city}, $form->{state},