On Tue, 2001-11-27 at 14:22, Derek Atkins wrote: > Is there some way to dynamically change the current cursor "on the > fly"? For instance, what I'd like to do is setup the A/R,A/P ledgers > to look something like this: > > <Date> <type> <Due Date> <Number> <Desc> <Account> <Paid> <Deb> <Cred> <Bal> > > The <type> is limited to a choice of "invoice" or "payment". If the > type is set to "invoice", then all of the fields are active except the > appropriate Deb/Cred field for the type of account (payable or > receivable). > > If the type is set to "payment", then the due date is inactive and > cleared, 'paid' is automatically set to 'y', and only the appropriate > Deb/Cred field is active. (The rest should remain active as usual). > > So the question is, how can I easily make this dynamic cursor based on > the <type> entry? Can the ledger code handle something like this? Or > do I have to live with the possibility of someone entering fields > improperly and just let them shoot themselves in the foot?
You can do this easily. Check out split-register-model.c:1250 where the debit/credit fields are made editable/non-editable based on whether you are editing a stock split transaction or not. dave
msg01689/pgp00000.pgp
Description: PGP signature