gnucash stable: [budget-income-statement.scm] don't allow periods > num-periods

Christopher Lam clam at code.gnucash.org
Sun Apr 16 11:19:41 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/1697e536 (commit)
	from  https://github.com/Gnucash/gnucash/commit/4de4132c (commit)



commit 1697e5361036006c83dda39e0384d4a2894402d7
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sun Apr 16 23:13:13 2023 +0800

    [budget-income-statement.scm] don't allow periods > num-periods

diff --git a/gnucash/report/reports/standard/budget-income-statement.scm b/gnucash/report/reports/standard/budget-income-statement.scm
index 80c58fff77..ca1bbc8729 100644
--- a/gnucash/report/reports/standard/budget-income-statement.scm
+++ b/gnucash/report/reports/standard/budget-income-statement.scm
@@ -402,6 +402,13 @@
             report-title
             (G_ "Reporting range end period cannot be less than start period."))))
 
+     ((and use-budget-period-range?
+           (< (gnc-budget-get-num-periods budget) user-budget-period-end))
+      (gnc:html-document-add-object!
+       doc (gnc:html-make-generic-simple-warning
+            report-title
+            (G_ "Reporting range end period cannot exceed number of periods in budget"))))
+
      (else
       ;; Get all the balances for each of the account types.
       (let* ((revenue-account-balances



Summary of changes:
 gnucash/report/reports/standard/budget-income-statement.scm | 7 +++++++
 1 file changed, 7 insertions(+)



More information about the gnucash-changes mailing list