diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-22 19:04:36 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-22 19:04:36 +0000 |
commit | 698ebe13e673ffc265b2b38a8279cc77d0386958 (patch) | |
tree | ecc5faab9b9d7e12a4ae401f31c0690aa3985f7f /LedgerSMB | |
parent | 74f5a2e0506f7fe6981aa7076988d6abdcf65763 (diff) |
Fixing editing of saved projects (bugfix to bugfix)
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1309 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/PE.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/PE.pm b/LedgerSMB/PE.pm index 4e17360c..377a1c52 100755 --- a/LedgerSMB/PE.pm +++ b/LedgerSMB/PE.pm @@ -236,8 +236,10 @@ sub save_project { $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; |