gnucash maint: bug #796498 - Incorrect starting balance in TXF Report calculations

J.Alex Aycinena alex.aycinena at code.gnucash.org
Fri Jan 18 23:20:22 EST 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/08704127 (commit)
	from  https://github.com/Gnucash/gnucash/commit/48988ac5 (commit)



commit 08704127d1bfe34bd0f6c768eea77d4ad682af7d
Author: Alex Aycinena <alex.aycinena at gmail.com>
Date:   Fri Jan 18 20:19:56 2019 -0800

    bug #796498 - Incorrect starting balance in TXF Report calculations

diff --git a/gnucash/report/locale-specific/us/taxtxf.scm b/gnucash/report/locale-specific/us/taxtxf.scm
index 3dc36d2..89ec756 100644
--- a/gnucash/report/locale-specific/us/taxtxf.scm
+++ b/gnucash/report/locale-specific/us/taxtxf.scm
@@ -68,6 +68,7 @@
 ;; Update from "V041" to "V042", although added codes are not implemented
 ;;   because cost/gain data not reliably available
 ;; The format for code 673 can be 4 or 5, per spec, so leave as 4
+;; Fix beginning balance off-by-one-day error for B/S accounts
 ;;
 ;; From prior version:
 ;; NOTE: setting of specific dates is squirly! and seems
@@ -2122,6 +2123,8 @@
                       ;; The exact same code, in from-value, further above,
                       ;;   only subtraces one!  Go figure!
                       ;; So, we add one back below!
+;; comment - could it be because from-date coming in has already had 1
+;; subtracted in setting from-value?
                       (if (member alt-period
                                   '(last-year 1st-last 2nd-last
                                               3rd-last 4th-last))
@@ -2245,7 +2248,7 @@
                                          (or (eq? account-type ACCT-TYPE-INCOME)
                                            (eq? account-type ACCT-TYPE-EXPENSE)))
                              (gnc:account-get-comm-balance-at-date account
-                                      (gnc:time64-previous-day from-value) #f)
+                                      (gnc:time64-start-day-time from-value) #f)
                              #f))
               (acct-end-bal-collector (if (not
                                          (or (eq? account-type ACCT-TYPE-INCOME)



Summary of changes:
 gnucash/report/locale-specific/us/taxtxf.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list