saving budgets
Chris Shoemaker
c.shoemaker at cox.net
Mon Dec 27 07:44:23 EST 2004
On Fri, Dec 24, 2004 at 06:17:49PM -0500, Derek Atkins wrote:
> Chris Shoemaker <c.shoemaker at cox.net> writes:
>
> > The current budget design seems to assume that created budgets will
> > live with the accounts. (There's no mechanism for saving or
> > retrieving budgets from files.) This makes sense since a budget seems
> > pretty strictly dependent on the account heirarchy.
> >
> > So, if no one else is working on it, I'm considering trying to store
> > the budget in the same place that the accounts are stored. (I haven't
> > looked into the details, yet.) Any comments?
>
> You should add a new XML data type into src/backend/file/ and hook the
> budget objects and save them in the book. Don't worry about QOF or
> QSF, that's long-enough away that we shouldn't depend on it, and even
> when it comes Gnucash is not going to use it internally, only as an
> import/export format, not the main data format.
>
> Just create the necessary GnuCash XML for the budget objects. I was
> hoping that Darin would finish that, but he's been busy.
>
Thanks for clarifying, Derek. Here's a brief status: I think I've
achieved persistence of at least part of the budget -- basically, all
but the inflow and outflow budgetCategories. So far, a budget looks
like:
<gnc:budget version="2.0.0">
<bgt:name>qaaaaa</bgt:name>
<bgt:description>wwwwww</bgt:description>
<bgt:start-date>
<gdate>2004-12-27</gdate>
</bgt:start-date>
<bgt:period-frequency>
<gnc:freqspec version="1.0.0">
<fs:id type="guid">2d442362a9890d7c25f76e7f4c301aa6</fs:id>
<fs:ui_type>monthly</fs:ui_type>
<fs:monthly>
<fs:interval>1</fs:interval>
<fs:offset>0</fs:offset>
<fs:day>27</fs:day>
</fs:monthly>
</gnc:freqspec>
</bgt:period-frequency>
<bgt:length-months>12</bgt:length-months>
</gnc:budget>
-chris
More information about the gnucash-devel
mailing list