diff options
Diffstat (limited to 'python/citco_ops')
| -rw-r--r-- | python/citco_ops/cash.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/python/citco_ops/cash.py b/python/citco_ops/cash.py index 29f73fee..092dbb7d 100644 --- a/python/citco_ops/cash.py +++ b/python/citco_ops/cash.py @@ -8,7 +8,7 @@ import pandas as pd from serenitas.utils.db import dbconn, dawn_engine from typing import ClassVar from .misc import get_dir, dt_from_fname -from .custodians import NT +from .custodians import NT, UMB @dataclass @@ -104,23 +104,7 @@ class NTCashReport(CashReport, NT, fund="ISOSEL", account_number="ISOS01"): ) -class UmbCashReport(CashReport, fund="SERCGMAST", account_number="159260.1"): - @classmethod - def download_reports(cls, date=datetime.date.today()): - em = ExchangeMessage() - for msg in em.get_msgs(count=20, path=["NYops", "Powerstation"]): - for attach in msg.attachments: - timestamp = attach.last_modified_time - if ( - attach.name.startswith("cash_reporting") - and timestamp.date() == date - ): - dest = get_dir(timestamp.date(), archived=False) - dest.mkdir(exist_ok=True, parents=True) - p = dest / f"umb_{timestamp:%Y%m%d%H%M}.xlsx" - if not p.exists(): - p.write_bytes(attach.content) - +class UMBCashReport(CashReport, UMB, fund="SERCGMAST", account_number="159260.1"): def to_db(self): p = super().to_db("umb_") df = pd.read_excel(p, skiprows=3) |
