diff options
| -rw-r--r-- | python/citco_ops/utils.py | 4 | ||||
| -rw-r--r-- | python/innocap_bond_setts.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/python/citco_ops/utils.py b/python/citco_ops/utils.py index 842427bf..6e70e4dd 100644 --- a/python/citco_ops/utils.py +++ b/python/citco_ops/utils.py @@ -169,8 +169,8 @@ class PaymentSettlement(Payment): return em = ExchangeMessage() em.send_email( - f"Payment Settlements Bond NT: ISOSEL {date}", - "Good morning, \n\nWe have the following amounts settling in the next few days at Northern Trust: (Positive Amounts = Receive, Negative Amounts=Pay)\n\n" + f"Payment Settlements Bond/FX NT: ISOSEL {date}", + "Good morning, \n\nWe have the following amounts settling in the next 4 calendar days at Northern Trust: (Positive Amounts = Receive, Negative Amounts=Pay)\n\n" + "\n".join( settlement.to_email_format() for settlement in cls._insert_queue ), diff --git a/python/innocap_bond_setts.py b/python/innocap_bond_setts.py index 91c60ce2..37101b80 100644 --- a/python/innocap_bond_setts.py +++ b/python/innocap_bond_setts.py @@ -15,9 +15,11 @@ if __name__ == "__main__": ) args = parser.parse_args() conn = dbconn("dawndb") - sql_str = "SELECT settle_date, currency, sum(payment_amount) as payment_amount FROM payment_settlements ps2 WHERE fund=%s AND asset_class in ('bond', 'spot') AND settle_date >= %s group by settle_date, currency;" + sql_str = "SELECT settle_date, currency, sum(payment_amount) as payment_amount FROM payment_settlements ps2 WHERE fund=%s AND asset_class in ('bond', 'spot') AND settle_date between %s and %s group by settle_date, currency;" with conn.cursor() as c: for fund in ("ISOSEL",): - c.execute(sql_str, (fund, args.date)) + c.execute( + sql_str, (fund, args.date, args.date + datetime.timedelta(days=4)) + ) PaymentSettlement.stage_payment(c) PaymentSettlement.email_innocap(args.date) |
