"Start of previous accounting period" data option for reports

Graham Menhennitt graham at menhennitt.com.au
Sun Jan 16 00:09:09 EST 2011


Guys,

I want to be able to run reports based on the previous accounting
period. Up till now, I've done this by setting the accounting period to
absolute dates. It's finally bugged me enough to try adding this option
to the GnuCash source code. So I looked in gnc-period-select.c and found
that it's already there! "Start of previous accounting period" is
already in the start_strings array. But it's not shown in the combo on
the General tab of the Transaction report options. Is this a bug or is
there some reason for it?

Also, I noticed in that same source file in function
gnc_period_select_set_fy_end() the following chunk of code:
        for (i = GNC_ACCOUNTING_PERIOD_FYEAR_LAST - 1; i >=
GNC_ACCOUNTING_PERIOD_FYEAR_LAST; i--)
        {
            gtk_combo_box_remove_text(GTK_COMBO_BOX(priv->selector), i);
        }
That loop is never going to do anything!! But I'm not sure what it's
trying to do anyway. Can somebody please explain the reason for it being
there.

I'd also like to add the option to have accounting periods start on July
1 and end on June 30. I'll make a patch for that when I sort out the above.

Thanks,
    Graham


More information about the gnucash-devel mailing list