mirror of
https://github.com/corda/corda.git
synced 2025-06-11 20:01:46 +00:00
All fields now submit correctly.
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
"use strict"
|
"use strict"
|
||||||
|
|
||||||
define(['utils/dayCountBasisLookup', 'viewmodel/FixedRate'], (dayCountBasisLookup, fixedRateViewModel) => {
|
define(['viewmodel/FixedRate'], (fixedRateViewModel) => {
|
||||||
let calculationModel = {
|
let calculationModel = {
|
||||||
expression: "( fixedLeg.notional.quantity * (fixedLeg.fixedRate.ratioUnit.value)) -(floatingLeg.notional.quantity * (calculation.fixingSchedule.get(context.getDate('currentDate')).rate.ratioUnit.value))",
|
expression: "( fixedLeg.notional.quantity * (fixedLeg.fixedRate.ratioUnit.value)) -(floatingLeg.notional.quantity * (calculation.fixingSchedule.get(context.getDate('currentDate')).rate.ratioUnit.value))",
|
||||||
floatingLegPaymentSchedule: {
|
floatingLegPaymentSchedule: {
|
||||||
@ -29,15 +29,15 @@ define(['utils/dayCountBasisLookup', 'viewmodel/FixedRate'], (dayCountBasisLooku
|
|||||||
fixedLeg.effectiveDate = formatDateForNode(common.effectiveDate);
|
fixedLeg.effectiveDate = formatDateForNode(common.effectiveDate);
|
||||||
fixedLeg.terminationDate = formatDateForNode(common.terminationDate);
|
fixedLeg.terminationDate = formatDateForNode(common.terminationDate);
|
||||||
fixedLeg.fixedRate = { ratioUnit: { value: fixedLeg.fixedRate } };
|
fixedLeg.fixedRate = { ratioUnit: { value: fixedLeg.fixedRate } };
|
||||||
fixedLeg.dayCountBasisDay = dayCountBasisLookup[fixedLeg.dayCountBasis].day;
|
fixedLeg.dayCountBasisDay = fixedLeg.dayCountBasis.day;
|
||||||
fixedLeg.dayCountBasisYear = dayCountBasisLookup[fixedLeg.dayCountBasis].year;
|
fixedLeg.dayCountBasisYear = fixedLeg.dayCountBasis.year;
|
||||||
delete fixedLeg.dayCountBasis;
|
delete fixedLeg.dayCountBasis;
|
||||||
|
|
||||||
floatingLeg.notional.token = common.baseCurrency;
|
floatingLeg.notional.token = common.baseCurrency;
|
||||||
floatingLeg.effectiveDate = formatDateForNode(common.effectiveDate);
|
floatingLeg.effectiveDate = formatDateForNode(common.effectiveDate);
|
||||||
floatingLeg.terminationDate = formatDateForNode(common.terminationDate);
|
floatingLeg.terminationDate = formatDateForNode(common.terminationDate);
|
||||||
floatingLeg.dayCountBasisDay = dayCountBasisLookup[floatingLeg.dayCountBasis].day;
|
floatingLeg.dayCountBasisDay = floatingLeg.dayCountBasis.day;
|
||||||
floatingLeg.dayCountBasisYear = dayCountBasisLookup[floatingLeg.dayCountBasis].year;
|
floatingLeg.dayCountBasisYear = floatingLeg.dayCountBasis.year;
|
||||||
delete floatingLeg.dayCountBasis;
|
delete floatingLeg.dayCountBasis;
|
||||||
|
|
||||||
common.tradeID = tradeId;
|
common.tradeID = tradeId;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define([], () => {
|
define(['utils/dayCountBasisLookup'], (dayCountBasisLookup) => {
|
||||||
return {
|
return {
|
||||||
fixedRatePayer: "Bank A",
|
fixedRatePayer: "Bank A",
|
||||||
notional: {
|
notional: {
|
||||||
@ -10,7 +10,7 @@ define([], () => {
|
|||||||
effectiveDateAdjustment: null,
|
effectiveDateAdjustment: null,
|
||||||
terminationDateAdjustment: null,
|
terminationDateAdjustment: null,
|
||||||
fixedRate: "1.676",
|
fixedRate: "1.676",
|
||||||
dayCountBasis: "30/360",
|
dayCountBasis: dayCountBasisLookup["ACT/360"],
|
||||||
rollConvention: "Following",
|
rollConvention: "Following",
|
||||||
dayInMonth: 10,
|
dayInMonth: 10,
|
||||||
paymentRule: "InArrears",
|
paymentRule: "InArrears",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define([], () => {
|
define(['utils/dayCountBasisLookup'], (dayCountBasisLookup) => {
|
||||||
return {
|
return {
|
||||||
floatingRatePayer: "Bank B",
|
floatingRatePayer: "Bank B",
|
||||||
notional: {
|
notional: {
|
||||||
@ -11,7 +11,7 @@ define([], () => {
|
|||||||
effectiveDateAdjustment: null,
|
effectiveDateAdjustment: null,
|
||||||
terminationDate: new Date(2026, 3, 11),
|
terminationDate: new Date(2026, 3, 11),
|
||||||
terminationDateAdjustment: null,
|
terminationDateAdjustment: null,
|
||||||
dayCountBasis: "30/360",
|
dayCountBasis: dayCountBasisLookup["ACT/360"],
|
||||||
rollConvention: "Following",
|
rollConvention: "Following",
|
||||||
fixingRollConvention: "Following",
|
fixingRollConvention: "Following",
|
||||||
dayInMonth: 10,
|
dayInMonth: 10,
|
||||||
|
@ -109,20 +109,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>Day Count Basis</label>
|
<label>Day Count Basis</label>
|
||||||
<select class="ui selection " ng-model="deal.floatingLeg.dayCountBasis">
|
<select class="ui selection"
|
||||||
<option>1/1</option>
|
ng-model="deal.floatingLeg.dayCountBasis"
|
||||||
<option>30/360</option>
|
ng-options="key for (key, value) in dayCountBasisLookup">
|
||||||
<option>30E/360</option>
|
|
||||||
<option>30E/360 (IDSA)</option>
|
|
||||||
<option>30E+/360 ISDO</option>
|
|
||||||
<option selected="selected">ACT/360</option>
|
|
||||||
<option>ACT/365 Fixed</option>
|
|
||||||
<option>ACT/365 L</option>
|
|
||||||
<option>ACT/365 A/1</option>
|
|
||||||
<option>NL/365</option>
|
|
||||||
<option>ACT/ACT ISDA</option>
|
|
||||||
<option>ACT/ACT ICMA</option>
|
|
||||||
<option>Business/252</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
Reference in New Issue
Block a user