Skip to content

Commit a19c522

Browse files
committed
fix: Change tran_date to date vice posted.
Date (from Quicken) will always be filled out, and equal to the Posted date if it has not been edited. In any case, it appears the Date field contains the most accurate date.
1 parent 9503740 commit a19c522

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/move2gnucash/data_preparation.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ def prepared_transactions(root: str, raw_data: pd.DataFrame) -> pd.DataFrame:
189189
A string reflecting the root account, (typically "Income" or "Expenses"), must be provided due
190190
to limitations with Quicken's export file.
191191
"""
192-
# TODO pick tran_date based on equality of posted vs date.
193-
# Prefer posted unless date exists and is not equal to posted.
194192

195193
config = configparser.ConfigParser()
196194
config.read("src/move2gnucash/field_mappings.ini")
@@ -211,6 +209,6 @@ def prepared_transactions(root: str, raw_data: pd.DataFrame) -> pd.DataFrame:
211209
prepared_data.transfer == "", prepared_data.path_and_name, prepared_data.transfer
212210
)
213211

214-
prepared_data["tran_date"] = prepared_data["posted"]
212+
prepared_data["tran_date"] = prepared_data["date"]
215213

216214
return prepared_data

0 commit comments

Comments
 (0)