End of day vs start of day.

Luis Alberto Zarrabeitia zarrabeitia at gmail.com
Mon Oct 11 23:55:31 EDT 2010


On Mon, Oct 11, 2010 at 3:47 PM, Luis Alberto Zarrabeitia
<zarrabeitia at gmail.com> wrote:
>
> I'm thinking either make it the report show the data for the
> last day of the month instead of the first, or even better, to show
> the data at the beginning of the day instead of at the end of the day.

Replying to myself: I edited the net-barchart.scm (actually, copied it
and created a new report based on it), and changed the net-renderer
function. In case anyone else needs it, here is the diff.

--- net-barchart.scm	2009-09-14 03:23:31.000000000 -0400
+++ net-barchart-startofday.scm	2010-10-11 19:49:30.000000000 -0400
@@ -24,7 +24,7 @@
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

-(define-module (gnucash report net-barchart))
+;commenting it out, otherwise it wont load. (why?)
+;(define-module (gnucash report net-barchart))

 (use-modules (srfi srfi-1))
 (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
@@ -179,8 +179,9 @@

          (dates-list ((if inc-exp? gnc:make-date-interval-list
                           gnc:make-date-list)
-                      ((if inc-exp? gnc:timepair-start-day-time
-                           gnc:timepair-end-day-time) from-date-tp)
+                      (gnc:timepair-start-day-time from-date-tp)
                       (gnc:timepair-end-day-time to-date-tp)
                       (gnc:deltasym-to-delta interval)))
 	 (report-title (get-option gnc:pagename-general
@@ -420,7 +421,7 @@
 ;; Here we define the actual report
 (gnc:define-report
  'version 1
- 'name (N_ "Net Worth Barchart")
+ 'name (N_ "Net Worth Barchart - Start of Day")
  'menu-path (list gnc:menuname-asset-liability)
  'options-generator (lambda () (options-generator #f))
  'renderer (lambda (report-obj) (net-renderer report-obj #f)))


More information about the gnucash-user mailing list