diff options
Diffstat (limited to 'python/report_ops')
| -rw-r--r-- | python/report_ops/cash.py | 9 | ||||
| -rw-r--r-- | python/report_ops/custodians.py | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/python/report_ops/cash.py b/python/report_ops/cash.py index 79e4a8b0..1860959b 100644 --- a/python/report_ops/cash.py +++ b/python/report_ops/cash.py @@ -4,7 +4,7 @@ import pandas as pd from serenitas.utils.db import dbconn from typing import ClassVar from .misc import get_dir, dt_from_fname -from .custodians import NT, UMB, BNY +from .custodians import NT, UMB, BNY, SCOTIA from functools import partial from dataclasses import dataclass @@ -123,3 +123,10 @@ class BowdstBNYCashReport( self.stage_from_row(row) self.commit() self._staging_queue.clear() + + +class SeleneScotiaCashReport( + CashReport, SCOTIA, fund="ISOSEL", custodian="SCOTIA", dtkey="%Y%m%d%H%M%S" +): + def to_db(self): + p = self.download_reports() diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py index 7c28bcf7..2c985225 100644 --- a/python/report_ops/custodians.py +++ b/python/report_ops/custodians.py @@ -3,6 +3,7 @@ from serenitas.utils.env import DAILY_DIR import warnings import datetime from .misc import get_dir, _recipients, _cc_recipients +from .scotia import download_scotia_report import gpg from serenitas.ops.trade_dataclasses import BondDeal from serenitas.ops.funds import Service @@ -194,3 +195,9 @@ class BNY(Custodian, account="BONY2"): p.parent.mkdir(parents=True, exist_ok=True) if not p.exists(): p.write_bytes(attach.content) + + +class SCOTIA(Custodian, account="SCOTIA"): + @staticmethod + def download_reports(date=datetime.date.today()): + download_scotia_report() |
