summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-16 00:48:16 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-16 00:48:16 +0000
commit4dd9f147aa40741c5f70214d20fd1b2031348b6c (patch)
treefde433f6a35495b98d8f24ff3fa68333c66e3b24
parent590f3c6ccd6d4e51597a406237d1556cd646d7cc (diff)
Fix project creation with NULL dates
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@629 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/PE.pm6
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');