[trep-engine.scm] Rename "Totals" option to "Grand Total"

This commit is contained in:
Vincent Dawans
2023-05-25 19:11:39 -07:00
parent 6d07f41d57
commit 1c04e744d3
3 changed files with 14 additions and 12 deletions

View File

@@ -487,7 +487,7 @@
(set-option! options "Display" name #f))
(list "Date" "Reconciled Date" "Num" "Description" "Memo" "Notes"
"Account Name" "Other Account Name" "Shares" "Price" "Account Balance"
"Totals"))
"Grand Total"))
(let ((sxml (options->sxml options "all columns off")))
(test-assert "all display columns off, except amount and subtotals are enabled, there should be 2 columns"
(= (length ((sxpath '(// (table 1) // (tr 1) // th)) sxml))
@@ -545,7 +545,7 @@
(set-option! options "Display" name #t))
(list "Date" "Reconciled Date" "Num" "Description" "Memo" "Notes"
"Account Name" "Other Account Name" "Shares" "Price" "Account Balance"
"Totals" "Use Full Other Account Name" "Use Full Account Name"))
"Grand Total" "Use Full Other Account Name" "Use Full Account Name"))
(set-option! options "Display" "Running Totals" 'grand)
(let* ((sxml (options->sxml options "all columns on")))
(test-equal "all display columns on, displays correct columns"
@@ -571,7 +571,7 @@
(set-option! options "General" "Start Date" (cons 'absolute (gnc-dmy2time64 13 02 1971)))
(set-option! options "General" "End Date" (cons 'absolute (gnc-dmy2time64 15 02 1971)))
(set-option! options "Display" "Detail Level" 'multi-line)
(set-option! options "Display" "Totals" #f)
(set-option! options "Display" "Grand Total" #f)
(set-option! options "Sorting" "Primary Subtotal" #f)
(set-option! options "Sorting" "Primary Subtotal for Date Key" 'none)
(set-option! options "Sorting" "Secondary Subtotal" #f)
@@ -735,7 +735,7 @@
(set-option! options "General" "End Date" (cons 'absolute (gnc-dmy2time64 31 12 1970)))
;;(set-option! options "Accounts" "Accounts" (gnc-account-get-descendants (gnc-account-get-root bank)))
(set-option! options "Accounts" "Accounts" (list bank))
(set-option! options "Display" "Totals" #f)
(set-option! options "Display" "Grand Total" #f)
(set-option! options "Display" "Other Account Name" #t)
(set-option! options "Filter" "Void Transactions" 'both)
(set-option! options "Sorting" "Primary Subtotal" #f)
@@ -797,7 +797,7 @@
(set-option! options "Sorting" "Primary Subtotal" #t)
(set-option! options "Sorting" "Secondary Key" 'date)
(set-option! options "Sorting" "Secondary Subtotal for Date Key" 'monthly)
(set-option! options "Display" "Totals" #t)
(set-option! options "Display" "Grand Total" #t)
(set-option! options "Sorting" "Secondary Subtotal for Date Key" 'quarterly)
(set-option! options "Sorting" "Show subtotals only (hide transactional data)" #t)
(let* ((sxml (options->sxml options "sorting=account-name, date-quarterly, subtotals only")))
@@ -807,7 +807,7 @@
(set! options (default-testing-options))
(set-option! options "Accounts" "Accounts" (gnc-account-get-descendants (gnc-account-get-root bank)))
(set-option! options "Display" "Totals" #t)
(set-option! options "Display" "Grand Total" #t)
(set-option! options "Display" "Amount" 'double)
(set-option! options "Currency" "Show original currency amount" #t)
(set-option! options "General" "Table for Exporting" #f)
@@ -827,7 +827,7 @@
(get-row-col sxml 91 #f)))
(set-option! options "Accounts" "Accounts" (list bank))
(set-option! options "Display" "Totals" #f)
(set-option! options "Display" "Grand Total" #f)
(set-option! options "Sorting" "Show subtotals only (hide transactional data)" #t)
(let* ((sxml (options->sxml options "sorting=date quarterly")))
(test-equal "quarterly subtotals are correct"
@@ -868,7 +868,7 @@
;; test running subtotals
(set! options (default-testing-options))
(set-option! options "Display" "Totals" #f)
(set-option! options "Display" "Grand Total" #f)
(set-option! options "Display" "Running Totals" 'sub)
(set-option! options "Sorting" "Primary Key" 'account-name)
(set-option! options "Sorting" "Primary Subtotal" #t)
@@ -918,7 +918,7 @@
(set-option! options "Display" name #t))
(list "Date" "Reconciled Date" "Num" "Description" "Memo" "Notes"
"Account Name" "Other Account Name" "Shares" "Price" "Account Balance"
"Totals" "Use Full Other Account Name" "Use Full Account Name"))
"Grand Total" "Use Full Other Account Name" "Use Full Account Name"))
(set-option! options "Display" "Running Totals" 'all)
(set-option! options "Sorting" "Primary Key" 'account-name)
(set-option! options "Sorting" "Primary Subtotal" #t)

View File

@@ -74,6 +74,7 @@
;;Display
(define optname-detail-level (N_ "Detail Level"))
(define optname-grid (N_ "Subtotal Table"))
(define optname-grand-total (N_ "Grand Total"))
;; Translators: a running total is a total that is continually adjusted on every line.
;; To be consistent, also consider how the term "Running Balance" is translated.
;; "Running Totals" is the plural form as it refers to the running total and running subtotals.
@@ -926,7 +927,7 @@ be excluded from periodic reporting.")
;; note the "Amount" multichoice option in between here
(list optname-grid "m5" (G_ "Display a subtotal summary table.") #f)
(list (N_ "Account Balance") "n" (G_ "Display the balance of the underlying account on each line?") #f)
(list (N_ "Totals") "o" (G_ "Display the totals?") #t)))
(list optname-grand-total "o" (G_ "Display a grand total section at the bottom?") #t)))
(when BOOK-SPLIT-ACTION
(gnc-register-simple-boolean-option options
@@ -1321,7 +1322,7 @@ be excluded from periodic reporting.")
(if (or (column-uses? 'subtotals-only)
(and (null? left-cols-list)
(or (opt-val gnc:pagename-display "Totals")
(or (opt-val gnc:pagename-display optname-grand-total)
(primary-get-info 'renderer-fn)
(secondary-get-info 'renderer-fn))))
`(((heading . "") (renderer-fn . ,(const #f))))
@@ -2005,7 +2006,7 @@ be excluded from periodic reporting.")
(if (null? splits)
(when (opt-val gnc:pagename-display "Totals")
(when (opt-val gnc:pagename-display optname-grand-total)
(gnc:html-table-append-row/markup!
table def:grand-total-style
(list

View File

@@ -117,6 +117,7 @@ const OptionAliases Aliases::c_option_aliases
{"Specify date to filter by...", {nullptr, "Specify date to filter by…"}},
// trep-engine:
{"Running Balance", {nullptr, "Account Balance"}},
{"Totals", {nullptr, "Grand Total"}},
};
static bool