From 1f2b5881ae7abaaee7aa3342a379595f721dce0a Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 24 Dec 2022 14:02:03 +0800 Subject: [PATCH] [investment-lots] ST/LT grouping option enables LT gain option --- gnucash/report/reports/standard/investment-lots.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gnucash/report/reports/standard/investment-lots.scm b/gnucash/report/reports/standard/investment-lots.scm index e799b9ebc0a..a5b16adcaa2 100644 --- a/gnucash/report/reports/standard/investment-lots.scm +++ b/gnucash/report/reports/standard/investment-lots.scm @@ -248,7 +248,7 @@ (N_ "Show unrealized gain table column(s) for unsold shares") #t) - (gnc-register-multichoice-option options + (gnc-register-multichoice-callback-option options pagename-columns optname-group-gains-by-age "h" @@ -256,7 +256,11 @@ "gains-only" (list (vector 'no (N_ "No")) (vector 'gains-only (N_ "Gains Only")) - (vector 'gains-and-sales (N_ "Gains and Sales")))) + (vector 'gains-and-sales (N_ "Gains and Sales"))) + (lambda (x) + (gnc-optiondb-set-option-selectable-by-name + options pagename-columns optname-long-term-years + (not (eq? x 'no))))) ;; Note: Different governments may have different rules regarding how long ;; shares must be held to qualify for different tax treatment. So make