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

SF.net SVN: ledger-smb: [630] branches/1.2/LedgerSMB/PE.pm



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

Log Message:
-----------
Fix creation of projects with NULL dates

Modified Paths:
--------------
    branches/1.2/LedgerSMB/PE.pm

Modified: branches/1.2/LedgerSMB/PE.pm
===================================================================
--- branches/1.2/LedgerSMB/PE.pm	2006-11-16 00:48:16 UTC (rev 629)
+++ branches/1.2/LedgerSMB/PE.pm	2006-11-16 00:49:18 UTC (rev 630)
@@ -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.