aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/cash.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/cash.py')
-rw-r--r--python/report_ops/cash.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/report_ops/cash.py b/python/report_ops/cash.py
index 30795850..641ba8aa 100644
--- a/python/report_ops/cash.py
+++ b/python/report_ops/cash.py
@@ -55,12 +55,12 @@ def get_custodian_account(fund, iam_broker):
@dataclass
class IAMDeal(Deal, deal_type=DealType.IAM, table_name="iams"):
- trade_date: datetime.date = field(metadata={"globeop": "SettlementDate"})
+ trade_date: datetime.date = field(metadata={"globeop": "Trade Date"})
folder: str = field(metadata={"globeop": "Folder"})
broker: str
start_money: float = field(metadata={"globeop": "StartMoney"})
currency: str = field(metadata={"globeop": "Currency"})
- fund: Fund
+ fund: Fund = field(metadata={"globeop": "Fund"})
maturity: datetime.date = None
uploaded: bool = False
is_offset: bool = False
@@ -83,11 +83,12 @@ class IAMDeal(Deal, deal_type=DealType.IAM, table_name="iams"):
obj["Deal Type"] = "IamDeal"
obj["ExpirationDate"] = self.trade_date if action == "UPDATE" else None
obj["CallNoticeIndicator"] = "24H" if action == "NEW" else None
- obj["TransactionIndicator"] = ("DEPOSIT" if obj["StartMoney"] > 0 else "LOAN",)
+ obj["TransactionIndicator"] = "DEPOSIT" if obj["StartMoney"] > 0 else "LOAN"
obj["StartMoney"] = abs(obj["StartMoney"])
obj["DealFunction"] = "OTC"
obj["MarginType"] = "Variation"
obj["Basis"] = "ACT/360"
+ obj["SettlementDate"] = self.trade_date
(custodian, cash_account) = get_custodian_account(self.fund, self.broker)
obj = obj | {
"Custodian": custodian,