reconcile-report.scm (gnucash-5.0.tar.bz2) | : | reconcile-report.scm (gnucash-5.1.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 71 | skipping to change at line 71 | |||
(gnc:make-html-text | (gnc:make-html-text | |||
(G_ "The reconcile report is designed to be similar to the formal \ | (G_ "The reconcile report is designed to be similar to the formal \ | |||
reconciliation tool. Please select the account from Report \ | reconciliation tool. Please select the account from Report \ | |||
Options. Please note the dates specified in the options will apply \ | Options. Please note the dates specified in the options will apply \ | |||
to the Reconciliation Date.") | to the Reconciliation Date.") | |||
(gnc:html-markup-br) | (gnc:html-markup-br) | |||
(gnc:html-markup-br))) | (gnc:html-markup-br))) | |||
(define (reconcile-report-calculated-cells options) | (define (reconcile-report-calculated-cells options) | |||
(letrec | (letrec | |||
((split-amount (lambda (s) | ((split-amount (lambda (s tr?) | |||
(if (gnc:split-voided? s) | (if (gnc:split-voided? s) | |||
(xaccSplitVoidFormerAmount s) | (xaccSplitVoidFormerAmount s) | |||
(xaccSplitGetAmount s)))) | (xaccSplitGetAmount s)))) | |||
(split-currency (compose xaccAccountGetCommodity xaccSplitGetAccount)) | (split-currency (compose xaccAccountGetCommodity xaccSplitGetAccount)) | |||
(amount (lambda (s) | (amount (lambda (s tr?) | |||
(gnc:make-gnc-monetary (split-currency s) (split-amount s)))) | (gnc:make-gnc-monetary (split-currency s) (split-amount s tr?)) | |||
(debit-amount (lambda (s) | )) | |||
(and (positive? (split-amount s)) | (debit-amount (lambda (s tr?) | |||
(amount s)))) | (and (positive? (split-amount s tr?)) | |||
(credit-amount (lambda (s) | (amount s tr?)))) | |||
(and (not (positive? (split-amount s))) | (credit-amount (lambda (s tr?) | |||
(gnc:monetary-neg (amount s)))))) | (and (not (positive? (split-amount s tr?))) | |||
(gnc:monetary-neg (amount s tr?)))))) | ||||
;; similar to default-calculated-cells but disable dual-subtotals. | ;; similar to default-calculated-cells but disable dual-subtotals. | |||
(list (vector (G_ "Funds In") | (list (list (cons 'heading (G_ "Funds In")) | |||
debit-amount #f #t #f | (cons 'calc-fn debit-amount) | |||
(const "") #t) | (cons 'reverse-column? #f) | |||
(vector (G_ "Funds Out") | (cons 'subtotal? #t) | |||
credit-amount #f #t #f | (cons 'start-dual-column? #f) | |||
(const "") #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) | (define (reconcile-report-renderer rpt) | |||
(gnc:trep-renderer | (gnc:trep-renderer | |||
rpt | rpt | |||
#:custom-calculated-cells reconcile-report-calculated-cells | #:custom-calculated-cells reconcile-report-calculated-cells | |||
#:empty-report-message reconcile-report-instructions)) | #:empty-report-message reconcile-report-instructions)) | |||
(gnc:define-report | (gnc:define-report | |||
'version 1 | 'version 1 | |||
'name (G_ "Reconciliation Report") | 'name (G_ "Reconciliation Report") | |||
End of changes. 3 change blocks. | ||||
15 lines changed or deleted | 24 lines changed or added |