Re: Questions about reports

2002-02-22 Thread Derek Atkins

I agree that these types of Account queries would be useful -- it
would be useful to me, too ;) I may get to it some day, or I may just
hard-code 'income' and 'expense' types into my work.

If you're interested, patches would be accepted ;)

-derek

Martijn van Oosterhout <[EMAIL PROTECTED]> writes:

> On Fri, Feb 22, 2002 at 05:54:44PM -0500, Derek Atkins wrote:
> > Christian Stimming <[EMAIL PROTECTED]> writes:
> > 
> > > And anyway, new account types don't get added that often (IIRC
> > > none during the last 3 years), so you wouldn't need to worry too
> > > much about that.
> > 
> > Actually, this is false..  I added Accounts-Payable and
> > Accounts-Receivable account-types in CVS.
> 
> This is exactly the problem. Perhaps there should be a account-get-base-type
> which returns one of asset, liability, income, expense or equity. Or
> predicates (like account-is-asset?). Instead of each report trying to work
> it out for themselves.
> 
> There already are account-is-stock?, account-has-shares? and
> account-is-inc-exp?.
> -- 
> Martijn van Oosterhout <[EMAIL PROTECTED]>
> http://svana.org/kleptog/
> > If the company that invents a cure for AIDS is expected to make their
> > money back in 17 years, why can't we ask the same of the company that
> > markets big-titted lip-syncing chicks and goddamn cartoon mice?

-- 
   Derek Atkins
   Computer and Internet Security Consultant
   [EMAIL PROTECTED] www.ihtfp.com
___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Questions about reports

2002-02-22 Thread Martijn van Oosterhout

On Fri, Feb 22, 2002 at 05:54:44PM -0500, Derek Atkins wrote:
> Christian Stimming <[EMAIL PROTECTED]> writes:
> 
> > And anyway, new account types don't get added that often (IIRC
> > none during the last 3 years), so you wouldn't need to worry too
> > much about that.
> 
> Actually, this is false..  I added Accounts-Payable and
> Accounts-Receivable account-types in CVS.

This is exactly the problem. Perhaps there should be a account-get-base-type
which returns one of asset, liability, income, expense or equity. Or
predicates (like account-is-asset?). Instead of each report trying to work
it out for themselves.

There already are account-is-stock?, account-has-shares? and
account-is-inc-exp?.
-- 
Martijn van Oosterhout <[EMAIL PROTECTED]>
http://svana.org/kleptog/
> If the company that invents a cure for AIDS is expected to make their
> money back in 17 years, why can't we ask the same of the company that
> markets big-titted lip-syncing chicks and goddamn cartoon mice?
___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Questions about reports

2002-02-22 Thread Derek Atkins

Christian Stimming <[EMAIL PROTECTED]> writes:

> And anyway, new account types don't get added that often (IIRC
> none during the last 3 years), so you wouldn't need to worry too
> much about that.

Actually, this is false..  I added Accounts-Payable and
Accounts-Receivable account-types in CVS.

> Christian

-derek

-- 
   Derek Atkins
   Computer and Internet Security Consultant
   [EMAIL PROTECTED] www.ihtfp.com
___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Questions about reports

2002-02-22 Thread Christian Stimming

-BEGIN PGP SIGNED MESSAGE-

On Friday 22 February 2002 09:03, Martijn van Oosterhout wrote:
> 2. I want my report to do slightly different things depending on whether
> something is an income or expense account. I see gnc:account-get-type
> except that there are several kinds of expense accounts and several types
> of income accounts. I could list the various types and use member to
> identify them, but this would break if a new type was added.

All the other existing account types in Gnucash besides income and expense 
actually are neither income nor expense accounts. The other account types are 
all some variant of an asset or liability (or equity) account. So by testing 
(member '(income expense)) you should be on the safe side. And anyway, new 
account types don't get added that often (IIRC none during the last 3 years), 
so you wouldn't need to worry too much about that.

Christian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iQCVAwUBPHabQ2XAi+BfhivFAQGXjgP/c1QfYaQwdi902yuyhY6Sen1mOTo+C53t
9UpKP3IpDBrmaO9k7mRohfG6+MXD5KlIGH5FH7y4e32kGYdhbUmdupM0u6clVAaQ
w04wtWyKvyTZi2zp2MMn5sTIkVwvAheefKfxUeL2DRSw211wNXsySRGkbdk5nFNH
2XdHae/ERig=
=dCsb
-END PGP SIGNATURE-
___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel