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

Derek Atkins warlord@MIT.EDU
26 Nov 2002 15:15:06 -0500


Benoit Gr=E9goire <bock@step.polymtl.ca> writes:

> Humm, interesting idea.  There are many ways we could approach this.  The=
 way=20
> I would is:
>=20
> -Use the Memo field of the last split that was used to create the matchin=
g=20
> string entry in the destination split account finder.  If available that=
=20
> description would be copied in the Memo field of the split auto-created t=
o=20
> balance a transaction.

What do you mean by "last split"?  Splits really don't have a real
order to them, necessarily, within a transaction (or at best the order
is arbitrary).

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

_THIS_ might be a cool idea!  An embedded register would be possible.
Look at how the SX editor does it.

> Both would require a
> Transaction * gnc_imap_find_last_trans (GncImportMatchMap *imap, const ch=
ar=20
> *category, const char *key)
>  to be added to gnc-import-match-map.h, and=20
> 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.

I'm trying to think of what this would do, and how it would be
implemented.  Currently the code is just storing GUIDs in the KVP, but
the GUID is assumed to be an Account.  I could store a Transaction,
too, I suppose -- I would either need another tree, or some way to
differentiate a Txn from an Account.

-derek

--=20
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available