[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [629] trunk/LedgerSMB/PE.pm



Revision: 629
          http://svn.sourceforge.net/ledger-smb/?rev=629&view=rev
Author:   tetragon
Date:     2006-11-15 16:48:16 -0800 (Wed, 15 Nov 2006)

Log Message:
-----------
Fix project creation with NULL dates

Modified Paths:
--------------
    trunk/LedgerSMB/PE.pm

Modified: trunk/LedgerSMB/PE.pm
===================================================================
--- trunk/LedgerSMB/PE.pm	2006-11-16 00:36:09 UTC (rev 628)
+++ trunk/LedgerSMB/PE.pm	2006-11-16 00:48:16 UTC (rev 629)
@@ -212,6 +212,10 @@
 	$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 @@
 	$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');
   


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.