|
|
|
|
@ -68,26 +68,34 @@ to the Reconciliation Date.")
|
|
|
|
|
|
|
|
|
|
(define (reconcile-report-calculated-cells options)
|
|
|
|
|
(letrec
|
|
|
|
|
((split-amount (lambda (s)
|
|
|
|
|
((split-amount (lambda (s tr?)
|
|
|
|
|
(if (gnc:split-voided? s)
|
|
|
|
|
(xaccSplitVoidFormerAmount s)
|
|
|
|
|
(xaccSplitGetAmount s))))
|
|
|
|
|
(split-currency (compose xaccAccountGetCommodity xaccSplitGetAccount))
|
|
|
|
|
(amount (lambda (s)
|
|
|
|
|
(gnc:make-gnc-monetary (split-currency s) (split-amount s))))
|
|
|
|
|
(debit-amount (lambda (s)
|
|
|
|
|
(and (positive? (split-amount s))
|
|
|
|
|
(amount s))))
|
|
|
|
|
(credit-amount (lambda (s)
|
|
|
|
|
(and (not (positive? (split-amount s)))
|
|
|
|
|
(gnc:monetary-neg (amount s))))))
|
|
|
|
|
(amount (lambda (s tr?)
|
|
|
|
|
(gnc:make-gnc-monetary (split-currency s) (split-amount s tr?))))
|
|
|
|
|
(debit-amount (lambda (s tr?)
|
|
|
|
|
(and (positive? (split-amount s tr?))
|
|
|
|
|
(amount s tr?))))
|
|
|
|
|
(credit-amount (lambda (s tr?)
|
|
|
|
|
(and (not (positive? (split-amount s tr?)))
|
|
|
|
|
(gnc:monetary-neg (amount s tr?))))))
|
|
|
|
|
;; similar to default-calculated-cells but disable dual-subtotals.
|
|
|
|
|
(list (vector (G_ "Funds In")
|
|
|
|
|
debit-amount #f #t #f
|
|
|
|
|
(const "") #t)
|
|
|
|
|
(vector (G_ "Funds Out")
|
|
|
|
|
credit-amount #f #t #f
|
|
|
|
|
(const "") #f))))
|
|
|
|
|
(list (list (cons 'heading (G_ "Funds In"))
|
|
|
|
|
(cons 'calc-fn debit-amount)
|
|
|
|
|
(cons 'reverse-column? #f)
|
|
|
|
|
(cons 'subtotal? #t)
|
|
|
|
|
(cons 'start-dual-column? #f)
|
|
|
|
|
(cons 'friendly-heading-fn (const ""))
|
|
|
|
|
(cons 'merge-dual-column? #t))
|
|
|
|
|
(list (cons 'heading (G_ "Funds Out"))
|
|
|
|
|
(cons 'calc-fn credit-amount)
|
|
|
|
|
(cons 'reverse-column? #f)
|
|
|
|
|
(cons 'subtotal? #t)
|
|
|
|
|
(cons 'start-dual-column? #f)
|
|
|
|
|
(cons 'friendly-heading-fn (const ""))
|
|
|
|
|
(cons 'merge-dual-column? #f)))))
|
|
|
|
|
|
|
|
|
|
(define (reconcile-report-renderer rpt)
|
|
|
|
|
(gnc:trep-renderer
|
|
|
|
|
|