A user does an import (was Re: New transaction matcher)

Benoit Grégoire bock@step.polymtl.ca
Tue, 26 Nov 2002 14:54:51 -0500


> Now personally, I'd love for the ability to 'copy' an existing
> transaction. That way I could use an existing transaction as a template,
> use the date from the downloaded one and the amount and have the splits
> and split amounts already assigned. I would use this to go through new
> transactions and make copies of old ones that are the same. This would
> save me a bunch of time editing the register.

Humm, interesting idea.  There are many ways we could approach this.  The way 
I would is:

-Use the Memo field of the last split that was used to create the matching 
string entry in the destination split account finder.  If available that 
description would be copied in the Memo field of the split auto-created to 
balance a transaction.

-That idea could be extended to be used once there is the possibility to pop a 
register to manually edit an imported transaction.

Both would require a
Transaction * gnc_imap_find_last_trans (GncImportMatchMap *imap, const char 
*category, const char *key)
 to be added to gnc-import-match-map.h, and 
void gnc_imap_add_account (GncImportMatchMap *imap, const char *category,
			   const char *key, Account *acc)
woud become:
void gnc_imap_add_account (GncImportMatchMap *imap, const char *category,
			   const char *key, Account *acc, Transaction *last_trans)
with last_trans allowed to be NULL.