From 922374a7461e7fb78e841095fd819f5dcb19a042 Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 11 Jan 2015 02:03:21 +0100 Subject: [PATCH] reset tax accounts for taxvals set to zero --- gocash.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gocash.go b/gocash.go index 676bf73..97c80cf 100644 --- a/gocash.go +++ b/gocash.go @@ -267,10 +267,21 @@ func check_balance(ta *Transaction,accnt map[string]amap,sel_date string) bool { tv=1 } if tv_ow == 0 { - continue + // reset taxvalues of involved accounts + // (to drop an error) + if accnt[aid].tax { + if accnt[aid].taxval==7 { + tv=1 + } + } else { + continue + } } } else { if accnt[aid].taxval == 0 { + if accnt[aid].tax { + fmt.Println("FATAL!"); + } continue } if accnt[aid].taxval == 7 { -- 2.39.2