|
|
|
|
@ -25,7 +25,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-module (gnucash report standard-reports))
|
|
|
|
|
(use-modules (srfi srfi-9))
|
|
|
|
|
(use-modules (srfi srfi-13))
|
|
|
|
|
(use-modules (gnucash utilities))
|
|
|
|
|
(use-modules (gnucash core-utils))
|
|
|
|
|
@ -40,15 +39,26 @@
|
|
|
|
|
;; or without split. If no function is found, then run the 'default'
|
|
|
|
|
;; function
|
|
|
|
|
|
|
|
|
|
(define-record-type :acct-type-info
|
|
|
|
|
(make-acct-type-private split non-split)
|
|
|
|
|
acct-type-info?
|
|
|
|
|
(split get-split set-split)
|
|
|
|
|
(non-split get-non-split set-non-split))
|
|
|
|
|
(define acct-type-info (make-record-type "AcctTypeInfo" '(split non-split)))
|
|
|
|
|
|
|
|
|
|
(define make-acct-type-private
|
|
|
|
|
(record-constructor acct-type-info '(split non-split)))
|
|
|
|
|
|
|
|
|
|
(define (make-acct-type)
|
|
|
|
|
(make-acct-type-private #f #f))
|
|
|
|
|
|
|
|
|
|
(define get-split
|
|
|
|
|
(record-accessor acct-type-info 'split))
|
|
|
|
|
|
|
|
|
|
(define set-split
|
|
|
|
|
(record-modifier acct-type-info 'split))
|
|
|
|
|
|
|
|
|
|
(define get-non-split
|
|
|
|
|
(record-accessor acct-type-info 'non-split))
|
|
|
|
|
|
|
|
|
|
(define set-non-split
|
|
|
|
|
(record-modifier acct-type-info 'non-split))
|
|
|
|
|
|
|
|
|
|
(define (gnc:register-report-hook acct-type split? create-fcn)
|
|
|
|
|
(let ((type-info (hash-ref gnc:*register-report-hash* acct-type (make-acct-type))))
|
|
|
|
|
(if split?
|
|
|
|
|
|