mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix some reporting code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2911 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0647bf4bc9
commit
0ba828f12f
@ -554,7 +554,7 @@
|
||||
|
||||
; Create a column entry
|
||||
(define (html-table-col val)
|
||||
(html-table-col-align "right" val))
|
||||
(html-table-col-align val "right"))
|
||||
|
||||
(define (string-html-table-col-align val align)
|
||||
(string-append "<TD align=" align ">" (tostring val) "</TD>"))
|
||||
@ -623,7 +623,7 @@
|
||||
#f)
|
||||
">"
|
||||
(tostring val)
|
||||
"</TH">))
|
||||
"</TH>"))
|
||||
|
||||
(define (html-table-headcol val)
|
||||
(html-table-headcol-justified val "center"))
|
||||
|
@ -366,7 +366,9 @@
|
||||
;; FIXME - the '1' below is hard-coded and should
|
||||
;; be abstracted. Just a temp fix while
|
||||
;; the query api gets fully wrapped.
|
||||
(gnc:query-add-account gncq acct 1)) accounts)
|
||||
(gnc:query-add-single-account-match gncq acct
|
||||
(cons 'query-op 1)))
|
||||
accounts)
|
||||
|
||||
(set! acctcurrency (gnc:account-get-currency (car accounts)))
|
||||
|
||||
|
@ -86,9 +86,9 @@
|
||||
gnc:*pnl-report-options*)
|
||||
|
||||
(define (render-level-2-account level-2-account l2-value)
|
||||
(let ((account-name (list NBSP NBSP NBSP NBSP
|
||||
(gnc:account-get-full-name
|
||||
level-2-account)))
|
||||
(let ((account-name (string-append NBSP NBSP NBSP NBSP
|
||||
(gnc:account-get-full-name
|
||||
level-2-account)))
|
||||
(type-name (gnc:account-get-type-string
|
||||
(gnc:account-get-type level-2-account))))
|
||||
(html-table-row-align
|
||||
@ -110,11 +110,10 @@
|
||||
|
||||
(define (render-total l0-value)
|
||||
(html-table-row-align
|
||||
(list (html-strong (string-db 'lookup 'net))
|
||||
(list (string-html-strong (string-db 'lookup 'net))
|
||||
NBSP NBSP
|
||||
(gnc:amount->formatted-string l0-value #f)
|
||||
NBSP NBSP
|
||||
)
|
||||
NBSP NBSP)
|
||||
(list "left" "center" "right" "right" "right" "right")))
|
||||
|
||||
(define blank-line
|
||||
|
@ -662,10 +662,12 @@
|
||||
(gnc:group-map-accounts
|
||||
(lambda (account)
|
||||
(let* ((line
|
||||
(budget-get-line-hash budget-hash (gnc:account-get-full-name account)))
|
||||
(budget-get-line-hash budget-hash
|
||||
(gnc:account-get-full-name account)))
|
||||
(line2 (cond (line line)
|
||||
(else
|
||||
(vector-ref others (gnc:account-get-type account)))))
|
||||
(vector-ref others
|
||||
(gnc:account-get-type account)))))
|
||||
(acc 0)
|
||||
(filter-pred (budget-entry-get-filter-pred
|
||||
(budget-line-get-entry line2))))
|
||||
@ -803,8 +805,8 @@
|
||||
(case type
|
||||
((gnc:budget-day) (+ 1
|
||||
(remainder
|
||||
(inexact->exact (floor
|
||||
(gnc:date-to-day-fraction caltime)))
|
||||
(inexact->exact
|
||||
(floor (gnc:date-to-day-fraction caltime)))
|
||||
num-periods)))
|
||||
((gnc:budget-week) (+ (gnc:date-get-week-day lt)
|
||||
(* 7 (remainder
|
||||
@ -812,10 +814,11 @@
|
||||
(floor (gnc:date-to-week-fraction caltime)))
|
||||
num-periods))))
|
||||
((gnc:budget-month) (+ (gnc:date-get-month-day lt)
|
||||
(let loop ((month
|
||||
(inexact->exact
|
||||
(floor
|
||||
(gnc:date-to-month-fraction caltime)))))
|
||||
(let loop
|
||||
((month
|
||||
(inexact->exact
|
||||
(floor
|
||||
(gnc:date-to-month-fraction caltime)))))
|
||||
(if (= 0 (remainder month num-periods))
|
||||
0
|
||||
(+ (loop (- month 1))
|
||||
|
Loading…
Reference in New Issue
Block a user