*** empty log message ***
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2075 57a11ea4-9604-0410-9ed3-97b8803252fd
BIN
Docs/fr/pix/appr-asset1.gif
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Docs/fr/pix/appr-asset2.gif
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
Docs/fr/pix/appr-income.gif
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
Docs/fr/pix/appr-main1.gif
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
Docs/fr/pix/appr-main2.gif
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
Docs/fr/pix/depr-asset.gif
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
Docs/fr/pix/depr-main.gif
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
Docs/fr/pix/regwin-single2.gif
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
Docs/fr/pix/report-option.gif
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
Docs/fr/pix/reportwin.gif
Normal file
After Width: | Height: | Size: 43 KiB |
@ -87,6 +87,12 @@
|
|||||||
gnc:*debugging?*
|
gnc:*debugging?*
|
||||||
(gnc:config-var-value-get gnc:*debugging?*)))
|
(gnc:config-var-value-get gnc:*debugging?*)))
|
||||||
|
|
||||||
|
(define (gnc:setup-debugging)
|
||||||
|
(if (gnc:debugging?)
|
||||||
|
(debug-enable 'backtrace)))
|
||||||
|
|
||||||
|
(gnc:setup-debugging)
|
||||||
|
|
||||||
|
|
||||||
;;;; Status output functions.
|
;;;; Status output functions.
|
||||||
|
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
(display "\n\n" port)))))
|
(display "\n\n" port)))))
|
||||||
(false-if-exception
|
(false-if-exception
|
||||||
(apply display-error #f port args))
|
(apply display-error #f port args))
|
||||||
;; Here we should write the stack trace.
|
(display-backtrace (fluid-ref the-last-stack) port))
|
||||||
)
|
|
||||||
|
|
||||||
(false-if-exception
|
(false-if-exception
|
||||||
(call-with-output-string write-error)))
|
(call-with-output-string write-error)))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;; -*-scheme-*-
|
;; -*-scheme-*-
|
||||||
;; $ID$
|
;; $Id$
|
||||||
;; dateutils.scm
|
;; dateutils.scm
|
||||||
;; date utility functions. mainly used by budget
|
;; date utility functions. mainly used by budget
|
||||||
;; Bryan Larsen (blarsen@ada-works.com)
|
;; Bryan Larsen (blarsen@ada-works.com)
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
(if (not (gnc:handle-command-line-args))
|
(if (not (gnc:handle-command-line-args))
|
||||||
(gnc:shutdown 1))
|
(gnc:shutdown 1))
|
||||||
|
|
||||||
|
(gnc:setup-debugging)
|
||||||
|
|
||||||
;; Load the srfis
|
;; Load the srfis
|
||||||
(gnc:load "srfi/srfi-8.guile.scm")
|
(gnc:load "srfi/srfi-8.guile.scm")
|
||||||
(gnc:load "srfi/srfi-1.unclear.scm")
|
(gnc:load "srfi/srfi-1.unclear.scm")
|
||||||
|
@ -19,13 +19,14 @@
|
|||||||
|
|
||||||
;; Options
|
;; Options
|
||||||
(define (runavg-options-generator)
|
(define (runavg-options-generator)
|
||||||
(let
|
(let*
|
||||||
((gnc:*runavg-track-options* (gnc:new-options))
|
((gnc:*runavg-track-options* (gnc:new-options))
|
||||||
;; register a configuration option for the report
|
;; register a configuration option for the report
|
||||||
(gnc:register-runavg-option
|
(gnc:register-runavg-option
|
||||||
(lambda (new-option)
|
(lambda (new-option)
|
||||||
(gnc:register-option gnc:*runavg-track-options*
|
(gnc:register-option gnc:*runavg-track-options*
|
||||||
new-option))))
|
new-option))))
|
||||||
|
|
||||||
;; from date
|
;; from date
|
||||||
(gnc:register-runavg-option
|
(gnc:register-runavg-option
|
||||||
(gnc:make-date-option
|
(gnc:make-date-option
|
||||||
@ -177,15 +178,14 @@
|
|||||||
(gl-accumulator (makedrcr-collector))
|
(gl-accumulator (makedrcr-collector))
|
||||||
(bals av)
|
(bals av)
|
||||||
(prevdate 0))
|
(prevdate 0))
|
||||||
;;; procvals goes away
|
|
||||||
;;; accbal runs the accumulator
|
;; accbal runs the accumulator
|
||||||
(define (accbal beg end)
|
(define (accbal beg end)
|
||||||
(let ((curbal (vector-sum (car (cdr (av 'x 0))))))
|
(let ((curbal (vector-sum (car (cdr (av 'x 0))))))
|
||||||
(stat-accumulator 'add (gnc:timepair-delta beg end))))
|
(stat-accumulator 'add (gnc:timepair-delta beg end))))
|
||||||
|
|
||||||
(define (calc-in-interval d tl)
|
(define (calc-in-interval d tl)
|
||||||
(cond ((not (null? tl))
|
(cond ((not (null? tl))
|
||||||
|
|
||||||
(let* ((bd (dl:begin d)) ; begin date
|
(let* ((bd (dl:begin d)) ; begin date
|
||||||
(ed (dl:end d)) ; end date
|
(ed (dl:end d)) ; end date
|
||||||
(cs (car tl)) ; current split
|
(cs (car tl)) ; current split
|
||||||
@ -195,41 +195,36 @@
|
|||||||
|
|
||||||
(cond ((gnc:timepair-later cd bd) ;split before interval
|
(cond ((gnc:timepair-later cd bd) ;split before interval
|
||||||
(bals 'put an (gnc:split-get-balance cs))
|
(bals 'put an (gnc:split-get-balance cs))
|
||||||
(calc-in-interval d (cdr tl))
|
(calc-in-interval d (cdr tl)))
|
||||||
)
|
|
||||||
|
|
||||||
((gnc:timepair-later cd ed) ;split is in the interval
|
((gnc:timepair-later cd ed) ;split is in the interval
|
||||||
(accbal prevdate cd)
|
(accbal prevdate cd)
|
||||||
(procvals)
|
|
||||||
(bals 'put an (gnc:split-get-balance cs))
|
(bals 'put an (gnc:split-get-balance cs))
|
||||||
|
|
||||||
(let ((val (gnc:split-get-value cs)))
|
(let ((val (gnc:split-get-value cs)))
|
||||||
(gl-accumulator 'add val))
|
(gl-accumulator 'add val))
|
||||||
(procvals) ; catch all cases
|
|
||||||
(set! prevdate cd)
|
(set! prevdate cd)
|
||||||
(calc-in-interval d (cdr tl)))
|
(calc-in-interval d (cdr tl)))
|
||||||
|
|
||||||
(else ; Past interval, nothing to do?
|
(else ; Past interval, nothing to do?
|
||||||
(accbal prevdate ed)
|
(accbal prevdate ed)
|
||||||
(procvals)
|
|
||||||
tl))))
|
tl))))
|
||||||
(else ; Out of data !
|
(else ; Out of data !
|
||||||
(accbal prevdate (dl:end d))
|
(accbal prevdate (dl:end d))
|
||||||
(procvals)
|
|
||||||
tl)))
|
tl)))
|
||||||
|
|
||||||
;; Actual routine
|
;; Actual routine
|
||||||
(cond ((null? dl) '());; End of recursion
|
(cond ((null? dl) '());; End of recursion
|
||||||
(else
|
(else
|
||||||
(let* ((bd (dl:begin (car dl)))
|
(let ((bd (dl:begin (car dl)))
|
||||||
(ed (dl:end (car dl))) )
|
(ed (dl:end (car dl))))
|
||||||
|
|
||||||
;; Reset valaccumulator values
|
;; Reset valaccumulator values
|
||||||
(set! prevdate bd)
|
(set! prevdate bd)
|
||||||
(stat-accumulator 'reset #f)
|
(stat-accumulator 'reset #f)
|
||||||
(gl-accumulator 'reset #f)
|
(gl-accumulator 'reset #f)
|
||||||
|
|
||||||
(let* ((rest (calc-in-interval (car dl) tl)))
|
(let ((rest (calc-in-interval (car dl) tl)))
|
||||||
;; list of values for report
|
;; list of values for report
|
||||||
(cons
|
(cons
|
||||||
(list
|
(list
|
||||||
@ -242,8 +237,8 @@
|
|||||||
(- (gl-accumulator 'debits #f)
|
(- (gl-accumulator 'debits #f)
|
||||||
(gl-accumulator 'credits #f))
|
(gl-accumulator 'credits #f))
|
||||||
(gl-accumulator 'debits #f)
|
(gl-accumulator 'debits #f)
|
||||||
(gl-accumulator 'credits #f)
|
(gl-accumulator 'credits #f))
|
||||||
(reduce-split-list (cdr dl) rest pt av)))))))))
|
(reduce-split-list (cdr dl) rest pt av))))))))
|
||||||
|
|
||||||
;; Pull a scheme list of splits from a C array
|
;; Pull a scheme list of splits from a C array
|
||||||
(define (gnc:convert-split-list slist)
|
(define (gnc:convert-split-list slist)
|
||||||
@ -255,7 +250,7 @@
|
|||||||
(cond
|
(cond
|
||||||
((pointer-token-null? asplit ) #f)
|
((pointer-token-null? asplit ) #f)
|
||||||
(else
|
(else
|
||||||
(set! schsl (append! schsl (list asplit)) )
|
(set! schsl (append! schsl (list asplit)))
|
||||||
(set! numsplit (+ numsplit 1))
|
(set! numsplit (+ numsplit 1))
|
||||||
#t))) ())
|
#t))) ())
|
||||||
schsl))
|
schsl))
|
||||||
@ -272,7 +267,7 @@
|
|||||||
(cond
|
(cond
|
||||||
((pointer-token-null? anact ) #f)
|
((pointer-token-null? anact ) #f)
|
||||||
(else
|
(else
|
||||||
(set! schal (append! schal (list anact)) )
|
(set! schal (append! schal (list anact)))
|
||||||
(set! numacct (+ numacct 1))
|
(set! numacct (+ numacct 1))
|
||||||
#t))) ())
|
#t))) ())
|
||||||
schal))))
|
schal))))
|
||||||
@ -295,7 +290,7 @@
|
|||||||
|
|
||||||
;; Calculate averages of each column
|
;; Calculate averages of each column
|
||||||
(define (get-averages indata)
|
(define (get-averages indata)
|
||||||
(let* ((avglst '()))
|
(let ((avglst '()))
|
||||||
(map (lambda (x) (set! avglst (append avglst (list 0.0)))) (car indata))
|
(map (lambda (x) (set! avglst (append avglst (list 0.0)))) (car indata))
|
||||||
(map (lambda (x)
|
(map (lambda (x)
|
||||||
(set! avglst (accumvects x avglst)))
|
(set! avglst (accumvects x avglst)))
|
||||||
@ -333,8 +328,8 @@
|
|||||||
value)))))
|
value)))))
|
||||||
(let ((begindate (gov-fun "From"))
|
(let ((begindate (gov-fun "From"))
|
||||||
(enddate (gov-fun "To"))
|
(enddate (gov-fun "To"))
|
||||||
(stepsize (gov-fun "Step Size"))
|
(stepsize (eval (gov-fun "Step Size")))
|
||||||
(plotstr (gov-fun "Plot Type"))
|
(plotstr (eval (gov-fun "Plot Type")))
|
||||||
(accounts (gov-fun "Account"))
|
(accounts (gov-fun "Account"))
|
||||||
(dosubs (gov-fun "Sub-Accounts"))
|
(dosubs (gov-fun "Sub-Accounts"))
|
||||||
(prefix (list "<HTML>" "<BODY>"))
|
(prefix (list "<HTML>" "<BODY>"))
|
||||||
@ -357,7 +352,7 @@
|
|||||||
(begin
|
(begin
|
||||||
; Grab account names
|
; Grab account names
|
||||||
(set! acctname (string-join
|
(set! acctname (string-join
|
||||||
(map gnc-account-getname accounts)
|
(map gnc:account-get-name accounts)
|
||||||
" , "))
|
" , "))
|
||||||
(cond ((equal? dosubs #t)
|
(cond ((equal? dosubs #t)
|
||||||
(map (lambda (a)
|
(map (lambda (a)
|
||||||
@ -392,7 +387,7 @@
|
|||||||
(set! rept-data
|
(set! rept-data
|
||||||
(reduce-split-list
|
(reduce-split-list
|
||||||
(dateloop begindate enddate stepsize)
|
(dateloop begindate enddate stepsize)
|
||||||
report-lines zdate tempstruct))
|
report-lines (make-zdate) tempstruct))
|
||||||
|
|
||||||
(set! sum-data (get-averages rept-data))
|
(set! sum-data (get-averages rept-data))
|
||||||
|
|
||||||
|