{ "38bf40d16529f2a1e611c073c6c1dc9c", 7,true,false },
}
-// transacion exception list
-var trn_exc = []string{
+//
+// account exceptions
+//
+// account exceptions: nineteen to seven
+var n2s_exc = []string{
+}
+// account exceptions: nineteen to zero
+var n2z_exc = []string{
+ "4970 Nebenkosten des",
+ "4910 Porto",
+}
+// transaction exceptions: nineteen to seven
+var n2s_exc_ta = []string{
"GEMA",
+}
+// transaction exceptions: nineteen to zero
+var n2z_exc_ta = []string{
"Deutsche Post",
"gesetz IHK",
"Gesundheitsbelehrung",
"Unterrichtung Gastst",
}
-// account exception list
-var account_exc = []string{
- "4970 Nebenkosten des",
+// transacion exception list --- the rest, required?
+var trn_exc = []string{
}
// account maps
for iac := range iaa {
// consider account if pid or aid matches
if pid == iaa[iac].id || aid == iaa[iac].id {
+ taxval := iaa[iac].taxval
+ for ec := range n2s_exc {
+ if strings.Contains(data.Accnt[ac].Name,
+ n2s_exc[ec]) {
+ taxval=7
+ break
+ }
+ }
+ for ec := range n2z_exc {
+ if strings.Contains(data.Accnt[ac].Name,
+ n2z_exc[ec]) {
+ taxval=0
+ break
+ }
+ }
accnt[aid]=amap{
pid,
ac,
- iaa[iac].taxval,
+ taxval,
iaa[iac].buy,
iaa[iac].tax,
}
tdate := strings.Fields(ta.Date)[0]
if !strings.Contains(tdate,sel_date) {
return true
- } else {
+ }
+
+ // exceptions
+ tv_ow := -1
+ for ec := range n2s_exc_ta {
+ if strings.Contains(ta.Description,n2s_exc_ta[ec]) {
+ tv_ow=7
+ break
+ }
+ }
+ for ec := range n2z_exc_ta {
+ if strings.Contains(ta.Description,n2z_exc_ta[ec]) {
+ tv_ow=0
+ break
+ }
}
// [taxval: 19=0 7=1][tax: no=0 yes=1][buy: no=0 yes=1]
aid := ta.Spl[sc].AccountId
//accnt[aid].tax
for iac := range iaa {
- // taxval
tv := int(0)
- if iaa[iac].taxval == 7 {
- tv = 1
+ // taxval - check accnt instead of iaa!
+ if tv_ow != -1 {
+ if tv_ow == 7 {
+ tv=1
+ }
+ if tv_ow == 0 {
+ continue
+ }
+ } else {
+ if accnt[aid].taxval == 0 {
+ continue
+ }
+ if accnt[aid].taxval == 7 {
+ tv = 1
+ }
}
// tax
tax := int(0)