git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4499 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2001-06-07 02:39:27 +00:00
parent ae1f30e87f
commit 9419e5fe90
2 changed files with 8 additions and 2 deletions

View File

@ -702,7 +702,13 @@ pgendStoreTransactionNoLock (PGBackend *be, Transaction *trans,
p = guid_to_string_buff (xaccSplitGetGUID(s), p);
p = stpcpy (p, "';\n");
}
pgendStoreAuditTransaction (be, trans, SQL_DELETE);
/* If this trans is marked for deletetion, use the 'orig' values
* as the base for recording the audit. This wouldn't be normally
* reqquired, except that otherwise one gets a trashed currency
* value.
*/
pgendStoreAuditTransaction (be, trans->orig, SQL_DELETE);
p = be->buff;
p = stpcpy (p, "DELETE FROM gncTransaction WHERE transGuid='");
p = guid_to_string_buff (xaccTransGetGUID(trans), p);

View File

@ -545,7 +545,7 @@ pgendKVPDeleteStr (PGBackend *be, const char *guid)
iguid = pgendGetGUIDCacheIDStr (be, guid);
if (0 == iguid) return;
sprintf (iguid_str, "%d;", iguid);
sprintf (iguid_str, "%d;\n", iguid);
guid_to_string_buff (be->sessionGuid, sess_str);
/* first, copy values to the audit tables */