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

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



Revision: 1309
          http://svn.sourceforge.net/ledger-smb/?rev=1309&view=rev
Author:   einhverfr
Date:     2007-06-22 12:04:36 -0700 (Fri, 22 Jun 2007)

Log Message:
-----------
Fixing editing of saved projects (bugfix to bugfix)

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

Modified: branches/1.2/LedgerSMB/PE.pm
===================================================================
--- branches/1.2/LedgerSMB/PE.pm	2007-06-22 19:04:24 UTC (rev 1308)
+++ branches/1.2/LedgerSMB/PE.pm	2007-06-22 19:04:36 UTC (rev 1309)
@@ -236,8 +236,10 @@
     $sth->execute( $form->{projectnumber},
         $form->{description}, $startdate, $enddate, $form->{customer_id} )
       || $form->dberror($query);
-    $query = "SELECT currval('id')";
-    ($form->{id}) = $dbh->selectrow_array($query) || $form->dberror($query);
+    if (!$form->{id}){
+        $query = "SELECT currval('id')";
+        ($form->{id}) = $dbh->selectrow_array($query) || $form->dberror($query);
+    }
     $form->run_custom_queries( 'project', 'UPDATE' );
 
     $dbh->commit;


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