summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-01-23 06:53:58 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-01-23 06:53:58 +0000
commitecae360a86f69d25f4f2191b214ba7e333f72768 (patch)
tree8be0c57b1be904c549a92e4769289e4479524dc2 /LedgerSMB
parent96808a9c77cc75e8833358a16868bd67b73013d1 (diff)
Fixed date NULL issues in HR.pm
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@777 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm1
-rwxr-xr-xLedgerSMB/HR.pm4
2 files changed, 4 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 65923296..9561f7de 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -2856,6 +2856,7 @@ sub db_prepare_vars {
for (@_){
if (!$self->{$_} and $self->{$_} ne "0"){
+ print "Undef'ing $_";
undef $self->{$_};
}
}
diff --git a/LedgerSMB/HR.pm b/LedgerSMB/HR.pm
index 0b08b13f..186ac752 100755
--- a/LedgerSMB/HR.pm
+++ b/LedgerSMB/HR.pm
@@ -154,7 +154,9 @@ sub save_employee {
managerid = ?
WHERE id = ?|;
$sth = $dbh->prepare($query);
- $form->db_prepare_vars('dob', 'startdate', 'enddate');
+ $form->{dob} ||= undef;
+ $form->{startdate} ||= undef;
+ $form->{enddate} ||= undef;
$sth->execute(
$form->{employeenumber}, $form->{name}, $form->{address1},
$form->{address2}, $form->{city}, $form->{state},