New enhancement to balance-sheet report

Yogesh Agrawal agrawaly at
Fri Mar 28 00:34:49 EDT 2008

On Thu, Mar 27, 2008 at 4:20 PM, Andrew Sackville-West <
andrew at> wrote:

> On Thu, Mar 27, 2008 at 02:00:47PM -0700, Yogesh Agrawal wrote:
> > Perfect,  Yes I have looked into the advance portfolio, and saw the code
> for
> > basis calculation.
> > 1) Where should I start on that code?
> I would say that the whole basis calculation should be carved out into
> a couple of functions that return the basis at a particular time using
> the different methods (FIFO, FILO etc).

I don't know how helpful it will be to have a separate method for this, can
we start with
the existing basis-builder method and slowly break it to different methods.

> > 2) How do you want me to put the basis calculations into a separate
>  library?
> just like any of the other libraries in src/report/utility-reports/
> look at that various html-*.scm files therein and follow that model.

Hi Andrew,

I have gone through the advanced-portfolio report, and these are things that
I think I have to do:

1) Take off the method basis-builder from it and move it to *-utilities.scm,

I think it can be moved to commodities-utilities.scm as basis calculation is
mostly for the
commodities ( Correct me if I am wrong here)

2) When we move this method the signature of the method will change to
and have to make changes to advance portfolio to call this method.

> I'll maybe have some time to look at this later today and give some
> more specific guidance.
> The trick is that part of the functionality that is needed is *not*
> included in those functions but is provided in the code that calls
> them, so they need to be beefed up a bit and can't just be copy-pasted
> in.

I am still trying to figure this out.

> A
> Version: GnuPG v1.4.6 (GNU/Linux)
> iD8DBQFH7CvLaIeIEqwil4YRAtc3AJ4/Z9rVM0VS8nePtjTENNFP5oKfswCeJB55
> =upDP
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at

More information about the gnucash-devel mailing list