aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn')
-rw-r--r--python/Dawn/models.py4
-rw-r--r--python/Dawn/static/dawn.js3
-rw-r--r--python/Dawn/templates/spot_blotter.html35
3 files changed, 40 insertions, 2 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py
index 2c4acb27..28d57990 100644
--- a/python/Dawn/models.py
+++ b/python/Dawn/models.py
@@ -326,8 +326,8 @@ class SpotDeal(db.Model):
buy_amount = db.Column(db.Float, nullable=False)
sell_currency = db.Column(CCY, nullable=False)
sell_amount = db.Column(db.Float, nullable=False)
- commission_currency = db.Column(CCY, nullable=False)
- commission = db.Column(db.Float, nullable=False)
+ commission_currency = db.Column(CCY)
+ commission = db.Column(db.Float)
counterparty = db.relationship(Counterparties)
class CapFloorDeal(db.Model):
diff --git a/python/Dawn/static/dawn.js b/python/Dawn/static/dawn.js
index 143947c8..cfcee999 100644
--- a/python/Dawn/static/dawn.js
+++ b/python/Dawn/static/dawn.js
@@ -105,4 +105,7 @@ $(function() {
$('#upfront').attr('data-toggle', 'tooltip');
$('#upfront').attr('title', 'This is Cash Amount on the bloomberg ticket, i.e. the net amount we receive.');
$('#upfront').tooltip();
+ $('#spot_rate').attr('data-toggle', 'tooltip');
+ $('#spot_rate').attr('title', 'Spot rate must be entered with pairs ordered by dominance. EUR > GBP > USD > CAD > CHF > YEN');
+ $('#spot_rate').tooltip();
});
diff --git a/python/Dawn/templates/spot_blotter.html b/python/Dawn/templates/spot_blotter.html
new file mode 100644
index 00000000..fbbd2545
--- /dev/null
+++ b/python/Dawn/templates/spot_blotter.html
@@ -0,0 +1,35 @@
+{% extends "base.html" %}
+{% block content %}
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <td>Deal ID</td>
+ <td>Trade Date</td>
+ <td>Settle Date</td>
+ <td>Strategy</td>
+ <td>Spot Rate</td>
+ <td>Buy CCY</td>
+ <td>Buy Amount</td>
+ <td>Sell CCY</td>
+ <td>Sell Amount</td>
+ <td>Commission CCY</td>
+ <td>Commission Amount</td>
+ </tr>
+ </thead>
+ {% for trade in trades %}
+ <tr>
+ <td><a href="{{url_for('trade_manage', tradeid=trade.id, kind='spot')}}">{{trade.dealid}}</a></td>
+ <td>{{trade.trade_date}}</td>
+ <td>{{trade.settlement_date}}</td>
+ <td>{{trade.folder}}</td>
+ <td>{{trade.spot_rate}}</td>
+ <td>{{trade.buy_currency}}</td>
+ <td>{{trade.buy_amount}}</td>
+ <td>{{trade.sell_currency}}</td>
+ <td>{{trade.sell_amount}}</td>
+ <td>{{trade.commission_currency}}</td>
+ <td>{{trade.commission}}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endblock %}