mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge Chris Lam's 'guile-modularisation' into maint
This commit is contained in:
commit
64a8a11a23
@ -17,8 +17,22 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash engine business-core))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnucash-guile" "gnc_guile_bindings_init"))
|
||||
|
||||
(use-modules (sw_engine))
|
||||
(use-modules (srfi srfi-1))
|
||||
|
||||
(export gnc:owner-get-address)
|
||||
(export gnc:owner-get-name-dep)
|
||||
(export gnc:owner-get-address-dep)
|
||||
(export gnc:owner-get-name-and-address-dep)
|
||||
(export gnc:owner-get-owner-id)
|
||||
(export gnc:owner-from-split)
|
||||
(export gnc:split->owner)
|
||||
|
||||
(define (gnc:owner-get-address owner)
|
||||
(let ((type (gncOwnerGetType owner)))
|
||||
(cond
|
||||
|
@ -23,6 +23,14 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash engine commodity-table))
|
||||
|
||||
(export GNC_COMMODITY_NS_CURRENCY)
|
||||
(export GNC_COMMODITY_NS_NASDAQ)
|
||||
(export GNC_COMMODITY_NS_NYSE)
|
||||
(export GNC_COMMODITY_NS_AMEX)
|
||||
(export GNC_COMMODITY_NS_EUREX)
|
||||
(export GNC_COMMODITY_NS_MUTUAL)
|
||||
|
||||
(define GNC_COMMODITY_NS_CURRENCY "CURRENCY")
|
||||
|
||||
|
@ -24,24 +24,35 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(define-module (gnucash core-utils)
|
||||
#:export (N_
|
||||
G_
|
||||
NG_
|
||||
C_
|
||||
gnc:string-locale<?
|
||||
gnc:string-locale>?
|
||||
gnc:version))
|
||||
(define-module (gnucash core-utils))
|
||||
|
||||
;; Guile 2 needs to find the symbols from the extension at compile time already
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnucash-guile" "gnc_guile_bindings_init"))
|
||||
(use-modules (sw_core_utils))
|
||||
|
||||
(use-modules (ice-9 i18n))
|
||||
|
||||
;; Export the swig-wrapped symbols in the public interface of this module
|
||||
(module-use! (module-public-interface (current-module))
|
||||
(resolve-interface '(sw_core_utils)))
|
||||
(export N_)
|
||||
(export G_)
|
||||
(export NG_)
|
||||
(export C_)
|
||||
(export load-and-reexport)
|
||||
(export gnc:string-locale<?)
|
||||
(export gnc:string-locale>?)
|
||||
(export gnc:version)
|
||||
|
||||
;; loads modules and re-exports all its public interface into the
|
||||
;; current module
|
||||
(define-syntax load-and-reexport
|
||||
(syntax-rules ()
|
||||
((_ (mod ...) ...)
|
||||
(begin
|
||||
(use-modules (mod ...))
|
||||
...
|
||||
(module-use! (module-public-interface (current-module))
|
||||
(resolve-interface '(mod ...)))
|
||||
...))))
|
||||
|
||||
(load-and-reexport (sw_core_utils))
|
||||
|
||||
(define gnc:version (gnc-version))
|
||||
|
||||
|
@ -19,93 +19,45 @@
|
||||
|
||||
(define-module (gnucash engine))
|
||||
|
||||
(use-modules (srfi srfi-1)
|
||||
(srfi srfi-13))
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnucash-guile" "gnc_guile_bindings_init"))
|
||||
|
||||
(eval-when
|
||||
(compile load eval expand)
|
||||
(load-extension "libgnucash-guile" "gnc_guile_bindings_init"))
|
||||
(use-modules (sw_engine))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (gnucash core-utils))
|
||||
|
||||
; Export the swig-wrapped symbols in the public interface of this module
|
||||
(let ((i (module-public-interface (current-module))))
|
||||
(module-use! i (resolve-interface '(sw_engine))))
|
||||
|
||||
;; gnc-numeric.scm
|
||||
(export GNC-RND-FLOOR)
|
||||
(export GNC-RND-CEIL)
|
||||
(export GNC-RND-TRUNC)
|
||||
(export GNC-RND-PROMOTE)
|
||||
(export GNC-RND-ROUND-HALF-DOWN)
|
||||
(export GNC-RND-ROUND-HALF-UP)
|
||||
(export GNC-RND-ROUND)
|
||||
(export GNC-RND-NEVER)
|
||||
(export GNC-DENOM-AUTO)
|
||||
(export GNC-DENOM-REDUCE)
|
||||
(export GNC-DENOM-FIXED)
|
||||
(export GNC-DENOM-LCD)
|
||||
(export GNC-DENOM-SIGFIG)
|
||||
(export GNC-DENOM-SIGFIGS)
|
||||
(export GNC-ERROR-OK)
|
||||
(export GNC-ERROR-ARG)
|
||||
(export GNC-ERROR-OVERFLOW)
|
||||
(export GNC-ERROR-DENOM-DIFF)
|
||||
(export GNC-ERROR-REMAINDER)
|
||||
(export <gnc-monetary>)
|
||||
(export gnc:gnc-monetary?)
|
||||
(export gnc:make-gnc-monetary)
|
||||
(export gnc:gnc-monetary-commodity)
|
||||
(export gnc:gnc-monetary-amount)
|
||||
(export gnc:monetary-neg)
|
||||
|
||||
;; commodity-table.scm
|
||||
(export GNC_COMMODITY_NS_CURRENCY)
|
||||
(export GNC_COMMODITY_NS_NASDAQ)
|
||||
(export GNC_COMMODITY_NS_NYSE)
|
||||
(export GNC_COMMODITY_NS_AMEX)
|
||||
(export GNC_COMMODITY_NS_EUREX)
|
||||
(export GNC_COMMODITY_NS_MUTUAL)
|
||||
|
||||
; business-core.scm
|
||||
(export gnc:owner-get-address)
|
||||
(export gnc:owner-get-name-dep)
|
||||
(export gnc:owner-get-address-dep)
|
||||
(export gnc:owner-get-name-and-address-dep)
|
||||
(export gnc:owner-get-owner-id)
|
||||
(export gnc:owner-from-split)
|
||||
(export gnc:split->owner)
|
||||
|
||||
(load-from-path "gnucash/engine/gnc-numeric")
|
||||
(load-from-path "gnucash/engine/commodity-table")
|
||||
(load-from-path "gnucash/engine/business-core")
|
||||
|
||||
;; A few account related utility functions which used to be in engine-utilities.scm
|
||||
(define (gnc:account-map-descendants thunk account)
|
||||
(issue-deprecation-warning "gnc:account-map-descendants is deprecated.")
|
||||
(let ((descendants (or (gnc-account-get-descendants-sorted account) '())))
|
||||
(map thunk descendants)))
|
||||
|
||||
(define (gnc:account-map-children thunk account)
|
||||
(issue-deprecation-warning "gnc:account-map-children is deprecated.")
|
||||
(let ((children (or (gnc-account-get-children-sorted account) '())))
|
||||
(map thunk children)))
|
||||
|
||||
;; account related functions
|
||||
;; helper for sorting of account list
|
||||
(define (account-full-name<? a b)
|
||||
(issue-deprecation-warning "account-full-name<? is deprecated. use gnc:account-full-name<? instead.")
|
||||
(string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
|
||||
|
||||
;; return maximum depth over accounts and their children, if any
|
||||
(define (accounts-get-children-depth accounts)
|
||||
(issue-deprecation-warning "accounts-get-children-depth is deprecated. use gnc:accounts-get-children-depth instead.")
|
||||
(apply max
|
||||
(map (lambda (acct)
|
||||
(let ((acct-depth (gnc-account-get-current-depth acct)))
|
||||
(+ acct-depth (- (gnc-account-get-tree-depth acct) 1))))
|
||||
accounts)))
|
||||
(load-and-reexport (sw_engine)
|
||||
(gnucash engine business-core)
|
||||
(gnucash engine commodity-table)
|
||||
(gnucash engine gnc-numeric))
|
||||
|
||||
(export gnc:account-map-descendants)
|
||||
(export gnc:account-map-children)
|
||||
(export account-full-name<?)
|
||||
(export accounts-get-children-depth)
|
||||
|
||||
;; A few account related utility functions which used to be in engine-utilities.scm
|
||||
(define (gnc:account-map-descendants thunk account)
|
||||
(issue-deprecation-warning "gnc:account-map-descendants is deprecated.")
|
||||
(map thunk (or (gnc-account-get-descendants-sorted account) '())))
|
||||
|
||||
(define (gnc:account-map-children thunk account)
|
||||
(issue-deprecation-warning "gnc:account-map-children is deprecated.")
|
||||
(map thunk (or (gnc-account-get-children-sorted account) '())))
|
||||
|
||||
;; account related functions
|
||||
;; helper for sorting of account list
|
||||
(define (account-full-name<? a b)
|
||||
(issue-deprecation-warning
|
||||
"account-full-name<? is deprecated. use gnc:account-full-name<? instead.")
|
||||
(string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
|
||||
|
||||
;; return maximum depth over accounts and their children, if any
|
||||
(define (accounts-get-children-depth accounts)
|
||||
(issue-deprecation-warning "accounts-get-children-depth is deprecated. use \
|
||||
gnc:accounts-get-children-depth instead.")
|
||||
(1- (apply max
|
||||
(map (lambda (acct)
|
||||
(+ (gnc-account-get-current-depth acct)
|
||||
(gnc-account-get-tree-depth acct)))
|
||||
accounts))))
|
||||
|
@ -21,8 +21,36 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash engine gnc-numeric))
|
||||
|
||||
(use-modules (srfi srfi-9))
|
||||
|
||||
(export GNC-RND-FLOOR)
|
||||
(export GNC-RND-CEIL)
|
||||
(export GNC-RND-TRUNC)
|
||||
(export GNC-RND-PROMOTE)
|
||||
(export GNC-RND-ROUND-HALF-DOWN)
|
||||
(export GNC-RND-ROUND-HALF-UP)
|
||||
(export GNC-RND-ROUND)
|
||||
(export GNC-RND-NEVER)
|
||||
(export GNC-DENOM-AUTO)
|
||||
(export GNC-DENOM-REDUCE)
|
||||
(export GNC-DENOM-FIXED)
|
||||
(export GNC-DENOM-LCD)
|
||||
(export GNC-DENOM-SIGFIG)
|
||||
(export GNC-DENOM-SIGFIGS)
|
||||
(export GNC-ERROR-OK)
|
||||
(export GNC-ERROR-ARG)
|
||||
(export GNC-ERROR-OVERFLOW)
|
||||
(export GNC-ERROR-DENOM-DIFF)
|
||||
(export GNC-ERROR-REMAINDER)
|
||||
(export :gnc-monetary)
|
||||
(export gnc:gnc-monetary?)
|
||||
(export gnc:make-gnc-monetary)
|
||||
(export gnc:gnc-monetary-commodity)
|
||||
(export gnc:gnc-monetary-amount)
|
||||
(export gnc:monetary-neg)
|
||||
|
||||
;; use 'logior' in guile to bit-combine RND and DENOM flags.
|
||||
|
||||
(define GNC-RND-FLOOR 1)
|
||||
|
@ -17,39 +17,26 @@
|
||||
|
||||
(define-module (gnucash utilities))
|
||||
|
||||
;; Turn off the scheme compiler's "possibly unbound variable" warnings.
|
||||
;; In guile 2.0 we get nearly 7500 of them loading the scheme files.
|
||||
;; This is the default value for auto-compilation-options without "unbound-variable".
|
||||
;; See module/ice-9/boot-9.scm */
|
||||
(set! %auto-compilation-options
|
||||
'(#:warnings (arity-mismatch format duplicate-case-datum bad-case-datum)))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
|
||||
;; Load the srfis (eventually, we should see where these are needed
|
||||
;; and only have the use-modules statements in those files).
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-8))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Exports
|
||||
|
||||
;; from utilities.scm
|
||||
(export gnc:warn)
|
||||
(export gnc:error)
|
||||
(export gnc:msg)
|
||||
(export gnc:debug)
|
||||
(export gnc:gui-warn)
|
||||
(export gnc:gui-error)
|
||||
(export gnc:gui-msg)
|
||||
(export addto!)
|
||||
(export sort-and-delete-duplicates)
|
||||
(export gnc:list-flatten)
|
||||
|
||||
;; Do this stuff very early -- but other than that, don't add any
|
||||
;; executable code until the end of the file if you can help it.
|
||||
;; These are needed for a guile 1.3.4 bug
|
||||
(debug-enable 'backtrace)
|
||||
(read-enable 'positions)
|
||||
(debug-set! stack 200000)
|
||||
(export traverse-list->vec)
|
||||
(export traverse-vec->list)
|
||||
(export gnc:substring-replace-from-to)
|
||||
(export gnc:substring-replace)
|
||||
(export gnc:html-string-sanitize)
|
||||
|
||||
(define (strify items)
|
||||
(string-join (map (lambda (x) (format #f "~A" x)) items) ""))
|
||||
@ -72,9 +59,9 @@
|
||||
;; and will be redefined in UI initialization to display dialog
|
||||
;; messages
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define-public (gnc:gui-warn str1 str2) (gnc:warn str1))
|
||||
(define-public (gnc:gui-error str1 str2) (gnc:error str1))
|
||||
(define-public (gnc:gui-msg str1 str2) (gnc:msg str1))
|
||||
(define (gnc:gui-warn str1 str2) (gnc:warn str1))
|
||||
(define (gnc:gui-error str1 str2) (gnc:error str1))
|
||||
(define (gnc:gui-msg str1 str2) (gnc:msg str1))
|
||||
|
||||
(define-syntax-rule (addto! alist element)
|
||||
(set! alist (cons element alist)))
|
||||
@ -84,12 +71,12 @@
|
||||
;; lists converted vectors to save as json arrays. traverse list
|
||||
;; converting into vectors, and vice versa.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define-public (traverse-list->vec lst)
|
||||
(define (traverse-list->vec lst)
|
||||
(cond
|
||||
((list? lst) (list->vector (map traverse-list->vec lst)))
|
||||
(else lst)))
|
||||
|
||||
(define-public (traverse-vec->list vec)
|
||||
(define (traverse-vec->list vec)
|
||||
(cond
|
||||
((vector? vec) (map traverse-vec->list (vector->list vec)))
|
||||
(else vec)))
|
||||
@ -134,7 +121,7 @@
|
||||
;; returns "fooxyzfooxyz".
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-public (gnc:substring-replace s1 s2 s3)
|
||||
(define (gnc:substring-replace s1 s2 s3)
|
||||
(string-replace-substring s1 s2 s3))
|
||||
|
||||
|
||||
@ -151,7 +138,7 @@
|
||||
;; start>1 and end-after<=0 will the replace from "start" until end of file
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-public (gnc:substring-replace-from-to s1 s2 s3 start end-after)
|
||||
(define (gnc:substring-replace-from-to s1 s2 s3 start end-after)
|
||||
(issue-deprecation-warning "gnc:substring-replace-from-to is deprecated in 4.x.")
|
||||
(string-replace-substring
|
||||
s1 s2 s3 0 (string-length s1) (max 0 (1- start))
|
||||
@ -161,7 +148,7 @@
|
||||
;; function to sanitize strings. the resulting string can be safely
|
||||
;; added to html.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define-public (gnc:html-string-sanitize str)
|
||||
(define (gnc:html-string-sanitize str)
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(string-for-each
|
||||
|
@ -261,17 +261,16 @@ install(FILES ${gnome_utils_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnu
|
||||
set(GUILE_DEPENDS gnc-gnome-utils scm-engine scm-app-utils)
|
||||
|
||||
gnc_add_scheme_targets(scm-gnome-utils-1
|
||||
SOURCES gnome-utils.scm
|
||||
OUTPUT_DIR gnucash
|
||||
DEPENDS "${GUILE_DEPENDS}")
|
||||
|
||||
|
||||
gnc_add_scheme_targets(scm-gnome-utils-2
|
||||
SOURCES gnc-menu-extensions.scm
|
||||
OUTPUT_DIR "gnucash/gnome-utils"
|
||||
DEPENDS "${GUILE_DEPENDS}"
|
||||
MAKE_LINKS)
|
||||
|
||||
gnc_add_scheme_targets(scm-gnome-utils-2
|
||||
SOURCES gnome-utils.scm
|
||||
OUTPUT_DIR gnucash
|
||||
DEPENDS "scm-gnome-utils-1")
|
||||
|
||||
add_custom_target(scm-gnome-utils ALL DEPENDS scm-gnome-utils-2 scm-gnome-utils-1)
|
||||
|
||||
set_local_dist(gnome_utils_DIST_local CMakeLists.txt ${gnome_utils_SOURCES} ${gnome_utils_HEADERS}
|
||||
|
@ -15,40 +15,30 @@
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(define (gnc:make-extension
|
||||
;; The type of extension item, either 'menu, 'menu-item, or 'separator
|
||||
type
|
||||
;; The name of the extension in the menu
|
||||
name
|
||||
;; The guid of object the menu will refer to
|
||||
guid
|
||||
;; The tooltip
|
||||
documentation-string
|
||||
;; A list of names indicating the menus under which this item is
|
||||
;; located. The last item indicates the item *after* which this
|
||||
;; extension will go.
|
||||
path
|
||||
;; The script to call when the menu item is selected
|
||||
script)
|
||||
(vector type
|
||||
name
|
||||
guid
|
||||
documentation-string
|
||||
path
|
||||
script))
|
||||
(define-module (gnucash gnome-utils gnc-menu-extensions))
|
||||
|
||||
(define (gnc:extension-type extension)
|
||||
(vector-ref extension 0))
|
||||
(define (gnc:extension-name extension)
|
||||
(vector-ref extension 1))
|
||||
(define (gnc:extension-guid extension)
|
||||
(vector-ref extension 2))
|
||||
(define (gnc:extension-documentation extension)
|
||||
(vector-ref extension 3))
|
||||
(define (gnc:extension-path extension)
|
||||
(vector-ref extension 4))
|
||||
(define (gnc:extension-script extension)
|
||||
(vector-ref extension 5))
|
||||
(use-modules (srfi srfi-9))
|
||||
|
||||
(export gnc:extension-documentation)
|
||||
(export gnc:extension-guid)
|
||||
(export gnc:extension-name)
|
||||
(export gnc:extension-path)
|
||||
(export gnc:extension-script)
|
||||
(export gnc:extension-type)
|
||||
(export gnc:make-extension)
|
||||
(export gnc:make-menu)
|
||||
(export gnc:make-menu-item)
|
||||
(export gnc:make-separator)
|
||||
|
||||
(define-record-type :extension
|
||||
(gnc:make-extension type name guid documentation-string path script)
|
||||
:extension?
|
||||
(type gnc:extension-type)
|
||||
(name gnc:extension-name)
|
||||
(guid gnc:extension-guid)
|
||||
(documentation-string gnc:extension-documentation)
|
||||
(path gnc:extension-path)
|
||||
(script gnc:extension-script))
|
||||
|
||||
(define (gnc:make-menu-item name guid documentation-string path script)
|
||||
(gnc:make-extension 'menu-item name guid documentation-string path script))
|
||||
|
@ -19,30 +19,16 @@
|
||||
|
||||
(define-module (gnucash gnome-utils))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome-utils" "scm_init_sw_gnome_utils_module"))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome-utils" "scm_init_sw_gnome_utils_module"))
|
||||
(use-modules (sw_gnome_utils))
|
||||
|
||||
; Export the swig-wrapped symbols in the public interface of this module
|
||||
(let ((i (module-public-interface (current-module))))
|
||||
(module-use! i (resolve-interface '(sw_gnome_utils))))
|
||||
|
||||
;; from gnc-menu-extensions.scm
|
||||
(export gnc:extension-type)
|
||||
(export gnc:extension-name)
|
||||
(export gnc:extension-guid)
|
||||
(export gnc:extension-documentation)
|
||||
(export gnc:extension-path)
|
||||
(export gnc:extension-script)
|
||||
(export gnc:make-menu-item)
|
||||
(export gnc:make-menu)
|
||||
(export gnc:make-separator)
|
||||
|
||||
(load-from-path "gnucash/gnome-utils/gnc-menu-extensions")
|
||||
(load-and-reexport (sw_gnome_utils)
|
||||
(gnucash gnome-utils gnc-menu-extensions))
|
||||
|
||||
;; this function will receive 1 boolean argument, and can be used for
|
||||
;; any UI init/shutdown routines. For now it will set the
|
||||
|
@ -24,7 +24,44 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(define-module (gnucash qif-import qif-dialog-utils))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash string))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash qif-import qif-objects))
|
||||
(use-modules (gnucash qif-import qif-guess-map))
|
||||
|
||||
(export default-capital-return-acct)
|
||||
(export default-cglong-acct)
|
||||
(export default-cgmid-acct)
|
||||
(export default-cgshort-acct)
|
||||
(export default-commission-acct)
|
||||
(export default-dividend-acct)
|
||||
(export default-equity-account)
|
||||
(export default-equity-holding)
|
||||
(export default-interest-acct)
|
||||
(export default-margin-interest-acct)
|
||||
(export default-stock-acct)
|
||||
(export default-unspec-acct)
|
||||
(export qif-dialog:make-account-display)
|
||||
(export qif-dialog:make-category-display)
|
||||
(export qif-dialog:make-memo-display)
|
||||
(export qif-dialog:qif-file-loaded?)
|
||||
(export qif-dialog:unload-qif-file)
|
||||
(export qif-import:any-new-accts?)
|
||||
(export qif-import:get-account-name)
|
||||
(export qif-import:update-security-hash)
|
||||
(export qif-import:fix-from-acct)
|
||||
(export qif-import:get-all-accts)
|
||||
(export qif-import:refresh-match-selection)
|
||||
|
||||
(define (default-stock-acct brokerage security)
|
||||
(string-append brokerage (gnc-get-account-separator-string) security))
|
||||
|
@ -24,12 +24,31 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash qif-import qif-file))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash string))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (ice-9 regex))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (ice-9 rdelim))
|
||||
(use-modules (gnucash qif-import qif-objects))
|
||||
(use-modules (gnucash qif-import qif-utils))
|
||||
(use-modules (gnucash qif-import qif-parse))
|
||||
(use-modules (gnucash qif-import qif-dialog-utils))
|
||||
|
||||
(export qif-file:check-from-acct)
|
||||
(export qif-file:parse-fields)
|
||||
(export qif-file:parse-fields-results)
|
||||
(export qif-file:read-file)
|
||||
(export qif-file:reparse-dates)
|
||||
|
||||
(define qif-bad-numeric-rexp
|
||||
(make-regexp "^\\.\\.\\."))
|
||||
|
@ -24,9 +24,37 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(define-module (gnucash qif-import qif-guess-map))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash qif-import qif-objects))
|
||||
(use-modules (gnucash qif-import qif-dialog-utils))
|
||||
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(export GNC-ASSET-TYPE)
|
||||
(export GNC-BANK-TYPE)
|
||||
(export GNC-CASH-TYPE)
|
||||
(export GNC-CCARD-TYPE)
|
||||
(export GNC-EQUITY-TYPE)
|
||||
(export GNC-EXPENSE-TYPE)
|
||||
(export GNC-INCOME-TYPE)
|
||||
(export GNC-LIABILITY-TYPE)
|
||||
(export GNC-MUTUAL-TYPE)
|
||||
(export GNC-PAYABLE-TYPE)
|
||||
(export GNC-RECEIVABLE-TYPE)
|
||||
(export GNC-STOCK-TYPE)
|
||||
(export qif-import:guess-acct)
|
||||
(export qif-import:load-map-prefs)
|
||||
(export qif-import:save-map-prefs)
|
||||
|
||||
(define GNC-BANK-TYPE 0)
|
||||
(define GNC-CASH-TYPE 1)
|
||||
(define GNC-ASSET-TYPE 2)
|
||||
|
@ -25,68 +25,15 @@
|
||||
|
||||
|
||||
(define-module (gnucash qif-import))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash gnome-utils))
|
||||
|
||||
;; We do this initialization here because src/gnome isn't a real module.
|
||||
;; Note: Guile 2 needs to find the symbols from the extension at compile time already
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
(use-modules (gnucash core-utils))
|
||||
|
||||
(use-modules (sw_gnome))
|
||||
|
||||
(use-modules (ice-9 regex))
|
||||
(use-modules (srfi srfi-1))
|
||||
|
||||
(debug-enable 'backtrace)
|
||||
|
||||
(load-from-path "gnucash/qif-import/qif-objects") ;; class definitions
|
||||
(load-from-path "gnucash/qif-import/qif-parse") ;; string-to-value
|
||||
(load-from-path "gnucash/qif-import/qif-utils")
|
||||
(load-from-path "gnucash/qif-import/qif-file") ;; actual file reading
|
||||
(load-from-path "gnucash/qif-import/qif-dialog-utils") ;; build displays
|
||||
(load-from-path "gnucash/qif-import/qif-guess-map") ;; build acct mappings
|
||||
(load-from-path "gnucash/qif-import/qif-to-gnc") ;; conv QIF xtns to GNC
|
||||
(load-from-path "gnucash/qif-import/qif-merge-groups") ;; merge into user's acct
|
||||
|
||||
(export make-qif-file)
|
||||
(export make-ticker-map)
|
||||
(export qif-import:get-all-accts)
|
||||
(export qif-import:fix-from-acct)
|
||||
(export qif-import:any-new-accts?)
|
||||
(export qif-import:update-security-hash)
|
||||
(export qif-import:refresh-match-selection)
|
||||
(export qif-import:save-map-prefs)
|
||||
(export qif-import:load-map-prefs)
|
||||
(export qif-import:qif-to-gnc)
|
||||
(export qif-import:qif-to-gnc-undo)
|
||||
(export qif-import:reset-cancel-pause)
|
||||
(export qif-import:cancel)
|
||||
(export qif-import:toggle-pause)
|
||||
|
||||
(export qif-map-entry:gnc-name)
|
||||
(export qif-map-entry:set-gnc-name!)
|
||||
(export qif-map-entry:clone)
|
||||
(export qif-map-entry:qif-name)
|
||||
(export qif-map-entry:new-acct?)
|
||||
|
||||
(export qif-file:read-file)
|
||||
(export qif-file:parse-fields)
|
||||
(export qif-file:parse-fields-results)
|
||||
(export qif-file:check-from-acct)
|
||||
(export qif-file:reparse-dates)
|
||||
(export qif-file:check-from-acct)
|
||||
(export qif-file:path-to-accountname)
|
||||
(export qif-file:path)
|
||||
|
||||
(export qif-dialog:qif-file-loaded?)
|
||||
(export qif-dialog:unload-qif-file)
|
||||
(export qif-dialog:make-account-display)
|
||||
(export qif-dialog:make-category-display)
|
||||
(export qif-dialog:make-memo-display)
|
||||
|
||||
(export gnc:account-tree-find-duplicates)
|
||||
(export gnc:account-tree-catenate-and-merge)
|
||||
(export gnc:prune-matching-transactions)
|
||||
(load-and-reexport (gnucash qif-import qif-dialog-utils)
|
||||
(gnucash qif-import qif-file)
|
||||
(gnucash qif-import qif-guess-map)
|
||||
(gnucash qif-import qif-merge-groups)
|
||||
(gnucash qif-import qif-objects)
|
||||
(gnucash qif-import qif-parse)
|
||||
(gnucash qif-import qif-to-gnc)
|
||||
(gnucash qif-import qif-utils)
|
||||
(gnucash string))
|
||||
|
@ -23,6 +23,21 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash qif-import qif-merge-groups))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (gnucash qif-import qif-utils))
|
||||
|
||||
(export gnc:account-tree-catenate-and-merge)
|
||||
(export gnc:account-tree-find-duplicates)
|
||||
(export gnc:prune-matching-transactions)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; gnc:account-tree-find-duplicates
|
||||
|
@ -23,6 +23,128 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash qif-import qif-objects))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash string))
|
||||
(use-modules (gnucash qif-import qif-guess-map))
|
||||
(use-modules (gnucash qif-import qif-parse))
|
||||
|
||||
(export <qif-map-entry>)
|
||||
(export make-qif-acct)
|
||||
(export make-qif-cat)
|
||||
(export make-qif-class)
|
||||
(export make-qif-file)
|
||||
(export make-qif-map-entry)
|
||||
(export make-qif-split)
|
||||
(export make-qif-stock-symbol)
|
||||
(export make-qif-xtn)
|
||||
(export make-ticker-map)
|
||||
(export qif-acct:budget)
|
||||
(export qif-acct:description)
|
||||
(export qif-acct:limit)
|
||||
(export qif-acct:name)
|
||||
(export qif-acct:set-budget!)
|
||||
(export qif-acct:set-description!)
|
||||
(export qif-acct:set-limit!)
|
||||
(export qif-acct:set-name!)
|
||||
(export qif-acct:set-type!)
|
||||
(export qif-acct:type)
|
||||
(export qif-cat:budget-amt)
|
||||
(export qif-cat:description)
|
||||
(export qif-cat:expense-cat)
|
||||
(export qif-cat:name)
|
||||
(export qif-cat:set-budget-amt!)
|
||||
(export qif-cat:set-description!)
|
||||
(export qif-cat:set-expense-cat!)
|
||||
(export qif-cat:set-income-cat!)
|
||||
(export qif-cat:set-name!)
|
||||
(export qif-cat:set-tax-class!)
|
||||
(export qif-cat:set-taxable!)
|
||||
(export qif-cat:tax-class)
|
||||
(export qif-class:set-description!)
|
||||
(export qif-class:set-name!)
|
||||
(export qif-file:accounts)
|
||||
(export qif-file:add-account!)
|
||||
(export qif-file:add-cat!)
|
||||
(export qif-file:add-class!)
|
||||
(export qif-file:add-xtn!)
|
||||
(export qif-file:cats)
|
||||
(export qif-file:path)
|
||||
(export qif-file:path-to-accountname)
|
||||
(export qif-file:set-path!)
|
||||
(export qif-file:set-xtns!)
|
||||
(export qif-file:xtns)
|
||||
(export qif-map-entry:allowed-parent-types)
|
||||
(export qif-map-entry:allowed-types)
|
||||
(export qif-map-entry:clone)
|
||||
(export qif-map-entry:description)
|
||||
(export qif-map-entry:display?)
|
||||
(export qif-map-entry:gnc-name)
|
||||
(export qif-map-entry:new-acct?)
|
||||
(export qif-map-entry:qif-name)
|
||||
(export qif-map-entry:set-allowed-types!)
|
||||
(export qif-map-entry:set-description!)
|
||||
(export qif-map-entry:set-display?!)
|
||||
(export qif-map-entry:set-gnc-name!)
|
||||
(export qif-map-entry:set-new-acct?!)
|
||||
(export qif-map-entry:set-qif-name!)
|
||||
(export qif-split:amount)
|
||||
(export qif-split:category)
|
||||
(export qif-split:category-is-account?)
|
||||
(export qif-split:mark)
|
||||
(export qif-split:matching-cleared)
|
||||
(export qif-split:memo)
|
||||
(export qif-split:miscx-category)
|
||||
(export qif-split:set-amount!)
|
||||
(export qif-split:set-category!)
|
||||
(export qif-split:set-category-is-account?!)
|
||||
(export qif-split:set-category-private!)
|
||||
(export qif-split:set-mark!)
|
||||
(export qif-split:set-matching-cleared!)
|
||||
(export qif-split:set-memo!)
|
||||
(export qif-stock-symbol:set-name!)
|
||||
(export qif-stock-symbol:set-symbol!)
|
||||
(export qif-stock-symbol:set-type!)
|
||||
(export qif-ticker-map:add-ticker!)
|
||||
(export qif-ticker-map:lookup-symbol)
|
||||
(export qif-ticker-map:lookup-type)
|
||||
(export qif-xtn:action)
|
||||
(export qif-xtn:address)
|
||||
(export qif-xtn:cleared)
|
||||
(export qif-xtn:commission)
|
||||
(export qif-xtn:date)
|
||||
(export qif-xtn:default-split)
|
||||
(export qif-xtn:from-acct)
|
||||
(export qif-xtn:mark)
|
||||
(export qif-xtn:num-shares)
|
||||
(export qif-xtn:number)
|
||||
(export qif-xtn:payee)
|
||||
(export qif-xtn:security-name)
|
||||
(export qif-xtn:set-action!)
|
||||
(export qif-xtn:set-address!)
|
||||
(export qif-xtn:set-cleared!)
|
||||
(export qif-xtn:set-commission!)
|
||||
(export qif-xtn:set-date!)
|
||||
(export qif-xtn:set-default-split!)
|
||||
(export qif-xtn:set-from-acct!)
|
||||
(export qif-xtn:set-mark!)
|
||||
(export qif-xtn:set-num-shares!)
|
||||
(export qif-xtn:set-number!)
|
||||
(export qif-xtn:set-payee!)
|
||||
(export qif-xtn:set-security-name!)
|
||||
(export qif-xtn:set-share-price!)
|
||||
(export qif-xtn:set-split-amounts!)
|
||||
(export qif-xtn:set-splits!)
|
||||
(export qif-xtn:share-price)
|
||||
(export qif-xtn:split-amounts)
|
||||
(export qif-xtn:splits)
|
||||
|
||||
(define (construct class)
|
||||
(apply (record-constructor class)
|
||||
|
@ -23,8 +23,35 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash qif-import qif-parse))
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash qif-import qif-guess-map))
|
||||
(use-modules (gnucash string))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (ice-9 regex))
|
||||
|
||||
(export qif-parse:check-date-format)
|
||||
(export qif-parse:check-number-format)
|
||||
(export qif-parse:check-number-formats)
|
||||
(export qif-parse:parse-acct-type)
|
||||
(export qif-parse:parse-action-field)
|
||||
(export qif-parse:parse-bang-field)
|
||||
(export qif-parse:parse-cleared-field)
|
||||
(export qif-parse:parse-date/format)
|
||||
(export qif-parse:parse-number/format)
|
||||
(export qif-parse:parse-numbers/format)
|
||||
(export qif-parse:print-date)
|
||||
(export qif-parse:print-number)
|
||||
(export qif-parse:print-numbers)
|
||||
(export qif-split:parse-category)
|
||||
(export qif-parse:fix-year)
|
||||
|
||||
(define regexp-enabled?
|
||||
(defined? 'make-regexp))
|
||||
|
@ -25,9 +25,26 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(define-module (gnucash qif-import qif-to-gnc))
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash string))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash qif-import qif-dialog-utils))
|
||||
(use-modules (gnucash qif-import qif-objects))
|
||||
(use-modules (gnucash qif-import qif-utils))
|
||||
(use-modules (gnucash qif-import qif-guess-map))
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (ice-9 match))
|
||||
(use-modules (gnucash string))
|
||||
|
||||
(export qif-import:qif-to-gnc)
|
||||
(export qif-import:qif-to-gnc-undo)
|
||||
(export gnc:account-tree-get-transactions)
|
||||
|
||||
(define (n- n) (gnc-numeric-neg n))
|
||||
(define (nsub a b) (gnc-numeric-sub a b 0 GNC-DENOM-LCD))
|
||||
@ -1240,3 +1257,4 @@
|
||||
;; Destroy the accounts
|
||||
(xaccAccountBeginEdit root)
|
||||
(xaccAccountDestroy root))))
|
||||
|
||||
|
@ -23,9 +23,25 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash qif-import qif-utils))
|
||||
|
||||
;; We do this initialization here because src/gnome isn't a real module.
|
||||
;; Note: Guile 2 needs to find the symbols from the extension at compile time already
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-gnome" "scm_init_sw_gnome_module"))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (sw_gnome))
|
||||
(use-modules (srfi srfi-13))
|
||||
|
||||
(export qif-import:canceled)
|
||||
(export qif-import:check-pause)
|
||||
(export qif-import:log)
|
||||
(export qif-import:reset-cancel-pause)
|
||||
(export qif-import:cancel)
|
||||
(export qif-import:canceled)
|
||||
(export qif-import:toggle-pause)
|
||||
|
||||
(define qif-import:paused #f)
|
||||
(define qif-import:canceled #f)
|
||||
|
||||
@ -53,4 +69,3 @@
|
||||
(define (qif-import:check-pause progress-dialog)
|
||||
(while (and qif-import:paused (not qif-import:canceled))
|
||||
(gnc-progress-dialog-update progress-dialog)))
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(define-module (gnucash string))
|
||||
(use-modules (srfi srfi-13))
|
||||
|
||||
(use-modules (srfi srfi-13))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; gnc:string-rcontains
|
||||
|
@ -97,7 +97,8 @@ set(GUILE_DEPENDS
|
||||
gnc_add_scheme_targets(scm-report-1
|
||||
SOURCES "${report_SCHEME_1}"
|
||||
OUTPUT_DIR "gnucash/report"
|
||||
DEPENDS "${GUILE_DEPENDS}")
|
||||
DEPENDS "${GUILE_DEPENDS}"
|
||||
MAKE_LINKS)
|
||||
|
||||
gnc_add_scheme_targets(scm-report-2
|
||||
SOURCES "${report_SCHEME_2}"
|
||||
|
@ -20,8 +20,43 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(use-modules (ice-9 match))
|
||||
(define-module (gnucash report commodity-utilities))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report report-utilities))
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-26))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(export gnc:get-match-commodity-splits)
|
||||
(export gnc:get-match-commodity-splits-sorted)
|
||||
(export gnc:get-all-commodity-splits )
|
||||
(export gnc:exchange-by-euro-numeric)
|
||||
(export gnc:get-commodity-totalavg-prices)
|
||||
(export gnc:get-commoditylist-totalavg-prices)
|
||||
(export gnc:get-commodity-inst-prices)
|
||||
(export gnc:pricelist-price-find-nearest)
|
||||
(export gnc:pricealist-lookup-nearest-in-time)
|
||||
(export gnc:resolve-unknown-comm)
|
||||
(export gnc:get-exchange-totals)
|
||||
(export gnc:get-exchange-cost-totals)
|
||||
(export gnc:make-exchange-alist)
|
||||
(export gnc:make-exchange-cost-alist)
|
||||
(export gnc:exchange-by-euro)
|
||||
(export gnc:exchange-if-same)
|
||||
(export gnc:make-exchange-function)
|
||||
(export gnc:exchange-by-pricedb-latest )
|
||||
(export gnc:exchange-by-pricedb-nearest)
|
||||
(export gnc:exchange-by-pricealist-nearest)
|
||||
(export gnc:case-exchange-fn)
|
||||
(export gnc:case-exchange-time-fn)
|
||||
(export gnc:case-price-fn)
|
||||
(export gnc:sum-collector-commodity)
|
||||
(export gnc:uniform-commodity?)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Functions to get splits with interesting data from accounts.
|
||||
|
@ -22,16 +22,29 @@
|
||||
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
;; 02111-1307 USA
|
||||
|
||||
(define-module (gnucash eguile eguile-html-utilities))
|
||||
|
||||
; using all of these seems like overkill --
|
||||
; not sure which are really required
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report))
|
||||
|
||||
(use-modules (ice-9 regex)) ; for regular expressions
|
||||
(use-modules (srfi srfi-13)) ; for extra string functions
|
||||
|
||||
(export string-substitute-alist)
|
||||
|
||||
(define-public (string-substitute-alist str sub-alist)
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(string-for-each
|
||||
(lambda (c)
|
||||
(display
|
||||
(or (assv-ref sub-alist c)
|
||||
c)))
|
||||
str))))
|
||||
|
||||
(define (string-repeat s n)
|
||||
;; return a string made of n copies of string s
|
||||
(string-join (make-list n s) ""))
|
||||
|
@ -22,6 +22,8 @@
|
||||
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
;; 02111-1307 USA
|
||||
|
||||
(define-module (gnucash eguile eguile-utilities))
|
||||
|
||||
(use-modules (ice-9 match))
|
||||
; using all of these seems like overkill --
|
||||
; not sure which are really required
|
||||
|
@ -86,18 +86,13 @@
|
||||
(use-modules (ice-9 regex)) ; for regular expressions
|
||||
(use-modules (ice-9 rdelim)) ; for read-line
|
||||
(use-modules (ice-9 local-eval)) ; for the-environment
|
||||
(use-modules (gnucash app-utils)) ; for _
|
||||
(use-modules (gnucash core-utils)); for G_ N_
|
||||
(use-modules (gnucash utilities)) ; for gnc:html-string-sanitize
|
||||
|
||||
(define-public (string-substitute-alist str sub-alist)
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(string-for-each
|
||||
(lambda (c)
|
||||
(display
|
||||
(or (assv-ref sub-alist c)
|
||||
c)))
|
||||
str))))
|
||||
(load-and-reexport (gnucash eguile eguile-utilities)
|
||||
(gnucash eguile eguile-html-utilities))
|
||||
|
||||
(export eguile-file-to-string)
|
||||
|
||||
;; regexps used to find start and end of code segments
|
||||
(define startre (and (defined? 'make-regexp) (make-regexp "<\\?scm(:d)?[[:space:]]")))
|
||||
@ -166,8 +161,3 @@
|
||||
(unless (eof-object? next)
|
||||
(local-eval next local-env)
|
||||
(lp (read))))))))))))
|
||||
|
||||
(export eguile-file-to-string)
|
||||
|
||||
(load-from-path "gnucash/eguile/eguile-utilities")
|
||||
(load-from-path "gnucash/eguile/eguile-html-utilities")
|
||||
|
@ -495,8 +495,42 @@
|
||||
;; user. This class simply maps its contents to the html-table.
|
||||
;;
|
||||
|
||||
(define-module (gnucash report html-acct-table))
|
||||
|
||||
(use-modules (srfi srfi-2))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report commodity-utilities))
|
||||
(use-modules (gnucash report report-utilities))
|
||||
(use-modules (gnucash report html-utilities))
|
||||
(use-modules (gnucash report html-text))
|
||||
(use-modules (gnucash report html-table))
|
||||
|
||||
(export <html-acct-table>)
|
||||
(export gnc:html-acct-table?)
|
||||
(export gnc:_make-html-acct-table_)
|
||||
(export gnc:make-html-acct-table)
|
||||
(export gnc:make-html-acct-table/env)
|
||||
(export gnc:make-html-acct-table/env/accts)
|
||||
(export gnc:_html-acct-table-matrix_)
|
||||
(export gnc:_html-acct-table-set-matrix!_)
|
||||
(export gnc:_html-acct-table-env_)
|
||||
(export gnc:_html-acct-table-set-env!_)
|
||||
(export gnc:html-acct-table-add-accounts!)
|
||||
(export gnc:html-acct-table-num-rows)
|
||||
(export gnc:html-acct-table-get-row)
|
||||
(export gnc:html-acct-table-get-cell)
|
||||
(export gnc:html-acct-table-set-cell!)
|
||||
(export gnc:html-acct-table-get-row-env)
|
||||
(export gnc:html-acct-table-set-row-env!)
|
||||
(export gnc:account-code-less-p)
|
||||
(export gnc:account-name-less-p)
|
||||
(export gnc:account-path-less-p)
|
||||
(export gnc:html-table-add-labeled-amount-line!)
|
||||
(export gnc:html-table-add-account-balances)
|
||||
(export gnc-commodity-table)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; <html-acct-table> class
|
||||
@ -512,6 +546,8 @@
|
||||
(define (gnc:make-html-acct-table)
|
||||
(gnc:_make-html-acct-table_ (gnc:make-html-table) #f))
|
||||
|
||||
(define gnc:html-acct-table-set-env! gnc:_html-acct-table-set-env!_)
|
||||
|
||||
(define (gnc:make-html-acct-table/env env)
|
||||
(let ((acct-table (gnc:make-html-acct-table)))
|
||||
(gnc:html-acct-table-set-env! acct-table env)
|
||||
|
@ -24,7 +24,25 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-anytag))
|
||||
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash report html-style-info))
|
||||
(use-modules (gnucash report html-document))
|
||||
|
||||
(export <html-anytag>)
|
||||
(export gnc:html-anytag?)
|
||||
(export gnc:html-anytag-data)
|
||||
(export gnc:html-anytag-set-data!)
|
||||
(export gnc:html-anytag-style)
|
||||
(export gnc:html-anytag-append-data!)
|
||||
(export gnc:html-anytag-set-style!)
|
||||
(export gnc:html-anytag-render div doc)
|
||||
(export gnc:make-html-div)
|
||||
(export gnc:make-html-div/markup)
|
||||
(export gnc:make-html-span)
|
||||
(export gnc:make-html-span/markup)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; <html-anytag> class
|
||||
|
@ -21,6 +21,60 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-barchart))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash report html-chart)
|
||||
(gnucash report report-utilities))
|
||||
|
||||
(export <html-barchart>)
|
||||
(export gnc:html-barchart? )
|
||||
(export gnc:make-html-barchart-internal)
|
||||
(export gnc:make-html-barchart)
|
||||
(export gnc:html-barchart-data)
|
||||
(export gnc:html-barchart-set-data!)
|
||||
(export gnc:html-barchart-width)
|
||||
(export gnc:html-barchart-set-width!)
|
||||
(export gnc:html-barchart-height)
|
||||
(export gnc:html-barchart-set-height!)
|
||||
(export gnc:html-barchart-x-axis-label)
|
||||
(export gnc:html-barchart-set-x-axis-label!)
|
||||
(export gnc:html-barchart-y-axis-label)
|
||||
(export gnc:html-barchart-set-y-axis-label!)
|
||||
(export gnc:html-barchart-row-labels)
|
||||
(export gnc:html-barchart-set-row-labels!)
|
||||
(export gnc:html-barchart-row-labels-rotated?)
|
||||
(export gnc:html-barchart-set-row-labels-rotated?!)
|
||||
(export gnc:html-barchart-stacked?)
|
||||
(export gnc:html-barchart-set-stacked?!)
|
||||
(export gnc:html-barchart-col-labels)
|
||||
(export gnc:html-barchart-set-col-labels!)
|
||||
(export gnc:html-barchart-col-colors)
|
||||
(export gnc:html-barchart-set-col-colors!)
|
||||
(export gnc:html-barchart-legend-reversed?)
|
||||
(export gnc:html-barchart-set-legend-reversed?!)
|
||||
(export gnc:html-barchart-title)
|
||||
(export gnc:html-barchart-set-title!)
|
||||
(export gnc:html-barchart-subtitle)
|
||||
(export gnc:html-barchart-set-subtitle!)
|
||||
(export gnc:html-barchart-button-1-bar-urls)
|
||||
(export gnc:html-barchart-set-button-1-bar-urls!)
|
||||
(export gnc:html-barchart-button-2-bar-urls)
|
||||
(export gnc:html-barchart-set-button-2-bar-urls!)
|
||||
(export gnc:html-barchart-button-3-bar-urls)
|
||||
(export gnc:html-barchart-set-button-3-bar-urls!)
|
||||
(export gnc:html-barchart-button-1-legend-urls)
|
||||
(export gnc:html-barchart-set-button-1-legend-urls!)
|
||||
(export gnc:html-barchart-button-2-legend-urls)
|
||||
(export gnc:html-barchart-set-button-2-legend-urls!)
|
||||
(export gnc:html-barchart-button-3-legend-urls)
|
||||
(export gnc:html-barchart-set-button-3-legend-urls!)
|
||||
(export gnc:html-barchart-append-row!)
|
||||
(export gnc:html-barchart-prepend-row!)
|
||||
(export gnc:html-barchart-append-column!)
|
||||
(export gnc:html-barchart-prepend-column!)
|
||||
(export gnc:html-barchart-render barchart)
|
||||
|
||||
(define <html-barchart>
|
||||
(make-record-type '<html-barchart>
|
||||
'(width
|
||||
|
@ -24,8 +24,36 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-chart))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash json builder)) ;for building JSON options
|
||||
(use-modules (gnucash report html-utilities))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
;; html-chart.scm
|
||||
|
||||
(export gnc:html-chart?)
|
||||
(export gnc:make-html-chart)
|
||||
(export gnc:html-chart-data)
|
||||
(export gnc:html-chart-set-data!)
|
||||
(export gnc:html-chart-width)
|
||||
(export gnc:html-chart-set-width!)
|
||||
(export gnc:html-chart-height)
|
||||
(export gnc:html-chart-set-height!)
|
||||
(export gnc:html-chart-type)
|
||||
(export gnc:html-chart-set-type!)
|
||||
(export gnc:html-chart-title)
|
||||
(export gnc:html-chart-get)
|
||||
(export gnc:html-chart-set!)
|
||||
(export gnc:html-chart-currency-iso)
|
||||
(export gnc:html-chart-set-currency-iso!)
|
||||
(export gnc:html-chart-currency-symbol)
|
||||
(export gnc:html-chart-set-currency-symbol!)
|
||||
(export gnc:html-chart-render)
|
||||
(export gnc:html-chart-set-custom-x-axis-ticks?!)
|
||||
(export gnc:html-chart-set-custom-y-axis-ticks?!)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
@ -33,8 +61,6 @@
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
;; nested-alist-set! parameters are
|
||||
;; lst - a nested alist e.g. (list (cons 'key1 'val1)
|
||||
;; (cons 'key2 (list (cons 'key2-sub1 'val2a))))
|
||||
|
@ -21,9 +21,69 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-document))
|
||||
|
||||
(use-modules (gnucash html))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (gnucash report html-anytag))
|
||||
(use-modules (gnucash report html-barchart))
|
||||
(use-modules (gnucash report html-chart))
|
||||
(use-modules (gnucash report html-linechart))
|
||||
(use-modules (gnucash report html-piechart))
|
||||
(use-modules (gnucash report html-scatter))
|
||||
(use-modules (gnucash report html-style-info))
|
||||
(use-modules (gnucash report html-style-sheet))
|
||||
(use-modules (gnucash report html-table))
|
||||
(use-modules (gnucash report html-text))
|
||||
(use-modules (gnucash report report-utilities))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (ice-9 match))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-9))
|
||||
|
||||
(export <html-document>)
|
||||
(export gnc:html-document?)
|
||||
(export gnc:make-html-document-internal)
|
||||
(export gnc:make-html-document)
|
||||
(export gnc:html-document-set-title!)
|
||||
(export gnc:html-document-title)
|
||||
(export gnc:html-document-set-headline!)
|
||||
(export gnc:html-document-headline)
|
||||
(export gnc:html-document-set-style-text!)
|
||||
(export gnc:html-document-style-text)
|
||||
(export gnc:html-document-set-style-sheet!)
|
||||
(export gnc:html-document-style-sheet)
|
||||
(export gnc:html-document-set-style-stack!)
|
||||
(export gnc:html-document-style-stack)
|
||||
(export gnc:html-document-set-style-internal!)
|
||||
(export gnc:html-document-style)
|
||||
(export gnc:html-document-set-objects!)
|
||||
(export gnc:html-document-objects)
|
||||
(export gnc:html-document?)
|
||||
(export gnc:html-document-set-style!)
|
||||
(export gnc:html-document-tree-collapse)
|
||||
(export gnc:html-document-render)
|
||||
(export gnc:html-document-push-style)
|
||||
(export gnc:html-document-pop-style)
|
||||
(export gnc:html-document-add-object!)
|
||||
(export gnc:html-document-append-objects!)
|
||||
(export gnc:html-document-fetch-markup-style)
|
||||
(export gnc:html-document-fetch-data-style)
|
||||
(export gnc:html-document-markup-start)
|
||||
(export gnc:html-document-markup-end)
|
||||
(export gnc:html-document-render-data)
|
||||
(export gnc:html-document-export-string)
|
||||
(export gnc:html-document-set-export-string)
|
||||
(export gnc:html-document-export-error)
|
||||
(export gnc:html-document-set-export-error)
|
||||
(export <html-object>)
|
||||
(export gnc:html-object?)
|
||||
(export gnc:make-html-object-internal)
|
||||
(export gnc:make-html-object)
|
||||
(export gnc:html-object-renderer)
|
||||
(export gnc:html-object-set-renderer!)
|
||||
(export gnc:html-object-data)
|
||||
(export gnc:html-object-set-data!)
|
||||
(export gnc:html-object-render)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; <html-document> class
|
||||
|
@ -24,10 +24,23 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-fonts))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-report" "scm_init_sw_report_module"))
|
||||
(use-modules (sw_report))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash app-utils options))
|
||||
(use-modules (gnucash report html-document))
|
||||
(use-modules (ice-9 regex))
|
||||
|
||||
;; html-fonts.scm
|
||||
|
||||
(export register-font-options)
|
||||
(export add-css-information-to-doc)
|
||||
(export font-name-to-style-info)
|
||||
|
||||
(define (string-strip s1 s2)
|
||||
(let ((idx (string-contains-ci s1 s2)))
|
||||
(string-append
|
||||
|
@ -24,6 +24,69 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-linechart))
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash report html-chart)
|
||||
(gnucash report report-utilities))
|
||||
|
||||
(export <html-linechart>)
|
||||
(export gnc:html-linechart? )
|
||||
(export gnc:make-html-linechart-internal)
|
||||
(export gnc:make-html-linechart)
|
||||
(export gnc:html-linechart-data)
|
||||
(export gnc:html-linechart-set-data!)
|
||||
(export gnc:html-linechart-width)
|
||||
(export gnc:html-linechart-set-width!)
|
||||
(export gnc:html-linechart-height)
|
||||
(export gnc:html-linechart-set-height!)
|
||||
(export gnc:html-linechart-x-axis-label)
|
||||
(export gnc:html-linechart-set-x-axis-label!)
|
||||
(export gnc:html-linechart-y-axis-label)
|
||||
(export gnc:html-linechart-set-y-axis-label!)
|
||||
(export gnc:html-linechart-row-labels)
|
||||
(export gnc:html-linechart-set-row-labels!)
|
||||
(export gnc:html-linechart-row-labels-rotated?)
|
||||
(export gnc:html-linechart-set-row-labels-rotated?!)
|
||||
(export gnc:html-linechart-stacked?)
|
||||
(export gnc:html-linechart-set-stacked?!)
|
||||
(export gnc:html-linechart-markers?)
|
||||
(export gnc:html-linechart-set-markers?!)
|
||||
(export gnc:html-linechart-major-grid?)
|
||||
(export gnc:html-linechart-set-major-grid?!)
|
||||
(export gnc:html-linechart-minor-grid?)
|
||||
(export gnc:html-linechart-set-minor-grid?!)
|
||||
(export gnc:html-linechart-col-labels)
|
||||
(export gnc:html-linechart-set-col-labels!)
|
||||
(export gnc:html-linechart-col-colors)
|
||||
(export gnc:html-linechart-set-col-colors!)
|
||||
(export gnc:html-linechart-legend-reversed?)
|
||||
(export gnc:html-linechart-set-legend-reversed?!)
|
||||
(export gnc:html-linechart-title)
|
||||
(export gnc:html-linechart-set-title!)
|
||||
(export gnc:html-linechart-subtitle)
|
||||
(export gnc:html-linechart-set-subtitle!)
|
||||
(export gnc:html-linechart-button-1-line-urls)
|
||||
(export gnc:html-linechart-set-button-1-line-urls!)
|
||||
(export gnc:html-linechart-button-2-line-urls)
|
||||
(export gnc:html-linechart-set-button-2-line-urls!)
|
||||
(export gnc:html-linechart-button-3-line-urls)
|
||||
(export gnc:html-linechart-set-button-3-line-urls!)
|
||||
(export gnc:html-linechart-button-1-legend-urls)
|
||||
(export gnc:html-linechart-set-button-1-legend-urls!)
|
||||
(export gnc:html-linechart-button-2-legend-urls)
|
||||
(export gnc:html-linechart-set-button-2-legend-urls!)
|
||||
(export gnc:html-linechart-button-3-legend-urls)
|
||||
(export gnc:html-linechart-set-button-3-legend-urls!)
|
||||
(export gnc:html-linechart-append-row!)
|
||||
(export gnc:html-linechart-prepend-row!)
|
||||
(export gnc:html-linechart-append-column!)
|
||||
(export gnc:html-linechart-prepend-column!)
|
||||
(export gnc:html-linechart-render linechart)
|
||||
(export gnc:html-linechart-set-line-width!)
|
||||
(export gnc:html-linechart-line-width)
|
||||
|
||||
(define <html-linechart>
|
||||
(make-record-type '<html-linechart>
|
||||
'(width
|
||||
|
@ -21,6 +21,44 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-piechart))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash report html-chart)
|
||||
(gnucash report report-utilities))
|
||||
|
||||
(export <html-piechart>)
|
||||
(export gnc:html-piechart?)
|
||||
(export gnc:make-html-piechart-internal)
|
||||
(export gnc:make-html-piechart)
|
||||
(export gnc:html-piechart-data)
|
||||
(export gnc:html-piechart-set-data!)
|
||||
(export gnc:html-piechart-width)
|
||||
(export gnc:html-piechart-set-width!)
|
||||
(export gnc:html-piechart-height)
|
||||
(export gnc:html-piechart-set-height!)
|
||||
(export gnc:html-piechart-labels)
|
||||
(export gnc:html-piechart-set-labels!)
|
||||
(export gnc:html-piechart-colors)
|
||||
(export gnc:html-piechart-set-colors!)
|
||||
(export gnc:html-piechart-title)
|
||||
(export gnc:html-piechart-set-title!)
|
||||
(export gnc:html-piechart-subtitle)
|
||||
(export gnc:html-piechart-set-subtitle!)
|
||||
(export gnc:html-piechart-button-1-slice-urls)
|
||||
(export gnc:html-piechart-set-button-1-slice-urls!)
|
||||
(export gnc:html-piechart-button-2-slice-urls)
|
||||
(export gnc:html-piechart-set-button-2-slice-urls!)
|
||||
(export gnc:html-piechart-button-3-slice-urls)
|
||||
(export gnc:html-piechart-set-button-3-slice-urls!)
|
||||
(export gnc:html-piechart-button-1-legend-urls)
|
||||
(export gnc:html-piechart-set-button-1-legend-urls!)
|
||||
(export gnc:html-piechart-button-2-legend-urls)
|
||||
(export gnc:html-piechart-set-button-2-legend-urls!)
|
||||
(export gnc:html-piechart-button-3-legend-urls)
|
||||
(export gnc:html-piechart-set-button-3-legend-urls!)
|
||||
(export gnc:html-piechart-render)
|
||||
|
||||
(define <html-piechart>
|
||||
(make-record-type '<html-piechart>
|
||||
'(width
|
||||
|
@ -24,6 +24,37 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-scatter))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash report html-chart)
|
||||
(gnucash report report-utilities))
|
||||
|
||||
(export <html-scatter>)
|
||||
(export gnc:html-scatter-add-datapoint!)
|
||||
(export gnc:html-scatter-data)
|
||||
(export gnc:html-scatter-height)
|
||||
(export gnc:html-scatter-marker)
|
||||
(export gnc:html-scatter-markercolor)
|
||||
(export gnc:html-scatter-render)
|
||||
(export gnc:html-scatter-set-data!)
|
||||
(export gnc:html-scatter-set-height!)
|
||||
(export gnc:html-scatter-set-marker!)
|
||||
(export gnc:html-scatter-set-markercolor!)
|
||||
(export gnc:html-scatter-set-subtitle!)
|
||||
(export gnc:html-scatter-set-title!)
|
||||
(export gnc:html-scatter-set-width!)
|
||||
(export gnc:html-scatter-set-x-axis-label!)
|
||||
(export gnc:html-scatter-set-y-axis-label!)
|
||||
(export gnc:html-scatter-subtitle)
|
||||
(export gnc:html-scatter-title)
|
||||
(export gnc:html-scatter-width)
|
||||
(export gnc:html-scatter-x-axis-label)
|
||||
(export gnc:html-scatter-y-axis-label)
|
||||
(export gnc:html-scatter?)
|
||||
(export gnc:make-html-scatter)
|
||||
(export gnc:make-html-scatter-internal)
|
||||
|
||||
(define <html-scatter>
|
||||
(make-record-type '<html-scatter>
|
||||
'(width
|
||||
|
@ -21,8 +21,59 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-style-info))
|
||||
|
||||
(use-modules (ice-9 match))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
|
||||
(export <html-data-style-info>)
|
||||
(export <html-markup-style-info>)
|
||||
(export <html-style-table>)
|
||||
(export gnc:default-html-gnc-monetary-renderer)
|
||||
(export gnc:default-html-gnc-numeric-renderer)
|
||||
(export gnc:default-html-number-renderer)
|
||||
(export gnc:default-html-string-renderer)
|
||||
(export gnc:html-data-style-info-data)
|
||||
(export gnc:html-data-style-info-inheritable?)
|
||||
(export gnc:html-data-style-info-merge)
|
||||
(export gnc:html-data-style-info-renderer)
|
||||
(export gnc:html-data-style-info-set-data!)
|
||||
(export gnc:html-data-style-info-set-inheritable?!)
|
||||
(export gnc:html-data-style-info-set-renderer!)
|
||||
(export gnc:html-data-style-info?)
|
||||
(export gnc:html-data-style-info?)
|
||||
(export gnc:html-markup-style-info-attributes)
|
||||
(export gnc:html-markup-style-info-inheritable?)
|
||||
(export gnc:html-markup-style-info-merge)
|
||||
(export gnc:html-markup-style-info-set!)
|
||||
(export gnc:html-markup-style-info-set-attribute!)
|
||||
(export gnc:html-markup-style-info-set-attributes!)
|
||||
(export gnc:html-markup-style-info-set-inheritable?!)
|
||||
(export gnc:html-markup-style-info-set-tag!)
|
||||
(export gnc:html-markup-style-info-tag)
|
||||
(export gnc:html-markup-style-info?)
|
||||
(export gnc:html-style-info-merge)
|
||||
(export gnc:html-style-table-compile)
|
||||
(export gnc:html-style-table-compiled)
|
||||
(export gnc:html-style-table-compiled?)
|
||||
(export gnc:html-style-table-fetch)
|
||||
(export gnc:html-style-table-inheritable)
|
||||
(export gnc:html-style-table-primary)
|
||||
(export gnc:html-style-table-set!)
|
||||
(export gnc:html-style-table-set-compiled!)
|
||||
(export gnc:html-style-table-set-inheritable!)
|
||||
(export gnc:html-style-table-uncompile)
|
||||
(export gnc:html-style-table?)
|
||||
(export gnc:make-html-data-style-info)
|
||||
(export gnc:make-html-data-style-info-internal)
|
||||
(export gnc:make-html-markup-style-info)
|
||||
(export gnc:make-html-markup-style-info-internal)
|
||||
(export gnc:make-html-style-table)
|
||||
(export gnc:make-html-style-table-internal)
|
||||
(export gnc:default-price-renderer)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; <html-markup-style-info> class
|
||||
|
@ -21,9 +21,51 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-style-sheet))
|
||||
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (ice-9 match))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report html-document))
|
||||
(use-modules (gnucash report html-style-info))
|
||||
|
||||
(export <html-style-sheet-template>)
|
||||
(export gnc:html-style-sheet-template?)
|
||||
(export gnc:html-style-sheet-template-version)
|
||||
(export gnc:html-style-sheet-template-set-version!)
|
||||
(export gnc:html-style-sheet-template-name)
|
||||
(export gnc:html-style-sheet-template-set-name!)
|
||||
(export gnc:html-style-sheet-template-options-generator)
|
||||
(export gnc:html-style-sheet-template-set-options-generator!)
|
||||
(export gnc:html-style-sheet-template-renderer)
|
||||
(export gnc:html-style-sheet-template-set-renderer!)
|
||||
(export gnc:html-style-sheet-template-find)
|
||||
(export gnc:define-html-style-sheet)
|
||||
(export <html-style-sheet>)
|
||||
(export gnc:html-style-sheet?)
|
||||
(export gnc:html-style-sheet-name)
|
||||
(export gnc:html-style-sheet-set-name!)
|
||||
(export gnc:html-style-sheet-type)
|
||||
(export gnc:html-style-sheet-set-type!)
|
||||
(export gnc:html-style-sheet-options)
|
||||
(export gnc:html-style-sheet-set-options!)
|
||||
(export gnc:html-style-sheet-renderer)
|
||||
(export gnc:html-style-sheet-set-renderer!)
|
||||
(export gnc:make-html-style-sheet-internal)
|
||||
(export gnc:html-style-sheet-style)
|
||||
(export gnc:html-style-sheet-set-style!)
|
||||
(export gnc:make-html-style-sheet)
|
||||
(export gnc:restore-html-style-sheet)
|
||||
(export gnc:html-style-sheet-apply-changes)
|
||||
(export gnc:html-style-sheet-render)
|
||||
(export gnc:get-html-style-sheets)
|
||||
(export gnc:get-html-templates)
|
||||
(export gnc:html-style-sheet-find)
|
||||
(export gnc:save-style-sheet-options)
|
||||
(export gnc:html-style-sheet-remove)
|
||||
|
||||
(define *gnc:_style-sheet-templates_* (make-hash-table 23))
|
||||
(define *gnc:_style-sheets_* (make-hash-table 23))
|
||||
|
@ -23,8 +23,82 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-table))
|
||||
|
||||
(use-modules (srfi srfi-2))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash report html-style-info))
|
||||
(use-modules (gnucash report html-document))
|
||||
(use-modules (gnucash report report-utilities))
|
||||
|
||||
(export <html-table>)
|
||||
(export gnc:html-table?)
|
||||
(export <html-table-cell>)
|
||||
(export gnc:make-html-table-cell-internal)
|
||||
(export gnc:make-html-table-cell)
|
||||
(export gnc:make-html-table-cell/size)
|
||||
(export gnc:make-html-table-cell/markup)
|
||||
(export gnc:make-html-table-cell/size/markup)
|
||||
(export gnc:make-html-table-header-cell)
|
||||
(export gnc:make-html-table-header-cell/markup)
|
||||
(export gnc:make-html-table-header-cell/size)
|
||||
(export gnc:make-html-table-cell/min-width)
|
||||
(export gnc:html-table-cell?)
|
||||
(export gnc:html-table-cell-rowspan)
|
||||
(export gnc:html-table-cell-set-rowspan!)
|
||||
(export gnc:html-table-cell-colspan)
|
||||
(export gnc:html-table-cell-set-colspan!)
|
||||
(export gnc:html-table-cell-tag)
|
||||
(export gnc:html-table-cell-set-tag!)
|
||||
(export gnc:html-table-cell-data)
|
||||
(export gnc:html-table-cell-set-data-internal!)
|
||||
(export gnc:html-table-cell-style)
|
||||
(export gnc:html-table-cell-set-style-internal!)
|
||||
(export gnc:html-table-cell-set-style!)
|
||||
(export gnc:html-table-cell-append-objects!)
|
||||
(export gnc:html-table-cell-render)
|
||||
(export gnc:make-html-table-internal)
|
||||
(export gnc:make-html-table)
|
||||
(export gnc:html-table-data)
|
||||
(export gnc:html-table-set-data!)
|
||||
(export gnc:html-table-caption)
|
||||
(export gnc:html-table-set-caption!)
|
||||
(export gnc:html-table-set-col-headers!)
|
||||
(export gnc:html-table-multirow-col-headers)
|
||||
(export gnc:html-table-set-multirow-col-headers!)
|
||||
(export gnc:html-table-style)
|
||||
(export gnc:html-table-set-style-internal!)
|
||||
(export gnc:html-table-row-styles)
|
||||
(export gnc:html-table-set-row-styles!)
|
||||
(export gnc:html-table-row-markup-table)
|
||||
(export gnc:html-table-row-markup)
|
||||
(export gnc:html-table-set-row-markup-table!)
|
||||
(export gnc:html-table-set-row-markup!)
|
||||
(export gnc:html-table-col-styles)
|
||||
(export gnc:html-table-set-col-styles!)
|
||||
(export gnc:html-table-col-headers-style)
|
||||
(export gnc:html-table-set-col-headers-style!)
|
||||
(export gnc:html-table-row-headers-style)
|
||||
(export gnc:html-table-set-row-headers-style!)
|
||||
(export gnc:html-table-set-last-row-style!)
|
||||
(export gnc:html-table-set-style!)
|
||||
(export gnc:html-table-set-col-style!)
|
||||
(export gnc:html-table-set-row-style!)
|
||||
(export gnc:html-table-row-style)
|
||||
(export gnc:html-table-col-style)
|
||||
(export gnc:html-table-num-rows)
|
||||
(export gnc:html-table-set-num-rows-internal!)
|
||||
(export gnc:html-table-num-columns)
|
||||
(export gnc:html-table-append-row/markup!)
|
||||
(export gnc:html-table-prepend-row/markup!)
|
||||
(export gnc:html-table-append-row!)
|
||||
(export gnc:html-table-prepend-row!)
|
||||
(export gnc:html-table-get-cell)
|
||||
(export gnc:html-table-set-cell!)
|
||||
(export gnc:html-table-set-cell/tag!)
|
||||
(export gnc:html-table-append-column!)
|
||||
(export gnc:html-table-render)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
|
@ -21,9 +21,49 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-text))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash report html-style-info))
|
||||
(use-modules (gnucash report html-document))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(export <html-text>)
|
||||
(export gnc:html-text?)
|
||||
(export gnc:make-html-text-internal)
|
||||
(export gnc:make-html-text)
|
||||
(export gnc:html-text?)
|
||||
(export gnc:html-text-body)
|
||||
(export gnc:html-text-set-body-internal!)
|
||||
(export gnc:html-text-set-body!)
|
||||
(export gnc:html-text-style)
|
||||
(export gnc:html-text-set-style-internal!)
|
||||
(export gnc:html-text-set-style!)
|
||||
(export gnc:html-text-append!)
|
||||
(export gnc:html-markup)
|
||||
(export gnc:html-markup/attr)
|
||||
(export gnc:html-markup/no-end)
|
||||
(export gnc:html-markup/attr/no-end)
|
||||
(export gnc:html-markup/format)
|
||||
(export gnc:html-markup-p)
|
||||
(export gnc:html-markup-tt)
|
||||
(export gnc:html-markup-em)
|
||||
(export gnc:html-markup-b)
|
||||
(export gnc:html-markup-i)
|
||||
(export gnc:html-markup-h1)
|
||||
(export gnc:html-markup-h2)
|
||||
(export gnc:html-markup-h3)
|
||||
(export gnc:html-markup-br)
|
||||
(export gnc:html-markup-hr)
|
||||
(export gnc:html-markup-ol)
|
||||
(export gnc:html-markup-ul)
|
||||
(export gnc:html-markup-anchor)
|
||||
(export gnc:html-markup-img)
|
||||
(export gnc:html-text-render)
|
||||
(export gnc:html-text-render-markup)
|
||||
(export gnc:html-markup/open-tag-only)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; <html-text> class
|
||||
;; just plain-old text. some utilities to add markup.
|
||||
|
@ -22,10 +22,55 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report html-utilities))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash html))
|
||||
(use-modules (gnucash report report-core))
|
||||
(use-modules (gnucash report report-utilities))
|
||||
(use-modules (gnucash report html-style-info))
|
||||
(use-modules (gnucash report html-text))
|
||||
(use-modules (gnucash report html-table))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(export gnc:html-make-empty-cell)
|
||||
(export gnc:html-make-empty-cells)
|
||||
(export gnc:account-anchor-text)
|
||||
(export gnc:split-anchor-text)
|
||||
(export gnc:transaction-anchor-text)
|
||||
(export gnc:transaction-doclink-anchor-text)
|
||||
(export gnc:report-anchor-text)
|
||||
(export gnc:make-report-anchor)
|
||||
(export gnc:html-account-anchor)
|
||||
(export gnc:html-split-anchor)
|
||||
(export gnc:html-transaction-anchor)
|
||||
(export gnc:html-transaction-doclink-anchor)
|
||||
(export gnc:html-invoice-doclink-anchor)
|
||||
(export gnc:html-price-anchor)
|
||||
(export gnc:customer-anchor-text)
|
||||
(export gnc:job-anchor-text)
|
||||
(export gnc:vendor-anchor-text)
|
||||
(export gnc:invoice-anchor-text)
|
||||
(export gnc:owner-anchor-text)
|
||||
(export gnc:owner-report-text)
|
||||
(export gnc:assign-colors)
|
||||
(export gnc:html-table-append-ruler!)
|
||||
(export gnc:html-make-exchangerates)
|
||||
(export gnc:html-make-rates-table)
|
||||
(export gnc:html-render-options-changed)
|
||||
(export gnc:html-make-generic-warning)
|
||||
(export gnc:html-make-no-account-warning)
|
||||
(export gnc:html-make-generic-budget-warning)
|
||||
(export gnc:html-make-generic-options-warning)
|
||||
(export gnc:html-make-generic-simple-warning)
|
||||
(export gnc:html-make-empty-data-warning)
|
||||
(export gnc:html-make-options-link)
|
||||
(export gnc:html-js-include)
|
||||
(export gnc:html-css-include)
|
||||
|
||||
;; returns a list with n #f (empty cell) values
|
||||
(define (gnc:html-make-empty-cell) #f)
|
||||
(define (gnc:html-make-empty-cells n)
|
||||
|
@ -21,7 +21,22 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report options-utilities))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash app-utils))
|
||||
|
||||
(export gnc:options-add-report-date!)
|
||||
(export gnc:options-add-date-interval!)
|
||||
(export gnc:options-add-interval-choice!)
|
||||
(export gnc:options-add-account-levels!)
|
||||
(export gnc:options-add-account-selection!)
|
||||
(export gnc:options-add-currency!)
|
||||
(export gnc:options-add-price-source!)
|
||||
(export gnc:options-add-plot-size!)
|
||||
(export gnc:options-add-marker-choice!)
|
||||
(export gnc:options-add-sort-method!)
|
||||
(export gnc:options-add-subtotal-view!)
|
||||
|
||||
;; These are just a bunch of options which were useful in several
|
||||
;; reports and hence they got defined in a separate function.
|
||||
|
@ -19,21 +19,100 @@
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define-module (gnucash report report-core))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-report" "scm_init_sw_report_module"))
|
||||
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash core-utils))
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-report" "scm_init_sw_report_module"))
|
||||
(use-modules (sw_report))
|
||||
|
||||
(use-modules (gnucash gnome-utils))
|
||||
(use-modules (ice-9 match))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-9))
|
||||
(use-modules (gnucash report report-register-hooks))
|
||||
(use-modules (gnucash report html-style-sheet))
|
||||
(use-modules (gnucash report html-document))
|
||||
(use-modules (gnucash report html-utilities))
|
||||
|
||||
; Export the swig-wrapped symbols in the public interface of this module
|
||||
(let ((i (module-public-interface (current-module))))
|
||||
(module-use! i (resolve-interface '(sw_report))))
|
||||
(load-and-reexport (sw_report))
|
||||
|
||||
(export <report>)
|
||||
(export gnc:all-report-template-guids)
|
||||
(export gnc:custom-report-template-guids)
|
||||
(export gnc:define-report)
|
||||
(export gnc:delete-report)
|
||||
(export gnc:find-report-template)
|
||||
(export gnc:is-custom-report-type)
|
||||
(export gnc:make-report)
|
||||
(export gnc:make-report-options)
|
||||
(export gnc:menuname-asset-liability)
|
||||
(export gnc:menuname-budget)
|
||||
(export gnc:menuname-business-reports)
|
||||
(export gnc:menuname-custom)
|
||||
(export gnc:menuname-example)
|
||||
(export gnc:menuname-experimental)
|
||||
(export gnc:menuname-income-expense)
|
||||
(export gnc:menuname-multicolumn)
|
||||
(export gnc:menuname-reports)
|
||||
(export gnc:menuname-taxes)
|
||||
(export gnc:optname-invoice-number)
|
||||
(export gnc:optname-reportname)
|
||||
(export gnc:pagename-accounts)
|
||||
(export gnc:pagename-display)
|
||||
(export gnc:pagename-general)
|
||||
(export gnc:rename-report)
|
||||
(export gnc:report-ctext)
|
||||
(export gnc:report-dirty?)
|
||||
(export gnc:report-editor-widget)
|
||||
(export gnc:report-embedded-list)
|
||||
(export gnc:report-export-thunk)
|
||||
(export gnc:report-export-types)
|
||||
(export gnc:report-id)
|
||||
(export gnc:report-menu-name)
|
||||
(export gnc:report-name)
|
||||
(export gnc:report-needs-save?)
|
||||
(export gnc:report-options)
|
||||
(export gnc:report-render-html)
|
||||
(export gnc:report-run)
|
||||
(export gnc:report-serialize)
|
||||
(export gnc:report-set-ctext!)
|
||||
(export gnc:report-set-dirty?!)
|
||||
(export gnc:report-set-editor-widget!)
|
||||
(export gnc:report-set-id!)
|
||||
(export gnc:report-set-needs-save?!)
|
||||
(export gnc:report-set-options!)
|
||||
(export gnc:report-set-stylesheet!)
|
||||
(export gnc:report-set-type!)
|
||||
(export gnc:report-stylesheet)
|
||||
(export gnc:report-template-export-thunk)
|
||||
(export gnc:report-template-export-types)
|
||||
(export gnc:report-template-has-unique-name?)
|
||||
(export gnc:report-template-in-menu?)
|
||||
(export gnc:report-template-is-custom/template-guid?)
|
||||
(export gnc:report-template-menu-name)
|
||||
(export gnc:report-template-menu-name/report-guid)
|
||||
(export gnc:report-template-menu-path)
|
||||
(export gnc:report-template-menu-tip)
|
||||
(export gnc:report-template-name)
|
||||
(export gnc:report-template-new-options)
|
||||
(export gnc:report-template-new-options/report-guid)
|
||||
(export gnc:report-template-options-changed-cb)
|
||||
(export gnc:report-template-options-cleanup-cb)
|
||||
(export gnc:report-template-options-generator)
|
||||
(export gnc:report-template-renderer)
|
||||
(export gnc:report-template-renderer/report-guid)
|
||||
(export gnc:report-template-report-guid)
|
||||
(export gnc:report-template-set-report-guid!)
|
||||
(export gnc:report-template-version)
|
||||
(export gnc:report-templates-for-each)
|
||||
(export gnc:report-to-template-new)
|
||||
(export gnc:report-to-template-update)
|
||||
(export gnc:report-type)
|
||||
(export gnc:restore-report-by-guid)
|
||||
(export gnc:restore-report-by-guid-with-custom-template)
|
||||
|
||||
;; Terminology in this file:
|
||||
;; report-template: a report definition of some form. This can be a report
|
||||
|
@ -23,8 +23,14 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report report-register-hooks))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (srfi srfi-9))
|
||||
|
||||
(export gnc:register-report-hook)
|
||||
(export gnc:lookup-register-report)
|
||||
|
||||
(define gnc:*register-report-hash* (make-hash-table 23))
|
||||
|
||||
;; Keep a hash-table of records, keyed off the account type. Each
|
||||
|
@ -17,11 +17,93 @@
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(use-modules (srfi srfi-26))
|
||||
(define-module (gnucash report report-utilities))
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (srfi srfi-26))
|
||||
(use-modules (ice-9 format))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report html-text))
|
||||
(use-modules (gnucash report html-acct-table))
|
||||
(use-modules (gnucash gnome-utils))
|
||||
|
||||
(export list-ref-safe)
|
||||
(export list-set-safe!)
|
||||
(export gnc:monetary->string)
|
||||
(export gnc:not-all-zeros)
|
||||
(export gnc:account-has-shares?)
|
||||
(export gnc:account-is-stock?)
|
||||
(export gnc:account-is-inc-exp?)
|
||||
(export gnc:account-full-name<?)
|
||||
(export gnc:accounts-get-children-depth)
|
||||
(export gnc:filter-accountlist-type)
|
||||
(export gnc:decompose-accountlist)
|
||||
(export gnc:account-get-type-string-plural)
|
||||
(export gnc:accounts-get-commodities)
|
||||
(export gnc:get-current-account-tree-depth)
|
||||
(export gnc:accounts-and-all-descendants)
|
||||
(export gnc:make-value-collector)
|
||||
(export gnc:make-commodity-collector)
|
||||
(export gnc:collector+)
|
||||
(export gnc:collector-)
|
||||
(export gnc:commodity-collector-get-negated)
|
||||
(export gnc:account-accumulate-at-dates)
|
||||
(export gnc:account-get-balance-at-date)
|
||||
(export gnc:account-get-balances-at-dates)
|
||||
(export gnc:account-get-comm-balance-at-date)
|
||||
(export gnc:account-get-comm-value-interval)
|
||||
(export gnc:account-get-comm-value-at-date)
|
||||
(export gnc:accounts-get-balance-helper)
|
||||
(export gnc:accounts-get-comm-total-profit)
|
||||
(export gnc:accounts-get-comm-total-income)
|
||||
(export gnc:accounts-get-comm-total-expense)
|
||||
(export gnc:accounts-get-comm-total-assets)
|
||||
(export gnc:account-get-balance-interval)
|
||||
(export gnc:account-get-comm-balance-interval)
|
||||
(export gnc:accountlist-get-comm-balance-interval)
|
||||
(export gnc:accountlist-get-comm-balance-interval-with-closing)
|
||||
(export gnc:accountlist-get-comm-balance-at-date)
|
||||
(export gnc:accountlist-get-comm-balance-at-date-with-closing)
|
||||
(export gnc:query-set-match-non-voids-only!)
|
||||
(export gnc:query-set-match-voids-only!)
|
||||
(export gnc:split-voided?)
|
||||
(export gnc:report-starting)
|
||||
(export gnc:report-render-starting)
|
||||
(export gnc:report-percent-done)
|
||||
(export gnc:report-finished)
|
||||
(export gnc:accounts-count-splits)
|
||||
(export gnc-commodity-collector-allzero?)
|
||||
(export gnc:monetary+)
|
||||
(export gnc:monetaries-add)
|
||||
(export gnc:account-get-trans-type-balance-interval)
|
||||
(export gnc:account-get-trans-type-balance-interval-with-closing)
|
||||
(export gnc:account-get-trans-type-splits-interval)
|
||||
(export gnc:budget-get-start-date)
|
||||
(export gnc:budget-get-end-date)
|
||||
(export gnc:budget-account-get-net)
|
||||
(export gnc:budget-accountlist-get-net)
|
||||
(export gnc:budget-account-get-initial-balance)
|
||||
(export gnc:budget-accountlist-get-initial-balance)
|
||||
(export budget-account-sum budget)
|
||||
(export gnc:get-account-period-rolledup-budget-value)
|
||||
(export gnc:budget-account-get-rolledup-net)
|
||||
(export gnc:get-assoc-account-balances)
|
||||
(export gnc:select-assoc-account-balance)
|
||||
(export gnc:get-assoc-account-balances-total)
|
||||
(export gnc:multiline-to-html-text)
|
||||
(export make-file-url)
|
||||
(export gnc:strify)
|
||||
(export gnc:pk)
|
||||
(export gnc:dump-book)
|
||||
(export gnc:dump-invoices)
|
||||
(export gnc:dump-lot)
|
||||
|
||||
(define (list-ref-safe list elt)
|
||||
(and (> (length list) elt)
|
||||
(list-ref list elt)))
|
||||
@ -412,24 +494,24 @@
|
||||
((date . rest)
|
||||
(define (before-date? s) (<= (to-date s) date))
|
||||
(define (after-date? s) (< date (to-date s)))
|
||||
(match splits
|
||||
(cond
|
||||
|
||||
;; end of splits, but still has dates. pad with last-result
|
||||
;; until end of dates.
|
||||
(() (lp '() rest (cons last-result result) last-result))
|
||||
;; end of splits, but still has dates. pad with last-result
|
||||
;; until end of dates.
|
||||
((null? splits) (lp '() rest (cons last-result result) last-result))
|
||||
|
||||
;; the next split is still before date.
|
||||
((and (_ (? before-date?) . _) (head . tail))
|
||||
(lp tail dates result (split->elt head)))
|
||||
;; the next split is still before date.
|
||||
((and (pair? (cdr splits)) (before-date? (cadr splits)))
|
||||
(lp (cdr splits) dates result (split->elt (car splits))))
|
||||
|
||||
;; head split after date, accumulate previous result
|
||||
(((? after-date?) . tail)
|
||||
(lp splits rest (cons last-result result) last-result))
|
||||
;; head split after date, accumulate previous result
|
||||
((after-date? (car splits))
|
||||
(lp splits rest (cons last-result result) last-result))
|
||||
|
||||
;; head split before date, next split after date, or end.
|
||||
((head . tail)
|
||||
(let ((head-result (split->elt head)))
|
||||
(lp tail rest (cons head-result result) head-result))))))))
|
||||
;; head split before date, next split after date, or end.
|
||||
(else
|
||||
(let ((head-result (split->elt (car splits))))
|
||||
(lp (cdr splits) rest (cons head-result result) head-result))))))))
|
||||
|
||||
;; This works similar as above but returns a commodity-collector,
|
||||
;; thus takes care of children accounts with different currencies.
|
||||
|
@ -33,756 +33,38 @@
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash gnome-utils))
|
||||
(use-modules (gnucash html))
|
||||
|
||||
;; commodity-utilities.scm
|
||||
(export gnc:get-match-commodity-splits)
|
||||
(export gnc:get-match-commodity-splits-sorted)
|
||||
(export gnc:get-all-commodity-splits )
|
||||
(export gnc:exchange-by-euro-numeric)
|
||||
(export gnc:get-commodity-totalavg-prices)
|
||||
(export gnc:get-commoditylist-totalavg-prices)
|
||||
(export gnc:get-commodity-inst-prices)
|
||||
(export gnc:pricelist-price-find-nearest)
|
||||
(export gnc:pricealist-lookup-nearest-in-time)
|
||||
(export gnc:resolve-unknown-comm)
|
||||
(export gnc:get-exchange-totals)
|
||||
(export gnc:get-exchange-cost-totals)
|
||||
(export gnc:make-exchange-alist)
|
||||
(export gnc:make-exchange-cost-alist)
|
||||
(export gnc:exchange-by-euro)
|
||||
(export gnc:exchange-if-same)
|
||||
(export gnc:make-exchange-function)
|
||||
(export gnc:exchange-by-pricedb-latest )
|
||||
(export gnc:exchange-by-pricedb-nearest)
|
||||
(export gnc:exchange-by-pricealist-nearest)
|
||||
(export gnc:case-exchange-fn)
|
||||
(export gnc:case-exchange-time-fn)
|
||||
(export gnc:case-price-fn)
|
||||
(export gnc:sum-collector-commodity)
|
||||
|
||||
;; options-utilities.scm
|
||||
|
||||
(export gnc:options-add-report-date!)
|
||||
(export gnc:options-add-date-interval!)
|
||||
(export gnc:options-add-interval-choice!)
|
||||
(export gnc:options-add-account-levels!)
|
||||
(export gnc:options-add-account-selection!)
|
||||
(export gnc:options-add-currency!)
|
||||
(export gnc:options-add-price-source!)
|
||||
(export gnc:options-add-plot-size!)
|
||||
(export gnc:options-add-marker-choice!)
|
||||
(export gnc:options-add-sort-method!)
|
||||
(export gnc:options-add-subtotal-view!)
|
||||
|
||||
;; html-fonts.scm
|
||||
|
||||
(export register-font-options)
|
||||
(export add-css-information-to-doc)
|
||||
|
||||
;; html-utilities.scm
|
||||
|
||||
(export gnc:html-make-empty-cell)
|
||||
(export gnc:html-make-empty-cells)
|
||||
(export gnc:account-anchor-text)
|
||||
(export gnc:split-anchor-text)
|
||||
(export gnc:transaction-anchor-text)
|
||||
(export gnc:transaction-doclink-anchor-text)
|
||||
(export gnc:report-anchor-text)
|
||||
(export gnc:make-report-anchor)
|
||||
(export gnc:html-account-anchor)
|
||||
(export gnc:html-split-anchor)
|
||||
(export gnc:html-transaction-anchor)
|
||||
(export gnc:html-transaction-doclink-anchor)
|
||||
(export gnc:html-invoice-doclink-anchor)
|
||||
(export gnc:html-price-anchor)
|
||||
(export gnc:customer-anchor-text)
|
||||
(export gnc:job-anchor-text)
|
||||
(export gnc:vendor-anchor-text)
|
||||
(export gnc:invoice-anchor-text)
|
||||
(export gnc:owner-anchor-text)
|
||||
(export gnc:owner-report-text)
|
||||
(export gnc:assign-colors)
|
||||
(export gnc:html-table-append-ruler!)
|
||||
(export gnc:html-make-exchangerates)
|
||||
(export gnc:html-make-rates-table)
|
||||
(export gnc:html-render-options-changed)
|
||||
(export gnc:html-make-generic-warning)
|
||||
(export gnc:html-make-no-account-warning)
|
||||
(export gnc:html-make-generic-budget-warning)
|
||||
(export gnc:html-make-generic-options-warning)
|
||||
(export gnc:html-make-generic-simple-warning)
|
||||
(export gnc:html-make-empty-data-warning)
|
||||
(export gnc:html-make-options-link)
|
||||
(export gnc:html-js-include)
|
||||
(export gnc:html-css-include)
|
||||
|
||||
;; report-core.scm
|
||||
(export gnc:menuname-reports)
|
||||
(export gnc:menuname-asset-liability)
|
||||
(export gnc:menuname-income-expense)
|
||||
(export gnc:menuname-budget)
|
||||
(export gnc:menuname-taxes)
|
||||
(export gnc:menuname-example)
|
||||
(export gnc:menuname-multicolumn)
|
||||
(export gnc:menuname-experimental)
|
||||
(export gnc:menuname-custom)
|
||||
(export gnc:menuname-business-reports)
|
||||
(export gnc:pagename-general)
|
||||
(export gnc:pagename-accounts)
|
||||
(export gnc:pagename-display)
|
||||
(export gnc:optname-reportname)
|
||||
(export gnc:optname-invoice-number)
|
||||
|
||||
(export gnc:define-report)
|
||||
(export <report>)
|
||||
(export gnc:report-template-new-options/report-guid)
|
||||
(export gnc:report-template-menu-name/report-guid)
|
||||
(export gnc:report-template-renderer/report-guid)
|
||||
(export gnc:report-template-new-options)
|
||||
(export gnc:report-template-version)
|
||||
(export gnc:report-template-name)
|
||||
(export gnc:report-template-report-guid)
|
||||
(export gnc:report-template-set-report-guid!)
|
||||
(export gnc:report-template-options-generator)
|
||||
(export gnc:report-template-options-cleanup-cb)
|
||||
(export gnc:report-template-options-changed-cb)
|
||||
(export gnc:report-template-renderer)
|
||||
(export gnc:report-template-in-menu?)
|
||||
(export gnc:report-template-menu-path)
|
||||
(export gnc:report-template-menu-name)
|
||||
(export gnc:report-template-menu-tip)
|
||||
(export gnc:report-template-export-types)
|
||||
(export gnc:report-template-export-thunk)
|
||||
(export gnc:report-template-has-unique-name?)
|
||||
(export gnc:report-type)
|
||||
(export gnc:report-set-type!)
|
||||
(export gnc:report-id)
|
||||
(export gnc:report-set-id!)
|
||||
(export gnc:report-options)
|
||||
(export gnc:report-set-options!)
|
||||
(export gnc:report-needs-save?)
|
||||
(export gnc:report-set-needs-save?!)
|
||||
(export gnc:report-dirty?)
|
||||
(export gnc:report-set-dirty?!)
|
||||
(export gnc:report-editor-widget)
|
||||
(export gnc:report-set-editor-widget!)
|
||||
(export gnc:report-ctext)
|
||||
(export gnc:report-set-ctext!)
|
||||
(export gnc:make-report)
|
||||
(export gnc:restore-report-by-guid)
|
||||
(export gnc:restore-report-by-guid-with-custom-template)
|
||||
(export gnc:make-report-options)
|
||||
(export gnc:report-export-types)
|
||||
(export gnc:report-export-thunk)
|
||||
(export gnc:report-menu-name)
|
||||
(export gnc:report-name)
|
||||
(export gnc:report-stylesheet)
|
||||
(export gnc:report-set-stylesheet!)
|
||||
(export gnc:all-report-template-guids)
|
||||
(export gnc:custom-report-template-guids)
|
||||
(export gnc:delete-report)
|
||||
(export gnc:rename-report)
|
||||
(export gnc:find-report-template)
|
||||
(export gnc:report-serialize)
|
||||
(export gnc:report-to-template-new)
|
||||
(export gnc:report-to-template-update)
|
||||
(export gnc:report-render-html)
|
||||
(export gnc:report-run)
|
||||
(export gnc:report-templates-for-each)
|
||||
(export gnc:report-embedded-list)
|
||||
(export gnc:report-template-is-custom/template-guid?)
|
||||
(export gnc:is-custom-report-type)
|
||||
|
||||
;; html-barchart.scm
|
||||
|
||||
(export <html-barchart>)
|
||||
(export gnc:html-barchart? )
|
||||
(export gnc:make-html-barchart-internal)
|
||||
(export gnc:make-html-barchart)
|
||||
(export gnc:html-barchart-data)
|
||||
(export gnc:html-barchart-set-data!)
|
||||
(export gnc:html-barchart-width)
|
||||
(export gnc:html-barchart-set-width!)
|
||||
(export gnc:html-barchart-height)
|
||||
(export gnc:html-barchart-set-height!)
|
||||
(export gnc:html-barchart-x-axis-label)
|
||||
(export gnc:html-barchart-set-x-axis-label!)
|
||||
(export gnc:html-barchart-y-axis-label)
|
||||
(export gnc:html-barchart-set-y-axis-label!)
|
||||
(export gnc:html-barchart-row-labels)
|
||||
(export gnc:html-barchart-set-row-labels!)
|
||||
(export gnc:html-barchart-row-labels-rotated?)
|
||||
(export gnc:html-barchart-set-row-labels-rotated?!)
|
||||
(export gnc:html-barchart-stacked?)
|
||||
(export gnc:html-barchart-set-stacked?!)
|
||||
(export gnc:html-barchart-col-labels)
|
||||
(export gnc:html-barchart-set-col-labels!)
|
||||
(export gnc:html-barchart-col-colors)
|
||||
(export gnc:html-barchart-set-col-colors!)
|
||||
(export gnc:html-barchart-legend-reversed?)
|
||||
(export gnc:html-barchart-set-legend-reversed?!)
|
||||
(export gnc:html-barchart-title)
|
||||
(export gnc:html-barchart-set-title!)
|
||||
(export gnc:html-barchart-subtitle)
|
||||
(export gnc:html-barchart-set-subtitle!)
|
||||
(export gnc:html-barchart-button-1-bar-urls)
|
||||
(export gnc:html-barchart-set-button-1-bar-urls!)
|
||||
(export gnc:html-barchart-button-2-bar-urls)
|
||||
(export gnc:html-barchart-set-button-2-bar-urls!)
|
||||
(export gnc:html-barchart-button-3-bar-urls)
|
||||
(export gnc:html-barchart-set-button-3-bar-urls!)
|
||||
(export gnc:html-barchart-button-1-legend-urls)
|
||||
(export gnc:html-barchart-set-button-1-legend-urls!)
|
||||
(export gnc:html-barchart-button-2-legend-urls)
|
||||
(export gnc:html-barchart-set-button-2-legend-urls!)
|
||||
(export gnc:html-barchart-button-3-legend-urls)
|
||||
(export gnc:html-barchart-set-button-3-legend-urls!)
|
||||
(export gnc:html-barchart-append-row!)
|
||||
(export gnc:html-barchart-prepend-row!)
|
||||
(export gnc:html-barchart-append-column!)
|
||||
(export gnc:not-all-zeros)
|
||||
(export gnc:html-barchart-prepend-column!)
|
||||
(export gnc:html-barchart-render barchart)
|
||||
|
||||
;; html-document.scm
|
||||
|
||||
(export <html-document>)
|
||||
(export gnc:html-document?)
|
||||
(export gnc:make-html-document-internal)
|
||||
(export gnc:make-html-document)
|
||||
(export gnc:html-document-set-title!)
|
||||
(export gnc:html-document-title)
|
||||
(export gnc:html-document-set-headline!)
|
||||
(export gnc:html-document-headline)
|
||||
(export gnc:html-document-set-style-text!)
|
||||
(export gnc:html-document-style-text)
|
||||
(export gnc:html-document-set-style-sheet!)
|
||||
(export gnc:html-document-style-sheet)
|
||||
(export gnc:html-document-set-style-stack!)
|
||||
(export gnc:html-document-style-stack)
|
||||
(export gnc:html-document-set-style-internal!)
|
||||
(export gnc:html-document-style)
|
||||
(export gnc:html-document-set-objects!)
|
||||
(export gnc:html-document-objects)
|
||||
(export gnc:html-document?)
|
||||
(export gnc:html-document-set-style!)
|
||||
(export gnc:html-document-tree-collapse)
|
||||
(export gnc:html-document-render)
|
||||
(export gnc:html-document-push-style)
|
||||
(export gnc:html-document-pop-style)
|
||||
(export gnc:html-document-add-object!)
|
||||
(export gnc:html-document-append-objects!)
|
||||
(export gnc:html-document-fetch-markup-style)
|
||||
(export gnc:html-document-fetch-data-style)
|
||||
(export gnc:html-document-markup-start)
|
||||
(export gnc:html-document-markup-end)
|
||||
(export gnc:html-document-render-data)
|
||||
(export gnc:html-document-export-string)
|
||||
(export gnc:html-document-set-export-string)
|
||||
(export gnc:html-document-export-error)
|
||||
(export gnc:html-document-set-export-error)
|
||||
(export <html-object>)
|
||||
(export gnc:html-object?)
|
||||
(export gnc:make-html-object-internal)
|
||||
(export gnc:make-html-object)
|
||||
(export gnc:html-object-renderer)
|
||||
(export gnc:html-object-set-renderer!)
|
||||
(export gnc:html-object-data)
|
||||
(export gnc:html-object-set-data!)
|
||||
(export gnc:html-object-render)
|
||||
|
||||
;; html-piechart.scm
|
||||
|
||||
(export <html-piechart>)
|
||||
(export gnc:html-piechart?)
|
||||
(export gnc:make-html-piechart-internal)
|
||||
(export gnc:make-html-piechart)
|
||||
(export gnc:html-piechart-data)
|
||||
(export gnc:html-piechart-set-data!)
|
||||
(export gnc:html-piechart-width)
|
||||
(export gnc:html-piechart-set-width!)
|
||||
(export gnc:html-piechart-height)
|
||||
(export gnc:html-piechart-set-height!)
|
||||
(export gnc:html-piechart-labels)
|
||||
(export gnc:html-piechart-set-labels!)
|
||||
(export gnc:html-piechart-colors)
|
||||
(export gnc:html-piechart-set-colors!)
|
||||
(export gnc:html-piechart-title)
|
||||
(export gnc:html-piechart-set-title!)
|
||||
(export gnc:html-piechart-subtitle)
|
||||
(export gnc:html-piechart-set-subtitle!)
|
||||
(export gnc:html-piechart-button-1-slice-urls)
|
||||
(export gnc:html-piechart-set-button-1-slice-urls!)
|
||||
(export gnc:html-piechart-button-2-slice-urls)
|
||||
(export gnc:html-piechart-set-button-2-slice-urls!)
|
||||
(export gnc:html-piechart-button-3-slice-urls)
|
||||
(export gnc:html-piechart-set-button-3-slice-urls!)
|
||||
(export gnc:html-piechart-button-1-legend-urls)
|
||||
(export gnc:html-piechart-set-button-1-legend-urls!)
|
||||
(export gnc:html-piechart-button-2-legend-urls)
|
||||
(export gnc:html-piechart-set-button-2-legend-urls!)
|
||||
(export gnc:html-piechart-button-3-legend-urls)
|
||||
(export gnc:html-piechart-set-button-3-legend-urls!)
|
||||
(export gnc:html-piechart-render)
|
||||
|
||||
;; html-scatter.scm
|
||||
|
||||
(export <html-scatter>)
|
||||
(export gnc:html-scatter?)
|
||||
(export gnc:make-html-scatter-internal)
|
||||
(export gnc:make-html-scatter)
|
||||
(export gnc:html-scatter-width)
|
||||
(export gnc:html-scatter-set-width!)
|
||||
(export gnc:html-scatter-height)
|
||||
(export gnc:html-scatter-set-height!)
|
||||
(export gnc:html-scatter-title)
|
||||
(export gnc:html-scatter-set-title!)
|
||||
(export gnc:html-scatter-subtitle)
|
||||
(export gnc:html-scatter-set-subtitle!)
|
||||
(export gnc:html-scatter-x-axis-label)
|
||||
(export gnc:html-scatter-set-x-axis-label!)
|
||||
(export gnc:html-scatter-y-axis-label)
|
||||
(export gnc:html-scatter-set-y-axis-label!)
|
||||
(export gnc:html-scatter-data)
|
||||
(export gnc:html-scatter-set-data!)
|
||||
(export gnc:html-scatter-marker)
|
||||
(export gnc:html-scatter-set-marker!)
|
||||
(export gnc:html-scatter-markercolor)
|
||||
(export gnc:html-scatter-set-markercolor!)
|
||||
(export gnc:html-scatter-add-datapoint!)
|
||||
(export gnc:html-scatter-render)
|
||||
|
||||
;; html-linechart.scm
|
||||
|
||||
(export <html-linechart>)
|
||||
(export gnc:html-linechart? )
|
||||
(export gnc:make-html-linechart-internal)
|
||||
(export gnc:make-html-linechart)
|
||||
(export gnc:html-linechart-data)
|
||||
(export gnc:html-linechart-set-data!)
|
||||
(export gnc:html-linechart-width)
|
||||
(export gnc:html-linechart-set-width!)
|
||||
(export gnc:html-linechart-height)
|
||||
(export gnc:html-linechart-set-height!)
|
||||
(export gnc:html-linechart-x-axis-label)
|
||||
(export gnc:html-linechart-set-x-axis-label!)
|
||||
(export gnc:html-linechart-y-axis-label)
|
||||
(export gnc:html-linechart-set-y-axis-label!)
|
||||
(export gnc:html-linechart-row-labels)
|
||||
(export gnc:html-linechart-set-row-labels!)
|
||||
(export gnc:html-linechart-row-labels-rotated?)
|
||||
(export gnc:html-linechart-set-row-labels-rotated?!)
|
||||
(export gnc:html-linechart-stacked?)
|
||||
(export gnc:html-linechart-set-stacked?!)
|
||||
(export gnc:html-linechart-markers?)
|
||||
(export gnc:html-linechart-set-markers?!)
|
||||
(export gnc:html-linechart-major-grid?)
|
||||
(export gnc:html-linechart-set-major-grid?!)
|
||||
(export gnc:html-linechart-minor-grid?)
|
||||
(export gnc:html-linechart-set-minor-grid?!)
|
||||
(export gnc:html-linechart-col-labels)
|
||||
(export gnc:html-linechart-set-col-labels!)
|
||||
(export gnc:html-linechart-col-colors)
|
||||
(export gnc:html-linechart-set-col-colors!)
|
||||
(export gnc:html-linechart-legend-reversed?)
|
||||
(export gnc:html-linechart-set-legend-reversed?!)
|
||||
(export gnc:html-linechart-title)
|
||||
(export gnc:html-linechart-set-title!)
|
||||
(export gnc:html-linechart-subtitle)
|
||||
(export gnc:html-linechart-set-subtitle!)
|
||||
(export gnc:html-linechart-button-1-line-urls)
|
||||
(export gnc:html-linechart-set-button-1-line-urls!)
|
||||
(export gnc:html-linechart-button-2-line-urls)
|
||||
(export gnc:html-linechart-set-button-2-line-urls!)
|
||||
(export gnc:html-linechart-button-3-line-urls)
|
||||
(export gnc:html-linechart-set-button-3-line-urls!)
|
||||
(export gnc:html-linechart-button-1-legend-urls)
|
||||
(export gnc:html-linechart-set-button-1-legend-urls!)
|
||||
(export gnc:html-linechart-button-2-legend-urls)
|
||||
(export gnc:html-linechart-set-button-2-legend-urls!)
|
||||
(export gnc:html-linechart-button-3-legend-urls)
|
||||
(export gnc:html-linechart-set-button-3-legend-urls!)
|
||||
(export gnc:html-linechart-append-row!)
|
||||
(export gnc:html-linechart-prepend-row!)
|
||||
(export gnc:html-linechart-append-column!)
|
||||
(export gnc:html-linechart-prepend-column!)
|
||||
(export gnc:html-linechart-render linechart)
|
||||
(export gnc:html-linechart-set-line-width!)
|
||||
(export gnc:html-linechart-line-width)
|
||||
|
||||
;; html-style-info.scm
|
||||
|
||||
(export <html-markup-style-info>)
|
||||
(export gnc:html-markup-style-info?)
|
||||
(export gnc:make-html-markup-style-info-internal)
|
||||
(export gnc:make-html-markup-style-info)
|
||||
(export gnc:html-markup-style-info-set!)
|
||||
(export gnc:html-markup-style-info-tag)
|
||||
(export gnc:html-markup-style-info-set-tag!)
|
||||
(export gnc:html-markup-style-info-attributes)
|
||||
(export gnc:html-markup-style-info-set-attributes!)
|
||||
(export gnc:html-markup-style-info-inheritable?)
|
||||
(export gnc:html-markup-style-info-set-inheritable?!)
|
||||
(export gnc:html-markup-style-info-set-attribute!)
|
||||
(export gnc:html-markup-style-info-merge)
|
||||
(export gnc:html-style-info-merge)
|
||||
(export gnc:html-data-style-info-merge)
|
||||
(export <html-data-style-info>)
|
||||
(export gnc:html-data-style-info?)
|
||||
(export gnc:make-html-data-style-info-internal)
|
||||
(export gnc:make-html-data-style-info)
|
||||
(export gnc:html-data-style-info?)
|
||||
(export gnc:html-data-style-info-renderer)
|
||||
(export gnc:html-data-style-info-set-renderer!)
|
||||
(export gnc:html-data-style-info-data)
|
||||
(export gnc:html-data-style-info-set-data!)
|
||||
(export gnc:html-data-style-info-inheritable?)
|
||||
(export gnc:html-data-style-info-set-inheritable?!)
|
||||
(export gnc:default-html-string-renderer)
|
||||
(export gnc:default-html-gnc-numeric-renderer)
|
||||
(export gnc:default-html-gnc-monetary-renderer)
|
||||
(export gnc:default-html-number-renderer)
|
||||
(export <html-style-table>)
|
||||
(export gnc:html-style-table?)
|
||||
(export gnc:make-html-style-table-internal)
|
||||
(export gnc:make-html-style-table)
|
||||
(export gnc:html-style-table-primary)
|
||||
(export gnc:html-style-table-compiled)
|
||||
(export gnc:html-style-table-set-compiled!)
|
||||
(export gnc:html-style-table-inheritable)
|
||||
(export gnc:html-style-table-set-inheritable!)
|
||||
(export gnc:html-style-table-compiled?)
|
||||
(export gnc:html-style-table-compile)
|
||||
(export gnc:html-style-table-uncompile)
|
||||
(export gnc:html-style-table-fetch)
|
||||
(export gnc:html-style-table-set!)
|
||||
|
||||
;; html-style-sheet.scm
|
||||
|
||||
(export <html-style-sheet-template>)
|
||||
(export gnc:html-style-sheet-template?)
|
||||
(export gnc:html-style-sheet-template-version)
|
||||
(export gnc:html-style-sheet-template-set-version!)
|
||||
(export gnc:html-style-sheet-template-name)
|
||||
(export gnc:html-style-sheet-template-set-name!)
|
||||
(export gnc:html-style-sheet-template-options-generator)
|
||||
(export gnc:html-style-sheet-template-set-options-generator!)
|
||||
(export gnc:html-style-sheet-template-renderer)
|
||||
(export gnc:html-style-sheet-template-set-renderer!)
|
||||
(export gnc:html-style-sheet-template-find)
|
||||
(export gnc:define-html-style-sheet)
|
||||
(export <html-style-sheet>)
|
||||
(export gnc:html-style-sheet?)
|
||||
(export gnc:html-style-sheet-name)
|
||||
(export gnc:html-style-sheet-set-name!)
|
||||
(export gnc:html-style-sheet-type)
|
||||
(export gnc:html-style-sheet-set-type!)
|
||||
(export gnc:html-style-sheet-options)
|
||||
(export gnc:html-style-sheet-set-options!)
|
||||
(export gnc:html-style-sheet-renderer)
|
||||
(export gnc:html-style-sheet-set-renderer!)
|
||||
(export gnc:make-html-style-sheet-internal)
|
||||
(export gnc:html-style-sheet-style)
|
||||
(export gnc:html-style-sheet-set-style!)
|
||||
(export gnc:make-html-style-sheet)
|
||||
(export gnc:restore-html-style-sheet)
|
||||
(export gnc:html-style-sheet-apply-changes)
|
||||
(export gnc:html-style-sheet-render)
|
||||
(export gnc:get-html-style-sheets)
|
||||
(export gnc:get-html-templates)
|
||||
(export gnc:html-style-sheet-find)
|
||||
(export gnc:html-style-sheet-remove)
|
||||
|
||||
;; html-acct-table.scm
|
||||
|
||||
(export <html-acct-table>)
|
||||
(export gnc:html-acct-table?)
|
||||
(export gnc:_make-html-acct-table_)
|
||||
(export gnc:make-html-acct-table)
|
||||
(export gnc:make-html-acct-table/env)
|
||||
(export gnc:make-html-acct-table/env/accts)
|
||||
(export gnc:_html-acct-table-matrix_)
|
||||
(export gnc:_html-acct-table-set-matrix!_)
|
||||
(export gnc:_html-acct-table-env_)
|
||||
(export gnc:_html-acct-table-set-env!_)
|
||||
(export gnc:html-acct-table-add-accounts!)
|
||||
(export gnc:html-acct-table-num-rows)
|
||||
(export gnc:html-acct-table-get-row)
|
||||
(export gnc:html-acct-table-get-cell)
|
||||
(export gnc:html-acct-table-set-cell!)
|
||||
(export gnc:html-acct-table-get-row-env)
|
||||
(export gnc:html-acct-table-set-row-env!)
|
||||
(export gnc:account-code-less-p)
|
||||
(export gnc:account-name-less-p)
|
||||
(export gnc:account-path-less-p)
|
||||
(export gnc:html-table-add-labeled-amount-line!)
|
||||
(export gnc:html-table-add-account-balances)
|
||||
(export gnc-commodity-table)
|
||||
(export gnc:uniform-commodity?)
|
||||
|
||||
;; html-chart.scm
|
||||
|
||||
(export gnc:html-chart?)
|
||||
(export gnc:make-html-chart)
|
||||
(export gnc:html-chart-data)
|
||||
(export gnc:html-chart-set-data!)
|
||||
(export gnc:html-chart-width)
|
||||
(export gnc:html-chart-set-width!)
|
||||
(export gnc:html-chart-height)
|
||||
(export gnc:html-chart-set-height!)
|
||||
(export gnc:html-chart-type)
|
||||
(export gnc:html-chart-set-type!)
|
||||
(export gnc:html-chart-title)
|
||||
(export gnc:html-chart-get)
|
||||
(export gnc:html-chart-set!)
|
||||
(export gnc:html-chart-currency-iso)
|
||||
(export gnc:html-chart-set-currency-iso!)
|
||||
(export gnc:html-chart-currency-symbol)
|
||||
(export gnc:html-chart-set-currency-symbol!)
|
||||
(export gnc:html-chart-render)
|
||||
(export gnc:html-chart-set-custom-x-axis-ticks?!)
|
||||
(export gnc:html-chart-set-custom-y-axis-ticks?!)
|
||||
|
||||
;; html-table.scm
|
||||
|
||||
(export <html-table>)
|
||||
(export gnc:html-table?)
|
||||
(export <html-table-cell>)
|
||||
(export gnc:make-html-table-cell-internal)
|
||||
(export gnc:make-html-table-cell)
|
||||
(export gnc:make-html-table-cell/size)
|
||||
(export gnc:make-html-table-cell/markup)
|
||||
(export gnc:make-html-table-cell/size/markup)
|
||||
(export gnc:make-html-table-header-cell)
|
||||
(export gnc:make-html-table-header-cell/markup)
|
||||
(export gnc:make-html-table-header-cell/size)
|
||||
(export gnc:make-html-table-cell/min-width)
|
||||
(export gnc:html-table-cell?)
|
||||
(export gnc:html-table-cell-rowspan)
|
||||
(export gnc:html-table-cell-set-rowspan!)
|
||||
(export gnc:html-table-cell-colspan)
|
||||
(export gnc:html-table-cell-set-colspan!)
|
||||
(export gnc:html-table-cell-tag)
|
||||
(export gnc:html-table-cell-set-tag!)
|
||||
(export gnc:html-table-cell-data)
|
||||
(export gnc:html-table-cell-set-data-internal!)
|
||||
(export gnc:html-table-cell-style)
|
||||
(export gnc:html-table-cell-set-style-internal!)
|
||||
(export gnc:html-table-cell-set-style!)
|
||||
(export gnc:html-table-cell-append-objects!)
|
||||
(export gnc:html-table-cell-render)
|
||||
(export gnc:make-html-table-internal)
|
||||
(export gnc:make-html-table)
|
||||
(export gnc:html-table-data)
|
||||
(export gnc:html-table-set-data!)
|
||||
(export gnc:html-table-caption)
|
||||
(export gnc:html-table-set-caption!)
|
||||
(export gnc:html-table-set-col-headers!)
|
||||
(export gnc:html-table-multirow-col-headers)
|
||||
(export gnc:html-table-set-multirow-col-headers!)
|
||||
(export gnc:html-table-style)
|
||||
(export gnc:html-table-set-style-internal!)
|
||||
(export gnc:html-table-row-styles)
|
||||
(export gnc:html-table-set-row-styles!)
|
||||
(export gnc:html-table-row-markup-table)
|
||||
(export gnc:html-table-row-markup)
|
||||
(export gnc:html-table-set-row-markup-table!)
|
||||
(export gnc:html-table-set-row-markup!)
|
||||
(export gnc:html-table-col-styles)
|
||||
(export gnc:html-table-set-col-styles!)
|
||||
(export gnc:html-table-col-headers-style)
|
||||
(export gnc:html-table-set-col-headers-style!)
|
||||
(export gnc:html-table-row-headers-style)
|
||||
(export gnc:html-table-set-row-headers-style!)
|
||||
(export gnc:html-table-set-last-row-style!)
|
||||
(export gnc:html-table-set-style!)
|
||||
(export gnc:html-table-set-col-style!)
|
||||
(export gnc:html-table-set-row-style!)
|
||||
(export gnc:html-table-row-style)
|
||||
(export gnc:html-table-col-style)
|
||||
(export gnc:html-table-num-rows)
|
||||
(export gnc:html-table-set-num-rows-internal!)
|
||||
(export gnc:html-table-num-columns)
|
||||
(export gnc:html-table-append-row/markup!)
|
||||
(export gnc:html-table-prepend-row/markup!)
|
||||
(export gnc:html-table-append-row!)
|
||||
(export gnc:html-table-prepend-row!)
|
||||
(export gnc:html-table-get-cell)
|
||||
(export gnc:html-table-set-cell!)
|
||||
(export gnc:html-table-set-cell/tag!)
|
||||
(export gnc:html-table-append-column!)
|
||||
(export gnc:html-table-render)
|
||||
|
||||
;; html-anytag.scm
|
||||
(export <html-anytag>)
|
||||
(export html-anytag?)
|
||||
(export gnc:html-anytag-data)
|
||||
(export gnc:html-anytag-set-data!)
|
||||
(export gnc:html-anytag-style)
|
||||
(export gnc:html-anytag-append-data!)
|
||||
(export gnc:html-anytag-set-style!)
|
||||
(export gnc:html-anytag-render div doc)
|
||||
(export gnc:make-html-div)
|
||||
(export gnc:make-html-div/markup)
|
||||
(export gnc:make-html-span)
|
||||
(export gnc:make-html-span/markup)
|
||||
|
||||
;; html-text.scm
|
||||
|
||||
(export <html-text>)
|
||||
(export gnc:html-text?)
|
||||
(export gnc:make-html-text-internal)
|
||||
(export gnc:make-html-text)
|
||||
(export gnc:html-text?)
|
||||
(export gnc:html-text-body)
|
||||
(export gnc:html-text-set-body-internal!)
|
||||
(export gnc:html-text-set-body!)
|
||||
(export gnc:html-text-style)
|
||||
(export gnc:html-text-set-style-internal!)
|
||||
(export gnc:html-text-set-style!)
|
||||
(export gnc:html-text-append!)
|
||||
(export gnc:html-markup)
|
||||
(export gnc:html-markup/attr)
|
||||
(export gnc:html-markup/no-end)
|
||||
(export gnc:html-markup/attr/no-end)
|
||||
(export gnc:html-markup/format)
|
||||
(export gnc:html-markup-p)
|
||||
(export gnc:html-markup-tt)
|
||||
(export gnc:html-markup-em)
|
||||
(export gnc:html-markup-b)
|
||||
(export gnc:html-markup-i)
|
||||
(export gnc:html-markup-h1)
|
||||
(export gnc:html-markup-h2)
|
||||
(export gnc:html-markup-h3)
|
||||
(export gnc:html-markup-br)
|
||||
(export gnc:html-markup-hr)
|
||||
(export gnc:html-markup-ol)
|
||||
(export gnc:html-markup-ul)
|
||||
(export gnc:html-markup-anchor)
|
||||
(export gnc:html-markup-img)
|
||||
(export gnc:html-text-render)
|
||||
(export gnc:html-text-render-markup)
|
||||
|
||||
;; report-utilities.scm
|
||||
|
||||
(export list-ref-safe)
|
||||
(export list-set-safe!)
|
||||
(export gnc:monetary->string)
|
||||
(export gnc:account-has-shares?)
|
||||
(export gnc:account-is-stock?)
|
||||
(export gnc:account-is-inc-exp?)
|
||||
(export gnc:account-full-name<?)
|
||||
(export gnc:accounts-get-children-depth)
|
||||
(export gnc:filter-accountlist-type)
|
||||
(export gnc:decompose-accountlist)
|
||||
(export gnc:account-get-type-string-plural)
|
||||
(export gnc:accounts-get-commodities)
|
||||
(export gnc:get-current-account-tree-depth)
|
||||
(export gnc:accounts-and-all-descendants)
|
||||
(export gnc:make-value-collector)
|
||||
(export gnc:make-commodity-collector)
|
||||
(export gnc:collector+)
|
||||
(export gnc:collector-)
|
||||
(export gnc:commodity-collector-get-negated)
|
||||
(export gnc:account-accumulate-at-dates)
|
||||
(export gnc:account-get-balance-at-date)
|
||||
(export gnc:account-get-balances-at-dates)
|
||||
(export gnc:account-get-comm-balance-at-date)
|
||||
(export gnc:account-get-comm-value-interval)
|
||||
(export gnc:account-get-comm-value-at-date)
|
||||
(export gnc:accounts-get-balance-helper)
|
||||
(export gnc:accounts-get-comm-total-profit)
|
||||
(export gnc:accounts-get-comm-total-income)
|
||||
(export gnc:accounts-get-comm-total-expense)
|
||||
(export gnc:accounts-get-comm-total-assets)
|
||||
(export gnc:account-get-balance-interval)
|
||||
(export gnc:account-get-comm-balance-interval)
|
||||
(export gnc:accountlist-get-comm-balance-interval)
|
||||
(export gnc:accountlist-get-comm-balance-interval-with-closing)
|
||||
(export gnc:accountlist-get-comm-balance-at-date)
|
||||
(export gnc:accountlist-get-comm-balance-at-date-with-closing)
|
||||
(export gnc:query-set-match-non-voids-only!)
|
||||
(export gnc:query-set-match-voids-only!)
|
||||
(export gnc:split-voided?)
|
||||
(export gnc:report-starting)
|
||||
(export gnc:report-render-starting)
|
||||
(export gnc:report-percent-done)
|
||||
(export gnc:report-finished)
|
||||
(export gnc:accounts-count-splits)
|
||||
(export gnc-commodity-collector-allzero?)
|
||||
(export gnc:monetary+)
|
||||
(export gnc:monetaries-add)
|
||||
(export gnc:account-get-trans-type-balance-interval)
|
||||
(export gnc:account-get-trans-type-balance-interval-with-closing)
|
||||
(export gnc:account-get-trans-type-splits-interval)
|
||||
(export gnc:budget-get-start-date)
|
||||
(export gnc:budget-get-end-date)
|
||||
(export gnc:budget-account-get-net)
|
||||
(export gnc:budget-accountlist-get-net)
|
||||
(export gnc:budget-account-get-initial-balance)
|
||||
(export gnc:budget-accountlist-get-initial-balance)
|
||||
(export budget-account-sum budget)
|
||||
(export gnc:get-account-period-rolledup-budget-value)
|
||||
(export gnc:budget-account-get-rolledup-net)
|
||||
(export gnc:get-assoc-account-balances)
|
||||
(export gnc:select-assoc-account-balance)
|
||||
(export gnc:get-assoc-account-balances-total)
|
||||
(export gnc:multiline-to-html-text)
|
||||
(export gnc:default-price-renderer)
|
||||
(export make-file-url)
|
||||
(export gnc:strify)
|
||||
(export gnc:pk)
|
||||
(export gnc:dump-book)
|
||||
(export gnc:dump-invoices)
|
||||
(export gnc:dump-lot)
|
||||
|
||||
;; trep-engine.scm
|
||||
(export gnc:trep-options-generator)
|
||||
(export gnc:trep-renderer)
|
||||
(export gnc:lists->csv)
|
||||
|
||||
;; report-register-hooks.scm
|
||||
|
||||
(export gnc:register-report-hook)
|
||||
(export gnc:lookup-register-report)
|
||||
|
||||
|
||||
(load-from-path "gnucash/report/commodity-utilities")
|
||||
(load-from-path "gnucash/report/html-chart")
|
||||
(load-from-path "gnucash/report/html-barchart")
|
||||
(load-from-path "gnucash/report/html-document")
|
||||
(load-from-path "gnucash/report/html-piechart")
|
||||
(load-from-path "gnucash/report/html-scatter")
|
||||
(load-from-path "gnucash/report/html-linechart")
|
||||
(load-from-path "gnucash/report/html-style-info")
|
||||
(load-from-path "gnucash/report/html-fonts")
|
||||
|
||||
(load-from-path "gnucash/report/html-style-sheet")
|
||||
(load-from-path "gnucash/report/html-anytag")
|
||||
(load-from-path "gnucash/report/html-table")
|
||||
(load-from-path "gnucash/report/html-text")
|
||||
(load-from-path "gnucash/report/html-acct-table")
|
||||
(load-from-path "gnucash/report/html-utilities")
|
||||
(load-from-path "gnucash/report/options-utilities")
|
||||
(load-from-path "gnucash/report/report-utilities")
|
||||
(load-from-path "gnucash/report/report-register-hooks")
|
||||
(load-from-path "gnucash/report/report-core")
|
||||
(load-from-path "gnucash/report/trep-engine")
|
||||
(load-and-reexport (gnucash html)
|
||||
(gnucash report html-style-sheet)
|
||||
(gnucash report report-register-hooks)
|
||||
(gnucash report html-utilities)
|
||||
(gnucash report commodity-utilities)
|
||||
(gnucash report report-utilities)
|
||||
(gnucash report options-utilities)
|
||||
(gnucash report html-chart)
|
||||
(gnucash report html-fonts)
|
||||
(gnucash report html-text)
|
||||
(gnucash report html-anytag)
|
||||
(gnucash report html-document)
|
||||
(gnucash report html-table)
|
||||
(gnucash report html-acct-table)
|
||||
(gnucash report html-style-info)
|
||||
(gnucash report trep-engine)
|
||||
(gnucash report report-core))
|
||||
|
||||
;; Report uuids used for the category barcharts
|
||||
|
||||
(export category-barchart-income-uuid
|
||||
category-barchart-expense-uuid
|
||||
category-barchart-asset-uuid
|
||||
category-barchart-liability-uuid)
|
||||
(export report-module-loader)
|
||||
(export category-barchart-income-uuid)
|
||||
(export category-barchart-expense-uuid)
|
||||
(export category-barchart-asset-uuid)
|
||||
(export category-barchart-liability-uuid)
|
||||
|
||||
(define category-barchart-income-uuid "44f81bee049b4b3ea908f8dac9a9474e")
|
||||
(define category-barchart-expense-uuid "b1f15b2052c149df93e698fe85a81ea6")
|
||||
(define category-barchart-asset-uuid "e9cf815f79db44bcb637d0295093ae3d")
|
||||
(define category-barchart-liability-uuid "faf410e8f8da481fbc09e4763da40bcc")
|
||||
|
||||
(export report-module-loader)
|
||||
;; Given a list of module prefixes, load all guile modules with these prefixes
|
||||
;; This assumes the modules are located on the file system in a
|
||||
;; path matching the module prefix
|
||||
|
@ -31,6 +31,7 @@
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report))
|
||||
(use-modules (gnucash gnome-utils))
|
||||
(use-modules (srfi srfi-9))
|
||||
|
||||
(define optname-to-date (N_ "To"))
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
(define-module (gnucash reports))
|
||||
|
||||
(use-modules (srfi srfi-13))
|
||||
(use-modules (srfi srfi-8))
|
||||
(use-modules (gnucash app-utils))
|
||||
@ -32,6 +33,9 @@
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash report))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash reports standard register))
|
||||
(use-modules (gnucash reports standard new-aging))
|
||||
(use-modules (gnucash reports standard new-owner-report))
|
||||
|
||||
(export gnc:register-report-create)
|
||||
(export gnc:invoice-report-create)
|
||||
@ -40,20 +44,12 @@
|
||||
(export gnc:owner-report-create)
|
||||
(export gnc:owner-report-create-with-enddate)
|
||||
|
||||
(define report-dirs (list
|
||||
(let ((loc-spec (if (string-prefix? "de_DE" (gnc-locale-name)) 'de_DE 'us)))
|
||||
(report-module-loader
|
||||
(list
|
||||
'(gnucash reports standard) ; prefix for standard reports included in gnucash
|
||||
'(gnucash reports example) ; rexample for example reports included in gnucash
|
||||
))
|
||||
|
||||
; Determine which locale-specific prefix to add to the list above
|
||||
; and then load all reports found in the given prefixes
|
||||
(let* ((loc (gnc-locale-name))
|
||||
(loc-spec (if (string-prefix? "de_DE" loc) 'de_DE 'us))
|
||||
(all-dirs (append report-dirs
|
||||
`((gnucash reports locale-specific ,loc-spec)))))
|
||||
(report-module-loader all-dirs))
|
||||
|
||||
(use-modules (gnucash engine))
|
||||
`(gnucash reports locale-specific ,loc-spec))))
|
||||
|
||||
(define (gnc:register-report-create account split query journal? ledger-type?
|
||||
double? title debit-string credit-string)
|
||||
@ -82,10 +78,7 @@
|
||||
0
|
||||
))
|
||||
|
||||
(use-modules (gnucash reports standard new-aging))
|
||||
(define gnc:payables-report-create payables-report-create-internal)
|
||||
(define gnc:receivables-report-create receivables-report-create-internal)
|
||||
|
||||
(use-modules (gnucash reports standard new-owner-report))
|
||||
(define gnc:owner-report-create owner-report-create)
|
||||
(define gnc:owner-report-create-with-enddate owner-report-create-with-enddate)
|
||||
|
@ -34,7 +34,7 @@ set(GUILE_DEPENDS
|
||||
scm-core-utils
|
||||
scm-test-report
|
||||
scm-reports
|
||||
scm-reports-standard-with-exposed-generator-links
|
||||
scm-reports-standard-with-exposed-generator
|
||||
scm-report-stylesheets
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
(use-modules (srfi srfi-64))
|
||||
(use-modules (tests srfi64-extras))
|
||||
(load-from-path "gnucash/report/html-fonts")
|
||||
(use-modules (gnucash report html-fonts))
|
||||
|
||||
(setlocale LC_ALL "C")
|
||||
|
||||
|
@ -1,7 +1,12 @@
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-report" "scm_init_sw_report_module"))
|
||||
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report))
|
||||
(use-modules (gnucash report stylesheets plain))
|
||||
(use-modules (gnucash report html-style-sheet))
|
||||
(use-modules (srfi srfi-64))
|
||||
(use-modules (ice-9 pretty-print))
|
||||
(use-modules (sxml simple))
|
||||
|
@ -39,11 +39,29 @@
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash report trep-engine))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash report report-core)
|
||||
(gnucash report report-utilities)
|
||||
(gnucash report options-utilities)
|
||||
(gnucash report commodity-utilities)
|
||||
(gnucash report html-document)
|
||||
(gnucash report html-style-info)
|
||||
(gnucash report html-utilities)
|
||||
(gnucash report html-table)
|
||||
(gnucash report html-text))
|
||||
(use-modules (srfi srfi-11))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(export gnc:trep-options-generator)
|
||||
(export gnc:trep-renderer)
|
||||
(export gnc:lists->csv)
|
||||
|
||||
;; Define the strings here to avoid typos and make changes easier.
|
||||
|
||||
;;Accounts
|
||||
|
@ -170,7 +170,6 @@ install(FILES ${app_utils_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnuca
|
||||
|
||||
set (app_utils_SCHEME_1
|
||||
business-options.scm
|
||||
business-prefs.scm
|
||||
c-interface.scm
|
||||
date-utilities.scm
|
||||
options.scm
|
||||
@ -191,11 +190,15 @@ gnc_add_scheme_targets(scm-app-utils-1
|
||||
OUTPUT_DIR "gnucash/app-utils"
|
||||
DEPENDS "${GUILE_DEPENDS}"
|
||||
MAKE_LINKS)
|
||||
gnc_add_scheme_targets(scm-bus-prefs
|
||||
SOURCES "business-prefs.scm"
|
||||
OUTPUT_DIR "gnucash/app-utils"
|
||||
DEPENDS "scm-app-utils-1")
|
||||
|
||||
gnc_add_scheme_targets(scm-app-utils-2
|
||||
SOURCES "${app_utils_SCHEME_2}"
|
||||
OUTPUT_DIR "gnucash"
|
||||
DEPENDS "scm-app-utils-1")
|
||||
DEPENDS "scm-bus-prefs")
|
||||
|
||||
# Module interfaces deprecated in 4.x, will be removed for 5.x
|
||||
gnc_add_scheme_deprecated_module (OLD_MODULE "migrate-prefs")
|
||||
|
@ -16,304 +16,36 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(define-module (gnucash app-utils))
|
||||
(eval-when
|
||||
(compile load eval expand)
|
||||
(load-extension "libgnc-app-utils" "scm_init_sw_app_utils_module"))
|
||||
(use-modules (sw_app_utils))
|
||||
|
||||
; Export the swig-wrapped symbols in the public interface of this module
|
||||
(let ((i (module-public-interface (current-module))))
|
||||
(module-use! i (resolve-interface '(sw_app_utils))))
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-app-utils" "scm_init_sw_app_utils_module"))
|
||||
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash core-utils))
|
||||
|
||||
;; c-interface.scm
|
||||
(export gnc:apply-with-error-handling)
|
||||
(export gnc:eval-string-with-error-handling)
|
||||
(export gnc:backtrace-if-exception)
|
||||
(export gnc:make-string-database)
|
||||
|
||||
;; options.scm
|
||||
(export gnc:make-option)
|
||||
(export gnc:option-section)
|
||||
(export gnc:option-name)
|
||||
(export gnc:option-sort-tag)
|
||||
(export gnc:option-type)
|
||||
(export gnc:option-documentation)
|
||||
(export gnc:option-getter)
|
||||
(export gnc:option-setter)
|
||||
(export gnc:option-default-getter)
|
||||
(export gnc:option-generate-restore-form)
|
||||
(export gnc:option-scm->kvp)
|
||||
(export gnc:set-option-scm->kvp)
|
||||
(export gnc:option-kvp->scm)
|
||||
(export gnc:set-option-kvp->scm)
|
||||
(export gnc:option-value-validator)
|
||||
(export gnc:option-data)
|
||||
(export gnc:option-data-fns)
|
||||
(export gnc:option-set-changed-callback)
|
||||
(export gnc:option-strings-getter)
|
||||
(export gnc:option-widget-changed-proc)
|
||||
(export gnc:option-value)
|
||||
(export gnc:option-set-value)
|
||||
(export gnc:option-index-get-name)
|
||||
(export gnc:option-index-get-description)
|
||||
(export gnc:option-index-get-value)
|
||||
(export gnc:option-value-get-index)
|
||||
(export gnc:option-number-of-indices)
|
||||
(export gnc:option-default-value)
|
||||
(export gnc:option-set-default-value)
|
||||
(export gnc:restore-form-generator)
|
||||
(export gnc:value->string)
|
||||
(export gnc:make-string-option)
|
||||
(export gnc:make-text-option)
|
||||
(export gnc:make-font-option)
|
||||
(export gnc:make-currency-option)
|
||||
(export gnc:make-commodity-option)
|
||||
(export gnc:make-simple-boolean-option)
|
||||
(export gnc:make-complex-boolean-option)
|
||||
(export gnc:make-pixmap-option)
|
||||
(export gnc:make-date-option)
|
||||
(export gnc:make-budget-option)
|
||||
(export gnc:get-rd-option-data-subtype)
|
||||
(export gnc:get-rd-option-data-show-time)
|
||||
(export gnc:get-rd-option-data-rd-list)
|
||||
(export gnc:date-option-get-subtype)
|
||||
(export gnc:date-option-show-time?)
|
||||
(export gnc:date-option-value-type)
|
||||
(export gnc:date-option-absolute-time)
|
||||
(export gnc:date-option-relative-time)
|
||||
(export gnc:make-account-list-option)
|
||||
(export gnc:make-account-list-limited-option)
|
||||
(export gnc:make-account-sel-option)
|
||||
(export gnc:make-account-sel-limited-option)
|
||||
(export gnc:multichoice-list-lookup)
|
||||
(export gnc:make-multichoice-option)
|
||||
(export gnc:make-multichoice-callback-option)
|
||||
(export gnc:make-radiobutton-option)
|
||||
(export gnc:make-radiobutton-callback-option)
|
||||
(export gnc:make-list-option)
|
||||
(export gnc:options-make-end-date!)
|
||||
(export gnc:options-make-date-interval!)
|
||||
(export gnc:option-make-internal!)
|
||||
(export gnc:make-number-range-option)
|
||||
(export gnc:make-number-plot-size-option)
|
||||
(export gnc:plot-size-option-value-type)
|
||||
(export gnc:plot-size-option-value)
|
||||
(load-and-reexport (sw_app_utils)
|
||||
(gnucash app-utils date-utilities)
|
||||
(gnucash app-utils business-options)
|
||||
(gnucash app-utils business-prefs)
|
||||
(gnucash app-utils options)
|
||||
(gnucash app-utils c-interface))
|
||||
|
||||
(export gnc:make-internal-option)
|
||||
(export gnc:make-query-option)
|
||||
(export gnc:make-color-option)
|
||||
(export gnc:make-dateformat-option)
|
||||
(export gnc:dateformat-get-format)
|
||||
(export gnc:currency-accounting-option-get-curr-doc-string)
|
||||
(export gnc:currency-accounting-option-get-default-curr)
|
||||
(export gnc:currency-accounting-option-get-policy-doc-string)
|
||||
(export gnc:currency-accounting-option-get-default-policy)
|
||||
(export gnc:currency-accounting-option-get-gain-loss-account-doc-string)
|
||||
(export gnc:currency-accounting-option-selected-method)
|
||||
(export gnc:currency-accounting-option-selected-currency)
|
||||
(export gnc:currency-accounting-option-selected-policy)
|
||||
(export gnc:currency-accounting-option-selected-gain-loss-account)
|
||||
|
||||
(export gnc:color->html)
|
||||
(export gnc:color-option->html)
|
||||
(export gnc:color-option->hex-string)
|
||||
(export gnc:new-options)
|
||||
|
||||
(export gnc:register-option)
|
||||
(export gnc:unregister-option)
|
||||
(export gnc:options-register-callback)
|
||||
(export gnc:options-register-c-callback)
|
||||
(export gnc:options-unregister-callback-id)
|
||||
(export gnc:options-for-each)
|
||||
(export gnc:options-for-each-general)
|
||||
(export gnc:lookup-option)
|
||||
(export gnc:generate-restore-forms)
|
||||
(export gnc:options-fancy-date)
|
||||
(export gnc:options-scm->kvp)
|
||||
(export gnc:options-kvp->scm)
|
||||
(export gnc:options-clear-changes)
|
||||
(export gnc:options-touch)
|
||||
(export gnc:options-run-callbacks)
|
||||
(export gnc:options-set-default-section)
|
||||
(export gnc:options-get-default-section)
|
||||
(export gnc:options-copy-values)
|
||||
(export gnc:send-options)
|
||||
|
||||
(define (gnc:option-get-value book category key)
|
||||
;;Access an option directly
|
||||
(qof-book-get-option book
|
||||
(if (list? key)
|
||||
(append (list category) key)
|
||||
(list category key))))
|
||||
(export gnc:option-get-value)
|
||||
|
||||
;; gw-engine-spec.scm
|
||||
(re-export HOOK-SAVE-OPTIONS)
|
||||
|
||||
;; date-utilities.scm
|
||||
|
||||
(export gnc:reldate-list)
|
||||
(export gnc:date-get-year)
|
||||
(export gnc:date-get-quarter)
|
||||
(export gnc:date-get-month-day)
|
||||
(export gnc:date-get-month)
|
||||
(export gnc:date-get-week-day)
|
||||
(export gnc:date-get-week)
|
||||
(export gnc:date-get-year-day)
|
||||
(export gnc:time64-get-year)
|
||||
(export gnc:time64-get-quarter)
|
||||
(export gnc:time64-get-month-day)
|
||||
(export gnc:time64-get-month)
|
||||
(export gnc:time64-get-week-day)
|
||||
(export gnc:time64-get-week)
|
||||
(export gnc:time64-get-year-day)
|
||||
(export gnc:date-get-year-string)
|
||||
(export gnc:date-get-quarter-string)
|
||||
(export gnc:date-get-quarter-year-string)
|
||||
(export gnc:date-get-month-string)
|
||||
(export gnc:date-get-month-year-string)
|
||||
(export gnc:date-get-week-year-string)
|
||||
(export gnc:leap-year?)
|
||||
(export gnc:days-in-year)
|
||||
(export gnc:days-in-month)
|
||||
(export gnc:date-to-year-fraction)
|
||||
(export gnc:date-year-delta)
|
||||
(export gnc:date-to-month-fraction)
|
||||
(export gnc:date-to-week-fraction)
|
||||
(export gnc:date-to-week)
|
||||
(export gnc:date-to-day-fraction)
|
||||
(export gnc:date-get-fraction-func)
|
||||
(export moddatek)
|
||||
(export decdate)
|
||||
(export incdate)
|
||||
(export decdate)
|
||||
(export incdate)
|
||||
(export gnc:make-date-interval-list)
|
||||
(export gnc:make-date-list)
|
||||
(export SecDelta)
|
||||
(export DayDelta)
|
||||
(export WeekDelta )
|
||||
(export TwoWeekDelta)
|
||||
(export MonthDelta)
|
||||
(export QuarterDelta)
|
||||
(export HalfYearDelta)
|
||||
(export YearDelta )
|
||||
(export ThirtyDayDelta)
|
||||
(export NinetyDayDelta)
|
||||
(export gnc:deltasym-to-delta)
|
||||
(export gnc:time64-start-day-time)
|
||||
(export gnc:time64-end-day-time)
|
||||
(export gnc:time64-previous-day)
|
||||
(export gnc:time64-next-day)
|
||||
(export gnc:reldate-get-symbol)
|
||||
(export gnc:reldate-get-string)
|
||||
(export gnc:reldate-get-desc)
|
||||
(export gnc:reldate-get-fn)
|
||||
(export gnc:get-absolute-from-relative-date)
|
||||
(export gnc:get-relative-date-string)
|
||||
(export gnc:get-relative-date-desc)
|
||||
(export gnc:get-start-cal-year)
|
||||
(export gnc:get-end-cal-year)
|
||||
(export gnc:get-start-prev-year)
|
||||
(export gnc:get-end-prev-year)
|
||||
(export gnc:get-start-this-month)
|
||||
(export gnc:get-end-this-month)
|
||||
(export gnc:get-start-prev-month)
|
||||
(export gnc:get-end-prev-month)
|
||||
(export gnc:get-start-current-quarter)
|
||||
(export gnc:get-end-current-quarter)
|
||||
(export gnc:get-start-prev-quarter)
|
||||
(export gnc:get-end-prev-quarter)
|
||||
(export gnc:get-today)
|
||||
(export gnc:get-one-month-ago)
|
||||
(export gnc:get-three-months-ago)
|
||||
(export gnc:get-six-months-ago)
|
||||
(export gnc:get-one-year-ago)
|
||||
(export gnc:reldate-initialize)
|
||||
(export gnc:get-end-next-month)
|
||||
(export gnc:get-end-next-quarter)
|
||||
(export gnc:get-end-next-year)
|
||||
(export gnc:get-one-month-ahead)
|
||||
(export gnc:get-one-year-ahead)
|
||||
(export gnc:get-six-months-ahead)
|
||||
(export gnc:get-start-next-month)
|
||||
(export gnc:get-start-next-quarter)
|
||||
(export gnc:get-start-next-year)
|
||||
(export gnc:get-three-months-ahead)
|
||||
|
||||
(define gnc:*kvp-option-path* (list KVP-OPTION-PATH))
|
||||
(export gnc:*kvp-option-path*)
|
||||
|
||||
(load-from-path "gnucash/app-utils/c-interface")
|
||||
(load-from-path "gnucash/app-utils/options")
|
||||
(load-from-path "gnucash/app-utils/date-utilities")
|
||||
|
||||
;; Business options
|
||||
(define gnc:*business-label* (N_ "Business"))
|
||||
(define gnc:*company-name* (N_ "Company Name"))
|
||||
(define gnc:*company-addy* (N_ "Company Address"))
|
||||
(define gnc:*company-id* (N_ "Company ID"))
|
||||
(define gnc:*company-phone* (N_ "Company Phone Number"))
|
||||
(define gnc:*company-fax* (N_ "Company Fax Number"))
|
||||
(define gnc:*company-url* (N_ "Company Website URL"))
|
||||
(define gnc:*company-email* (N_ "Company Email Address"))
|
||||
(define gnc:*company-contact* (N_ "Company Contact Person"))
|
||||
(define gnc:*fancy-date-label* (N_ "Fancy Date Format"))
|
||||
(define gnc:*fancy-date-format* (N_ "custom"))
|
||||
(define gnc:*tax-label* (N_ "Tax"))
|
||||
(define gnc:*tax-nr-label* (N_ "Tax Number"))
|
||||
|
||||
(define (gnc:company-info book key)
|
||||
;; Access company info from key-value pairs for current book
|
||||
(gnc:option-get-value book gnc:*business-label* key))
|
||||
|
||||
(define (gnc:fancy-date-info book key)
|
||||
;; Access fancy date info from key-value pairs for current book
|
||||
(gnc:option-get-value book gnc:*business-label* (list gnc:*fancy-date-label* key)))
|
||||
|
||||
(export gnc:*business-label* gnc:*company-name* gnc:*company-addy*
|
||||
gnc:*company-id* gnc:*company-phone* gnc:*company-fax*
|
||||
gnc:*company-url* gnc:*company-email* gnc:*company-contact*
|
||||
gnc:*fancy-date-label* gnc:*fancy-date-format*
|
||||
gnc:company-info gnc:fancy-date-info)
|
||||
|
||||
(define gnc:*option-section-accounts* OPTION-SECTION-ACCOUNTS)
|
||||
(define gnc:*option-name-trading-accounts* OPTION-NAME-TRADING-ACCOUNTS)
|
||||
(define gnc:*option-name-currency-accounting* OPTION-NAME-CURRENCY-ACCOUNTING)
|
||||
(define gnc:*option-name-book-currency* OPTION-NAME-BOOK-CURRENCY)
|
||||
(define gnc:*option-name-default-gains-policy* OPTION-NAME-DEFAULT-GAINS-POLICY)
|
||||
(define gnc:*option-name-default-gain-loss-account* OPTION-NAME-DEFAULT-GAINS-LOSS-ACCT-GUID)
|
||||
(define gnc:*option-name-auto-readonly-days* OPTION-NAME-AUTO-READONLY-DAYS)
|
||||
(define gnc:*option-name-num-field-source* OPTION-NAME-NUM-FIELD-SOURCE)
|
||||
|
||||
(export gnc:*option-section-accounts* gnc:*option-name-trading-accounts*
|
||||
gnc:*option-name-currency-accounting* gnc:*option-name-book-currency*
|
||||
gnc:*option-name-default-gains-policy*
|
||||
gnc:*option-name-default-gain-loss-account*
|
||||
gnc:*tax-label* gnc:*tax-nr-label*
|
||||
gnc:*option-name-auto-readonly-days* gnc:*option-name-num-field-source*)
|
||||
|
||||
(define gnc:*option-section-budgeting* OPTION-SECTION-BUDGETING)
|
||||
(define gnc:*option-name-default-budget* OPTION-NAME-DEFAULT-BUDGET)
|
||||
|
||||
(export gnc:*option-section-budgeting* gnc:*option-name-default-budget*)
|
||||
|
||||
(load-from-path "gnucash/app-utils/business-options")
|
||||
(load-from-path "gnucash/app-utils/business-prefs")
|
||||
|
||||
(export gnc:get-debit-string)
|
||||
(export gnc:get-credit-string)
|
||||
(export gnc:config-file-format-version)
|
||||
|
||||
;; Symbols deprecated in 4.x, to remove for 5.x
|
||||
(define-public (gnc:get-debit-string acct-type)
|
||||
(define (gnc:get-debit-string acct-type)
|
||||
(issue-deprecation-warning "gnc:get-debit-string is deprecated in 4.x. Please use (gnucash engine)'s gnc-account-get-debit-string instead.")
|
||||
(gnc-account-get-debit-string acct-type))
|
||||
(define-public (gnc:get-credit-string acct-type)
|
||||
(define (gnc:get-credit-string acct-type)
|
||||
(issue-deprecation-warning "gnc:get-credit-string is deprecated in 4.x. Please use (gnucash engine)'s gnc-account-get-credit-string instead.")
|
||||
(gnc-account-get-debit-string acct-type))
|
||||
(define-public (gnc:config-file-format-version version)
|
||||
(define (gnc:config-file-format-version version)
|
||||
(issue-deprecation-warning "gnc:config-file-format-version is deprecated in 4.x and will be removed from a future version.")
|
||||
#t)
|
||||
|
@ -24,8 +24,76 @@
|
||||
;; invoice pointers may be used to set the value of the option. The
|
||||
;; option always returns a single invoice pointer.
|
||||
|
||||
(define-module (gnucash app-utils business-options))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-app-utils" "scm_init_sw_app_utils_module"))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (gnucash app-utils options))
|
||||
(use-modules (sw_app_utils))
|
||||
|
||||
(export gnc:*business-label*)
|
||||
(export gnc:*company-name*)
|
||||
(export gnc:*company-addy*)
|
||||
(export gnc:*company-id*)
|
||||
(export gnc:*company-phone*)
|
||||
(export gnc:*company-fax*)
|
||||
(export gnc:*company-url*)
|
||||
(export gnc:*company-email*)
|
||||
(export gnc:*company-contact*)
|
||||
(export gnc:*fancy-date-label*)
|
||||
(export gnc:*fancy-date-format*)
|
||||
(export gnc:*tax-label*)
|
||||
(export gnc:*tax-nr-label*)
|
||||
(export gnc:company-info)
|
||||
(export gnc:fancy-date-info)
|
||||
(export gnc:*option-section-budgeting*)
|
||||
(export gnc:*option-name-auto-readonly-days*)
|
||||
(export gnc:*option-name-num-field-source*)
|
||||
(export gnc:*kvp-option-path*)
|
||||
(export gnc:options-fancy-date)
|
||||
(export gnc:*option-name-default-budget*)
|
||||
|
||||
(define gnc:*kvp-option-path* (list KVP-OPTION-PATH))
|
||||
(define gnc:*option-name-auto-readonly-days* OPTION-NAME-AUTO-READONLY-DAYS)
|
||||
(define gnc:*option-name-num-field-source* OPTION-NAME-NUM-FIELD-SOURCE)
|
||||
|
||||
(define gnc:*option-section-budgeting* OPTION-SECTION-BUDGETING)
|
||||
(define gnc:*option-name-default-budget* OPTION-NAME-DEFAULT-BUDGET)
|
||||
|
||||
(define gnc:*business-label* (N_ "Business"))
|
||||
(define gnc:*company-name* (N_ "Company Name"))
|
||||
(define gnc:*company-addy* (N_ "Company Address"))
|
||||
(define gnc:*company-id* (N_ "Company ID"))
|
||||
(define gnc:*company-phone* (N_ "Company Phone Number"))
|
||||
(define gnc:*company-fax* (N_ "Company Fax Number"))
|
||||
(define gnc:*company-url* (N_ "Company Website URL"))
|
||||
(define gnc:*company-email* (N_ "Company Email Address"))
|
||||
(define gnc:*company-contact* (N_ "Company Contact Person"))
|
||||
(define gnc:*fancy-date-label* (N_ "Fancy Date Format"))
|
||||
(define gnc:*fancy-date-format* (N_ "custom"))
|
||||
(define gnc:*tax-label* (N_ "Tax"))
|
||||
(define gnc:*tax-nr-label* (N_ "Tax Number"))
|
||||
|
||||
|
||||
(define (gnc:options-fancy-date book)
|
||||
(let ((date-format (gnc:fancy-date-info book gnc:*fancy-date-format*)))
|
||||
(if (boolean? date-format) ;; date-format does not exist
|
||||
(qof-date-format-get-string (qof-date-format-get))
|
||||
date-format)))
|
||||
|
||||
(define (gnc:company-info book key)
|
||||
;; Access company info from key-value pairs for current book
|
||||
(gnc:option-get-value book gnc:*business-label* key))
|
||||
|
||||
(define (gnc:fancy-date-info book key)
|
||||
;; Access fancy date info from key-value pairs for current book
|
||||
(gnc:option-get-value book gnc:*business-label* (list gnc:*fancy-date-label* key)))
|
||||
|
||||
|
||||
|
||||
(define (gnc:options-fancy-date book)
|
||||
(let ((date-format (gnc:fancy-date-info book gnc:*fancy-date-format*)))
|
||||
|
@ -19,7 +19,16 @@
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(define-module (gnucash app-utils business-prefs))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-app-utils" "scm_init_sw_app_utils_module"))
|
||||
|
||||
(use-modules (sw_app_utils))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils options))
|
||||
(use-modules (gnucash app-utils business-options))
|
||||
|
||||
(define gnc:*option-section-counters* (N_ "Counters"))
|
||||
|
||||
|
@ -15,7 +15,18 @@
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(define-module (gnucash app-utils c-interface))
|
||||
|
||||
(use-modules (ice-9 match))
|
||||
(use-modules (gnucash core-utils)
|
||||
(gnucash utilities))
|
||||
|
||||
(export gnc:make-string-database)
|
||||
(export gnc:call-with-error-handling)
|
||||
(export gnc:apply-with-error-handling)
|
||||
(export gnc:eval-string-with-error-handling)
|
||||
(export gnc:backtrace-if-exception)
|
||||
(export gnc:last-captured-error)
|
||||
|
||||
(define (gnc:call-with-error-handling cmd args)
|
||||
(let ((captured-stack #f)
|
||||
@ -71,7 +82,7 @@
|
||||
(when (defined? 'gnc:warn) (gnc:warn captured-error))
|
||||
#f)))
|
||||
|
||||
(define-public gnc:last-captured-error "")
|
||||
(define gnc:last-captured-error "")
|
||||
|
||||
;; This database can be used to store and retrieve translatable
|
||||
;; strings. Strings that are returned by the lookup function are
|
||||
|
@ -21,7 +21,106 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
|
||||
(define-module (gnucash app-utils date-utilities))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-app-utils" "scm_init_sw_app_utils_module"))
|
||||
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (sw_app_utils))
|
||||
(use-modules (gnucash app-utils c-interface))
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(export gnc:reldate-list)
|
||||
(export gnc:date-get-year)
|
||||
(export gnc:date-get-quarter)
|
||||
(export gnc:date-get-month-day)
|
||||
(export gnc:date-get-month)
|
||||
(export gnc:date-get-week-day)
|
||||
(export gnc:date-get-week)
|
||||
(export gnc:date-get-year-day)
|
||||
(export gnc:time64-get-year)
|
||||
(export gnc:time64-get-quarter)
|
||||
(export gnc:time64-get-month-day)
|
||||
(export gnc:time64-get-month)
|
||||
(export gnc:time64-get-week-day)
|
||||
(export gnc:time64-get-week)
|
||||
(export gnc:time64-get-year-day)
|
||||
(export gnc:date-get-year-string)
|
||||
(export gnc:date-get-quarter-string)
|
||||
(export gnc:date-get-quarter-year-string)
|
||||
(export gnc:date-get-month-string)
|
||||
(export gnc:date-get-month-year-string)
|
||||
(export gnc:date-get-week-year-string)
|
||||
(export gnc:leap-year?)
|
||||
(export gnc:days-in-year)
|
||||
(export gnc:days-in-month)
|
||||
(export gnc:date-to-year-fraction)
|
||||
(export gnc:date-year-delta)
|
||||
(export gnc:date-to-month-fraction)
|
||||
(export gnc:date-to-week-fraction)
|
||||
(export gnc:date-to-week)
|
||||
(export gnc:date-to-day-fraction)
|
||||
(export gnc:date-get-fraction-func)
|
||||
(export moddatek)
|
||||
(export decdate)
|
||||
(export incdate)
|
||||
(export decdate)
|
||||
(export incdate)
|
||||
(export gnc:make-date-interval-list)
|
||||
(export gnc:make-date-list)
|
||||
(export SecDelta)
|
||||
(export DayDelta)
|
||||
(export WeekDelta)
|
||||
(export TwoWeekDelta)
|
||||
(export MonthDelta)
|
||||
(export QuarterDelta)
|
||||
(export HalfYearDelta)
|
||||
(export YearDelta)
|
||||
(export ThirtyDayDelta)
|
||||
(export NinetyDayDelta)
|
||||
(export gnc:deltasym-to-delta)
|
||||
(export gnc:time64-start-day-time)
|
||||
(export gnc:time64-end-day-time)
|
||||
(export gnc:time64-previous-day)
|
||||
(export gnc:time64-next-day)
|
||||
(export gnc:reldate-get-symbol)
|
||||
(export gnc:reldate-get-string)
|
||||
(export gnc:reldate-get-desc)
|
||||
(export gnc:reldate-get-fn)
|
||||
(export gnc:get-absolute-from-relative-date)
|
||||
(export gnc:get-relative-date-string)
|
||||
(export gnc:get-relative-date-desc)
|
||||
(export gnc:get-start-cal-year)
|
||||
(export gnc:get-end-cal-year)
|
||||
(export gnc:get-start-prev-year)
|
||||
(export gnc:get-end-prev-year)
|
||||
(export gnc:get-start-this-month)
|
||||
(export gnc:get-end-this-month)
|
||||
(export gnc:get-start-prev-month)
|
||||
(export gnc:get-end-prev-month)
|
||||
(export gnc:get-start-current-quarter)
|
||||
(export gnc:get-end-current-quarter)
|
||||
(export gnc:get-start-prev-quarter)
|
||||
(export gnc:get-end-prev-quarter)
|
||||
(export gnc:get-today)
|
||||
(export gnc:get-one-month-ago)
|
||||
(export gnc:get-three-months-ago)
|
||||
(export gnc:get-six-months-ago)
|
||||
(export gnc:get-one-year-ago)
|
||||
(export gnc:reldate-initialize)
|
||||
(export gnc:get-end-next-month)
|
||||
(export gnc:get-end-next-quarter)
|
||||
(export gnc:get-end-next-year)
|
||||
(export gnc:get-one-month-ahead)
|
||||
(export gnc:get-one-year-ahead)
|
||||
(export gnc:get-six-months-ahead)
|
||||
(export gnc:get-start-next-month)
|
||||
(export gnc:get-start-next-quarter)
|
||||
(export gnc:get-start-next-year)
|
||||
(export gnc:get-three-months-ahead)
|
||||
|
||||
;; get stuff from localtime date vector
|
||||
(define (gnc:date-get-year datevec)
|
||||
|
@ -16,8 +16,140 @@
|
||||
;; Free Software Foundation Voice: +1-617-542-5942
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
(use-modules (ice-9 regex))
|
||||
|
||||
(define-module (gnucash app-utils options))
|
||||
|
||||
(eval-when (compile load eval expand)
|
||||
(load-extension "libgnc-app-utils" "scm_init_sw_app_utils_module"))
|
||||
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (sw_app_utils))
|
||||
(use-modules (gnucash app-utils date-utilities))
|
||||
(use-modules (gnucash utilities))
|
||||
(use-modules (ice-9 regex))
|
||||
|
||||
(export gnc:color->html)
|
||||
(export gnc:color-option->hex-string)
|
||||
(export gnc:color-option->html)
|
||||
(export gnc:currency-accounting-option-get-curr-doc-string)
|
||||
(export gnc:currency-accounting-option-get-default-curr)
|
||||
(export gnc:currency-accounting-option-get-default-policy)
|
||||
(export gnc:currency-accounting-option-get-gain-loss-account-doc-string)
|
||||
(export gnc:currency-accounting-option-get-policy-doc-string)
|
||||
(export gnc:currency-accounting-option-selected-currency)
|
||||
(export gnc:currency-accounting-option-selected-gain-loss-account)
|
||||
(export gnc:currency-accounting-option-selected-method)
|
||||
(export gnc:currency-accounting-option-selected-policy)
|
||||
(export gnc:date-option-absolute-time)
|
||||
(export gnc:date-option-get-subtype)
|
||||
(export gnc:date-option-relative-time)
|
||||
(export gnc:date-option-show-time?)
|
||||
(export gnc:date-option-value-type)
|
||||
(export gnc:dateformat-get-format)
|
||||
(export gnc:generate-restore-forms)
|
||||
(export gnc:get-rd-option-data-rd-list)
|
||||
(export gnc:get-rd-option-data-show-time)
|
||||
(export gnc:get-rd-option-data-subtype)
|
||||
(export gnc:lookup-option)
|
||||
(export gnc:make-account-list-limited-option)
|
||||
(export gnc:make-account-list-option)
|
||||
(export gnc:make-account-sel-limited-option)
|
||||
(export gnc:make-account-sel-option)
|
||||
(export gnc:make-budget-option)
|
||||
(export gnc:make-color-option)
|
||||
(export gnc:make-commodity-option)
|
||||
(export gnc:make-complex-boolean-option)
|
||||
(export gnc:make-currency-option)
|
||||
(export gnc:make-date-option)
|
||||
(export gnc:make-dateformat-option)
|
||||
(export gnc:make-font-option)
|
||||
(export gnc:make-internal-option)
|
||||
(export gnc:make-list-option)
|
||||
(export gnc:make-multichoice-callback-option)
|
||||
(export gnc:make-multichoice-option)
|
||||
(export gnc:make-number-plot-size-option)
|
||||
(export gnc:make-number-range-option)
|
||||
(export gnc:make-option)
|
||||
(export gnc:make-pixmap-option)
|
||||
(export gnc:make-query-option)
|
||||
(export gnc:make-radiobutton-callback-option)
|
||||
(export gnc:make-radiobutton-option)
|
||||
(export gnc:make-simple-boolean-option)
|
||||
(export gnc:make-string-option)
|
||||
(export gnc:make-text-option)
|
||||
(export gnc:multichoice-list-lookup)
|
||||
(export gnc:new-options)
|
||||
(export gnc:option-data)
|
||||
(export gnc:option-data-fns)
|
||||
(export gnc:option-default-getter)
|
||||
(export gnc:option-default-value)
|
||||
(export gnc:option-documentation)
|
||||
(export gnc:option-generate-restore-form)
|
||||
(export gnc:option-get-value)
|
||||
(export gnc:option-getter)
|
||||
(export gnc:option-index-get-description)
|
||||
(export gnc:option-index-get-name)
|
||||
(export gnc:option-index-get-value)
|
||||
(export gnc:option-kvp->scm)
|
||||
(export gnc:option-make-internal!)
|
||||
(export gnc:option-name)
|
||||
(export gnc:option-number-of-indices)
|
||||
(export gnc:option-scm->kvp)
|
||||
(export gnc:option-section)
|
||||
(export gnc:option-set-changed-callback)
|
||||
(export gnc:option-set-default-value)
|
||||
(export gnc:option-set-value)
|
||||
(export gnc:option-setter)
|
||||
(export gnc:option-sort-tag)
|
||||
(export gnc:option-strings-getter)
|
||||
(export gnc:option-type)
|
||||
(export gnc:option-value)
|
||||
(export gnc:option-value-get-index)
|
||||
(export gnc:option-value-validator)
|
||||
(export gnc:option-widget-changed-proc)
|
||||
(export gnc:options-clear-changes)
|
||||
(export gnc:options-copy-values)
|
||||
(export gnc:options-for-each)
|
||||
(export gnc:options-for-each-general)
|
||||
(export gnc:options-get-default-section)
|
||||
(export gnc:options-kvp->scm)
|
||||
(export gnc:options-make-date-interval!)
|
||||
(export gnc:options-make-end-date!)
|
||||
(export gnc:options-register-c-callback)
|
||||
(export gnc:options-register-callback)
|
||||
(export gnc:options-run-callbacks)
|
||||
(export gnc:options-scm->kvp)
|
||||
(export gnc:options-set-default-section)
|
||||
(export gnc:options-touch)
|
||||
(export gnc:options-unregister-callback-id)
|
||||
(export gnc:plot-size-option-value)
|
||||
(export gnc:plot-size-option-value-type)
|
||||
(export gnc:register-option)
|
||||
(export gnc:restore-form-generator)
|
||||
(export gnc:send-options)
|
||||
(export gnc:set-option-kvp->scm)
|
||||
(export gnc:set-option-scm->kvp)
|
||||
(export gnc:unregister-option)
|
||||
(export gnc:value->string)
|
||||
|
||||
(export gnc:*option-name-trading-accounts*)
|
||||
(export gnc:*option-name-book-currency*)
|
||||
(export gnc:*option-section-accounts*)
|
||||
(export gnc:*option-name-default-gains-policy*)
|
||||
(export gnc:*option-name-default-gain-loss-account*)
|
||||
|
||||
(define gnc:*option-section-accounts* OPTION-SECTION-ACCOUNTS)
|
||||
(define gnc:*option-name-trading-accounts* OPTION-NAME-TRADING-ACCOUNTS)
|
||||
(define gnc:*option-name-currency-accounting* OPTION-NAME-CURRENCY-ACCOUNTING)
|
||||
(define gnc:*option-name-book-currency* OPTION-NAME-BOOK-CURRENCY)
|
||||
(define gnc:*option-name-default-gains-policy* OPTION-NAME-DEFAULT-GAINS-POLICY)
|
||||
(define gnc:*option-name-default-gain-loss-account*
|
||||
OPTION-NAME-DEFAULT-GAINS-LOSS-ACCT-GUID)
|
||||
|
||||
(define (gnc:option-get-value book category key)
|
||||
(define acc (if (pair? key) cons list))
|
||||
(qof-book-get-option book (acc category key)))
|
||||
|
||||
(define (rpterror-earlier type newoption fallback)
|
||||
;; Translators: the 3 ~a below refer to (1) option type (2) unknown
|
||||
|
@ -18,8 +18,8 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(setenv "GNC_UNINSTALLED" "1")
|
||||
(debug-set! stack 50000)
|
||||
(load-from-path "gnucash/app-utils/c-interface")
|
||||
|
||||
(use-modules (gnucash app-utils c-interface))
|
||||
(use-modules (tests test-engine-extras))
|
||||
|
||||
(define (test-func a b)
|
||||
|
@ -19,29 +19,7 @@
|
||||
|
||||
(define-module (gnucash locale de_DE tax))
|
||||
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash core-utils))
|
||||
|
||||
(export gnc:txf-get-payer-name-source)
|
||||
(export gnc:txf-get-form)
|
||||
(export gnc:txf-get-description)
|
||||
(export gnc:txf-get-format)
|
||||
(export gnc:txf-get-multiple)
|
||||
(export gnc:txf-get-category-key)
|
||||
(export gnc:txf-get-line-data)
|
||||
(export gnc:txf-get-last-year)
|
||||
(export gnc:txf-get-help)
|
||||
(export gnc:txf-get-codes)
|
||||
(export gnc:txf-get-tax-entity-type)
|
||||
(export gnc:txf-get-tax-entity-type-description)
|
||||
(export gnc:txf-get-tax-entity-type-codes)
|
||||
(export gnc:txf-get-code-info)
|
||||
(export txf-help-categories)
|
||||
|
||||
(export txf-income-categories)
|
||||
(export txf-expense-categories)
|
||||
(export txf-asset-categories)
|
||||
(export txf-liab-eq-categories)
|
||||
|
||||
(load-from-path "gnucash/locale/de_DE/tax/txf")
|
||||
(load-from-path "gnucash/locale/de_DE/tax/txf-help")
|
||||
(load-and-reexport (gnucash locale de_DE tax txf)
|
||||
(gnucash locale de_DE tax txf-help))
|
||||
|
@ -32,6 +32,9 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash locale de_DE tax txf-help))
|
||||
|
||||
(export txf-help-strings)
|
||||
|
||||
(define txf-help-strings
|
||||
'(
|
||||
|
@ -44,9 +44,33 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash locale de_DE tax txf))
|
||||
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (srfi srfi-2))
|
||||
(use-modules (gnucash locale de_DE tax txf-help))
|
||||
|
||||
(export gnc:tax-type-txf-get-code-info)
|
||||
(export gnc:txf-get-category-key)
|
||||
(export gnc:txf-get-code-info)
|
||||
(export gnc:txf-get-codes)
|
||||
(export gnc:txf-get-description)
|
||||
(export gnc:txf-get-form)
|
||||
(export gnc:txf-get-format)
|
||||
(export gnc:txf-get-help)
|
||||
(export gnc:txf-get-last-year)
|
||||
(export gnc:txf-get-line-data)
|
||||
(export gnc:txf-get-multiple)
|
||||
(export gnc:txf-get-payer-name-source)
|
||||
(export gnc:txf-get-tax-entity-type)
|
||||
(export gnc:txf-get-tax-entity-type-codes)
|
||||
(export gnc:txf-get-tax-entity-type-description)
|
||||
(export txf-asset-categories)
|
||||
(export txf-expense-categories)
|
||||
(export txf-help-categories)
|
||||
(export txf-income-categories)
|
||||
(export txf-liab-eq-categories)
|
||||
(export txf-tax-entity-types)
|
||||
|
||||
(define txf-tax-entity-types
|
||||
(list
|
||||
|
@ -19,26 +19,7 @@
|
||||
|
||||
(define-module (gnucash locale us tax))
|
||||
|
||||
(export gnc:txf-get-payer-name-source)
|
||||
(export gnc:txf-get-form)
|
||||
(export gnc:txf-get-description)
|
||||
(export gnc:txf-get-format)
|
||||
(export gnc:txf-get-multiple)
|
||||
(export gnc:txf-get-category-key)
|
||||
(export gnc:txf-get-line-data)
|
||||
(export gnc:txf-get-last-year)
|
||||
(export gnc:txf-get-help)
|
||||
(export gnc:txf-get-codes)
|
||||
(export gnc:txf-get-tax-entity-type)
|
||||
(export gnc:txf-get-tax-entity-type-description)
|
||||
(export gnc:txf-get-tax-entity-type-codes)
|
||||
(export gnc:txf-get-code-info)
|
||||
(export txf-help-categories)
|
||||
(use-modules (gnucash core-utils))
|
||||
|
||||
(export txf-income-categories)
|
||||
(export txf-expense-categories)
|
||||
(export txf-asset-categories)
|
||||
(export txf-liab-eq-categories)
|
||||
|
||||
(load-from-path "gnucash/locale/us/tax/txf")
|
||||
(load-from-path "gnucash/locale/us/tax/txf-help")
|
||||
(load-and-reexport (gnucash locale us tax txf)
|
||||
(gnucash locale us tax txf-help))
|
||||
|
@ -26,7 +26,9 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash locale us tax txf-help))
|
||||
|
||||
(export txf-help-strings)
|
||||
(define txf-help-strings
|
||||
'(
|
||||
(H001 . "Categories marked with a \"<\" or a \"^\", require a Payer identification to be exported. \"<\" indicates that the name of this account is exported as this Payer ID. Typically, this is a bank, stock, or mutual fund name.")
|
||||
|
@ -39,11 +39,35 @@
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-module (gnucash locale us tax txf))
|
||||
|
||||
(use-modules (gnucash engine))
|
||||
(use-modules (gnucash core-utils))
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (srfi srfi-2))
|
||||
(use-modules (gnucash locale us tax txf-help))
|
||||
|
||||
(export gnc:tax-type-txf-get-code-info)
|
||||
(export gnc:txf-get-category-key)
|
||||
(export gnc:txf-get-code-info)
|
||||
(export gnc:txf-get-codes)
|
||||
(export gnc:txf-get-description)
|
||||
(export gnc:txf-get-form)
|
||||
(export gnc:txf-get-format)
|
||||
(export gnc:txf-get-help)
|
||||
(export gnc:txf-get-last-year)
|
||||
(export gnc:txf-get-line-data)
|
||||
(export gnc:txf-get-multiple)
|
||||
(export gnc:txf-get-payer-name-source)
|
||||
(export gnc:txf-get-tax-entity-type)
|
||||
(export gnc:txf-get-tax-entity-type-codes)
|
||||
(export gnc:txf-get-tax-entity-type-description)
|
||||
(export txf-asset-categories)
|
||||
(export txf-expense-categories)
|
||||
(export txf-help-categories)
|
||||
(export txf-income-categories)
|
||||
(export txf-liab-eq-categories)
|
||||
(export txf-tax-entity-types)
|
||||
|
||||
(define txf-tax-entity-types
|
||||
(list
|
||||
|
Loading…
Reference in New Issue
Block a user