[budget] rename envelope option to 'Use accumulated amounts'

Because envelope budgeting means something else. This means release
3.7 (the first release with this feature) will use the better name.
pull/575/head
Christopher Lam 7 years ago
parent fa6948a2be
commit ef3157db19

@ -55,8 +55,8 @@
(define opthelp-show-actual (N_ "Display a column for the actual values."))
(define optname-show-difference (N_ "Show Difference"))
(define opthelp-show-difference (N_ "Display the difference as budget - actual."))
(define optname-use-envelope (N_ "Use envelope budgeting"))
(define opthelp-use-envelope (N_ "Values are accumulated across periods."))
(define optname-accumulate (N_ "Use accumulated amounts"))
(define opthelp-accumulate (N_ "Values are accumulated across periods."))
(define optname-show-totalcol (N_ "Show Column with Totals"))
(define opthelp-show-totalcol (N_ "Display a column with the row totals."))
(define optname-show-zb-accounts (N_ "Include accounts with zero total balances and budget values"))
@ -139,8 +139,8 @@
(add-option
(gnc:make-simple-boolean-option
gnc:pagename-general optname-use-envelope
"b" opthelp-use-envelope #f))
gnc:pagename-general optname-accumulate
"b" opthelp-accumulate #f))
(add-option
(gnc:make-complex-boolean-option
@ -269,7 +269,7 @@
(show-actual? (get-val params 'show-actual))
(show-budget? (get-val params 'show-budget))
(show-diff? (get-val params 'show-difference))
(use-envelope? (get-val params 'use-envelope))
(accumulate? (get-val params 'use-envelope))
(show-totalcol? (get-val params 'show-totalcol))
(use-ranges? (get-val params 'use-ranges))
(num-rows (gnc:html-acct-table-num-rows acct-table))
@ -343,7 +343,7 @@
(let* ((comm (xaccAccountGetCommodity acct))
(reverse-balance? (gnc-reverse-balance acct))
(allperiods (filter number? (flatten column-list)))
(total-periods (if use-envelope?
(total-periods (if accumulate?
(iota (1+ (apply max allperiods)))
allperiods))
(income-acct? (eqv? (xaccAccountGetType acct) ACCT-TYPE-INCOME)))
@ -406,7 +406,7 @@
(else
(let* ((period-list (cond
((list? (car column-list)) (car column-list))
(use-envelope? (iota (1+ (car column-list))))
(accumulate? (iota (1+ (car column-list))))
(else (list (car column-list)))))
(bgt-val (gnc:get-account-periodlist-budget-value
budget acct period-list))
@ -675,7 +675,7 @@
(if show-zb-accts? 'show-leaf-acct 'omit-leaf-acct))
(list 'report-budget budget)))
(accounts (sort accounts account-full-name<?))
(use-envelope? (get-option gnc:pagename-general optname-use-envelope))
(accumulate? (get-option gnc:pagename-general optname-accumulate))
(acct-table (gnc:make-html-acct-table/env/accts env accounts))
(paramsBudget
(list
@ -685,7 +685,7 @@
(get-option gnc:pagename-display optname-show-budget))
(list 'show-difference
(get-option gnc:pagename-display optname-show-difference))
(list 'use-envelope use-envelope?)
(list 'use-envelope accumulate?)
(list 'show-totalcol
(get-option gnc:pagename-display optname-show-totalcol))
(list 'use-ranges use-ranges?)
@ -707,7 +707,11 @@
(gnc:html-document-set-title!
doc (format #f "~a: ~a ~a"
report-name (gnc-budget-get-name budget)
(if use-envelope? (_ "using envelope budgeting")
;; Translators: using accumulated amounts mean
;; budget will report on budgeted and actual
;; amounts from the beginning of budget, instead
;; of only using the budget-period amounts.
(if accumulate? (_ "using accumulated amounts")
"")))
;; We do this in two steps: First the account names... the

@ -166,9 +166,9 @@
"$60.00" "$77.00" "-$17.00" "$100.00" "$124.00" "-$24.00")
(sxml->table-row-col sxml 1 5 #f)))
(set-option options "General" "Use envelope budgeting" #t)
(let ((sxml (options->sxml options "envelope budgeting")))
(test-equal "envelope budgeting"
(set-option options "General" "Use accumulated amounts" #t)
(let ((sxml (options->sxml options "Use accumulated amounts")))
(test-equal "use accumulated amounts"
'("Bank" "$60.00" "$15.00" "$45.00" "$60.00" "$82.00" "-$22.00"
"$120.00" "$159.00" "-$39.00" "$120.00" "$159.00" "-$39.00")
(sxml->table-row-col sxml 1 5 #f)))

Loading…
Cancel
Save