diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-07 23:25:10 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-07 23:25:10 +0000 |
commit | d60831b891c8aef8ef9c5e8555a83d6d9638200d (patch) | |
tree | 486ca544c322fbd29d50e34904b1290096e3171b | |
parent | 2ed61e5b25fe87fa7e4cd638d2d2ead2735ab0ed (diff) |
Fix date undefs for HR.pm
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@746 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/Form.pm | 2 | ||||
-rwxr-xr-x | LedgerSMB/HR.pm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 44e4a0e1..2c5d3f3b 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -2861,6 +2861,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}, |