diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-16 00:49:18 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-16 00:49:18 +0000 |
commit | cc6fa2967c2e04249cea01cacba5a60f74c8f14b (patch) | |
tree | fde433f6a35495b98d8f24ff3fa68333c66e3b24 /LedgerSMB/PE.pm | |
parent | 6d2885d6cad85266e7eb1f956b64fb66c8e4731b (diff) |
Fix creation of projects with NULL dates
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@630 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/PE.pm')
-rwxr-xr-x | LedgerSMB/PE.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/LedgerSMB/PE.pm b/LedgerSMB/PE.pm index fe84ed1d..58d7a6cf 100755 --- a/LedgerSMB/PE.pm +++ b/LedgerSMB/PE.pm @@ -212,6 +212,10 @@ sub save_project { $form->{projectnumber} = $form->update_defaults($myconfig, "projectnumber", $dbh) unless $form->{projectnumber}; + my $enddate; + my $startdate; + $enddate = $form->{enddate} if $form->{enddate}; + $startdate = $form->{startdate} if $form->{startdate}; if ($form->{id}) { @@ -233,7 +237,7 @@ sub save_project { $sth = $dbh->prepare($query); $sth->execute( $form->{projectnumber}, $form->{description}, - $form->{startdate}, $form->{enddate}, $form->{customer_id} + $startdate, $enddate, $form->{customer_id} ) || $form->dberror($query); $form->run_custom_queries('project', 'UPDATE'); |