mini-ANNOUNCE: auto gain/loss scrubbing implemented
warlord at MIT.EDU
Sun Apr 6 15:31:01 CDT 2003
linas at linas.org (Linas Vepstas) writes:
> > I admit that I haven't looked at this, yet. Is this "trading account"
> > a flag on an account? Or is it a new account type?
> Neither. During scrub, its a search through all transactions in an account:
> if I find a (transaction->currency != account->commodity) then use lots,
> else not.
You do this search every time? Is the answer at least cached during a
> > I've come to realize that certain other types of accounts also would
> > do well with lot support. For example, credit card accounts would do
> > well in order to keep track of which items have been paid and which
> > not. Similarly, A/R and A/P (which is currently using lots) need the
> > same information. Asset accounts could use it for Asset Tracking
> > (depreciation).
> Yes, but I think this is waiting on a GUI.
> For which I have a proposal, see next email.
> > > -- automaitcally assign splits to 'lots'. A lot is opened by putting
> > > a split into it. All subsequent splits added to it must decrease
> > > its 'amount' balance to zero. When a lot hits zero balance, it is
> > > 'closed'. (see src/doc/lots.txt)
> > How would this work with "pre-payments" (or over-payments)? Currently
> > I handle pre-payment as an open lot with a negative balance instead of
> > a positive balance. During the payment processing, if a payment would
> > take an existing lot negative then it get's auto-split into a new lot
> > and so on (the one split becomes many splits).
> Yes. That's how the scrub routine does it.
> BTW, if you scrub 'all accounts', I guess I can potentially damage
> some of your invoices (or not ?). I'd like to get you to test this out.
Well, the actual invoice data itself is stored outside the CoA.
However if you go around changing some of the transactions created by
by the post-invoice process, it might screw up some of the
cross-links. In particular, the actual invoice transaction (and it's
lot) are saved in the invoice (and back-pointers to the invoice are in
the txn kvp).
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 at MIT.EDU PGP key available
More information about the gnucash-devel