[Gnucash-changes] r13199 - gnucash/trunk/src/app-utils - Change the reports from using a hard-coded fiscal year to using the global

Chris Shoemaker c.shoemaker at cox.net
Sat Feb 11 12:16:15 EST 2006


On Sat, Feb 11, 2006 at 10:08:28AM -0500, Derek Atkins wrote:
> A couple of issues with this change:
> 
> 1) I think users want the ability to report on both the "current"
>    accounting period as well as the "previous" accounting period.
>    This patch removes the ability to do that.

It never offered an arbitrary "previous" accounting period.  Just
exactly one year before the beginning of the hard-coded fiscal year
start.  Now, users can set the accounting period to any arbitrary
period, either the current or in the past, and use that interval for
all reports.

If they want to run simultaneous reports using two different
accounting periods its probably safest and most useful to make them
choose the second interval explicitly in the other report.  I don't
think we should try to guess when the previous accounting period
started based on when the current one started - it's not reliable and
it's just as easy for the user to set it explicitly and get exactly
what they want.


> 2) Users who had reports that had "current/previous financial year"
>    set will now crash (or at least fail to load properly) because
>    their option setting wont be available.  If we care about report
>    migration from 1.8->2.0 we need to handle that somehow.  If we
>    don't care then we just need to make sure that reports generated
>    with this option in 1.8 don't crash during the migration to 2.0.

I think the goal is that old reports don't crash new gnucash, but it's
ok for a migrated report to either a) just not re-open or b) open with
an error message, requiring the user to reset the options for that
report.  I thought that this change fell into case b).

> > -/* Convenience routines that take care of getting the fiscal
> > -   accounting period from the preferences and returning the start and
> > -   end times. */
> > +/* Get the fiscal accounting period from the preferences and return
> > +   the start and end times. */
> >  time_t gnc_accounting_period_fiscal_start(void);
> >  time_t gnc_accounting_period_fiscal_end(void);
> 
> I'm wondering if this should be a doxygen comment?  I'm also wondering
> if we want to use a time_t or a Timespec for these functions...

Well, they're stored as int in gconf.

> 
> I'm concerned that these return a <gw:int>..  It has a Y2038 bug.
> 
> 
> At some level I think this is fine, but I'm worried about report
> migration.

I'll retest some old reports.

-chris


More information about the gnucash-devel mailing list