aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/bowdst.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/bowdst.py b/python/bowdst.py
index 1f14f309..0b46cd24 100644
--- a/python/bowdst.py
+++ b/python/bowdst.py
@@ -227,11 +227,13 @@ def load_cash_report(workdate: datetime.date):
/ f"Settled Cash Statement_{workdate:%d %b %Y}.csv"
)
df = pd.read_csv(p, thousands=",")
- df = df[df["Transaction Type"].isna()]
+ df = df[
+ df["Transaction Type"].isna() | df["Transaction Type"].isin(["BUY", "SELL"])
+ ]
df = df.groupby(["Account Name", "Account Number", "Local Currency Code"]).sum()
df["date"] = workdate
df["fund"] = "BOWDST"
- df = df[["Closing Balance Local", "date", "fund"]]
+ df = df[["Opening Balance Local", "date", "fund"]]
df.reset_index(inplace=True)
df["Account Number"] = df["Account Number"].astype(
"int64"
@@ -241,7 +243,7 @@ def load_cash_report(workdate: datetime.date):
"Account Name": "account_name",
"Account Number": "account_number",
"Local Currency Code": "currency_code",
- "Closing Balance Local": "balance",
+ "Opening Balance Local": "balance",
},
axis=1,
)