Skip to content

Commit 3d5361b

Browse files
authored
fix: add missing overspend mode when importing from YNAB4 (#470)
When importing from YNAB 4, we account for the different mode handling of the overspend mode by setting the overspend mode to `AFFECT_ENVELOPE` for all months up to and including the month when the import happens. This PR fixes the handling so that it actually includes the `AFFECT_ENVELOPE` setting.
1 parent 6a9cf8c commit 3d5361b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/importer/parser/ynab4/parse.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,9 @@ func fixOverspendHandling(resources *types.ParsedResources) {
458458
monthConfigs = append(monthConfigs, types.MonthConfig{
459459
Model: models.MonthConfig{
460460
Month: checkMonth,
461+
MonthConfigCreate: models.MonthConfigCreate{
462+
OverspendMode: models.AffectEnvelope,
463+
},
461464
},
462465
Category: mConfig.Category,
463466
Envelope: mConfig.Envelope,

0 commit comments

Comments
 (0)