mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix more reports.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5085 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f71ea51e9b
commit
28c6e4494a
@ -86,7 +86,8 @@ noinst_HEADERS = \
|
||||
messages.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
.cvsignore
|
||||
.cvsignore \
|
||||
README.modules
|
||||
|
||||
CFLAGS = @CFLAGS@ ${GNOME_INCLUDEDIR} ${GUILE_INCS}
|
||||
|
||||
|
@ -49,6 +49,11 @@
|
||||
(export gnc:setup-default-namespaces)
|
||||
(export gnc:load-iso-4217-currencies)
|
||||
|
||||
(export gnc:url->loaded-book)
|
||||
(export gnc:transaction-map-splits)
|
||||
(export gnc:group-map-all-accounts)
|
||||
(export gnc:group-map-accounts)
|
||||
|
||||
(export gnc:split-structure)
|
||||
(export gnc:make-split-scm)
|
||||
(export gnc:split-scm?)
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
(gnc:support "html-barchart.scm")
|
||||
|
||||
(use-modules (ice-9 regex))
|
||||
|
||||
(define <html-barchart>
|
||||
(make-record-type "<html-barchart>"
|
||||
'(width
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
(gnc:support "html-piechart.scm")
|
||||
|
||||
(use-modules (ice-9 regex))
|
||||
|
||||
(define <html-piechart>
|
||||
(make-record-type "<html-piechart>"
|
||||
'(width height title subtitle data colors labels
|
||||
|
@ -33,6 +33,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define menuname-income (N_ "Income Piechart"))
|
||||
(define menuname-expense (N_ "Expense Piechart"))
|
||||
(define menuname-assets (N_ "Asset Piechart"))
|
||||
@ -338,8 +341,7 @@ balance at a given time"))
|
||||
chart urls)
|
||||
(gnc:html-piechart-set-button-1-legend-urls!
|
||||
chart urls))
|
||||
|
||||
|
||||
|
||||
(if
|
||||
(not (null? combined))
|
||||
(begin
|
||||
@ -348,9 +350,9 @@ balance at a given time"))
|
||||
(gnc:html-piechart-set-width! chart width)
|
||||
(gnc:html-piechart-set-height! chart height)
|
||||
(gnc:html-piechart-set-data! chart (unzip1 combined))
|
||||
(gnc:html-piechart-set-colors! chart
|
||||
(gnc:assign-colors (length combined)))
|
||||
|
||||
(gnc:html-piechart-set-colors!
|
||||
chart (gnc:assign-colors (length combined)))
|
||||
|
||||
(gnc:html-piechart-set-subtitle!
|
||||
chart (string-append
|
||||
(if do-intervals?
|
||||
@ -363,9 +365,14 @@ balance at a given time"))
|
||||
(gnc:timepair-to-datestring to-date-tp)))
|
||||
(if show-total?
|
||||
(let ((total (apply + (unzip1 combined))))
|
||||
(sprintf #f ": %s"
|
||||
(gnc:amount->string total print-info)))
|
||||
|
||||
(sprintf
|
||||
#f ": %s"
|
||||
(gnc:amount->string
|
||||
(gnc:double-to-gnc-numeric
|
||||
total
|
||||
(gnc:commodity-get-fraction report-currency)
|
||||
GNC-RND-ROUND)
|
||||
print-info)))
|
||||
"")))
|
||||
|
||||
(let ((legend-labels
|
||||
@ -380,13 +387,18 @@ balance at a given time"))
|
||||
(if show-total?
|
||||
(string-append
|
||||
" - "
|
||||
(gnc:amount->string (car pair) print-info))
|
||||
(gnc:amount->string
|
||||
(gnc:double-to-gnc-numeric
|
||||
(car pair)
|
||||
(gnc:commodity-get-fraction report-currency)
|
||||
GNC-RND-ROUND)
|
||||
print-info))
|
||||
"")))
|
||||
combined)))
|
||||
(gnc:html-piechart-set-labels! chart legend-labels))
|
||||
|
||||
|
||||
(gnc:html-document-add-object! document chart))
|
||||
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
@ -394,7 +406,7 @@ balance at a given time"))
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
|
||||
document)))
|
||||
|
||||
(for-each
|
||||
|
@ -16,6 +16,9 @@
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (ice-9 slib))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define optname-from-date (N_ "From"))
|
||||
(define optname-to-date (N_ "To"))
|
||||
(define optname-stepsize (N_ "Step Size"))
|
||||
|
@ -33,6 +33,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
;; first define all option's names so that they are properly defined
|
||||
;; in *one* place.
|
||||
(define optname-to-date (N_ "To"))
|
||||
|
@ -31,6 +31,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
;; The option names are defined here to 1. save typing and 2. avoid
|
||||
;; spelling errors. The *reportnames* are defined here (and not only
|
||||
;; once at the very end) because I need them to define the "other"
|
||||
|
@ -9,8 +9,7 @@
|
||||
|
||||
(define-module (gnucash report hello-world))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
(use-modules (gnucash engine))
|
||||
|
||||
;; This function will generate a set of options that GnuCash
|
||||
;; will use to display a dialog where the user can select
|
||||
|
@ -35,6 +35,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define optname-from-date (N_ "From"))
|
||||
(define optname-to-date (N_ "To"))
|
||||
(define optname-stepsize (N_ "Step Size"))
|
||||
|
@ -34,6 +34,9 @@
|
||||
(require 'hash-table)
|
||||
(require 'record)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define opt-pay-acc (N_ "Payables Account"))
|
||||
(define sect-acc (N_ "Accounts"))
|
||||
(define optname-to-date (N_ "To"))
|
||||
|
@ -31,6 +31,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
;; Profit and loss report. Actually, people in finances might want
|
||||
;; something different under this name, but they are welcomed to
|
||||
;; contribute their changes :-)
|
||||
|
@ -30,6 +30,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define optname-price-source (N_ "Price Source"))
|
||||
|
||||
(define (options-generator)
|
||||
|
@ -31,6 +31,9 @@
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define optname-from-date (N_ "From"))
|
||||
(define optname-to-date (N_ "To"))
|
||||
(define optname-stepsize (N_ "Step Size"))
|
||||
|
@ -36,13 +36,13 @@
|
||||
|
||||
(define-module (gnucash report taxtxf))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define (make-level-collector num-levels)
|
||||
(let ((level-collector (make-vector num-levels)))
|
||||
(do ((i 0 (+ i 1)))
|
||||
|
@ -38,6 +38,9 @@
|
||||
(require 'printf)
|
||||
(require 'record)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
|
||||
(define-macro (addto! alist element)
|
||||
`(set! ,alist (cons ,element ,alist)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user