From 5d5d88e909a849e093ddbc576ce79fc96e13c46f Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Tue, 12 Jul 2016 14:24:11 +0100 Subject: [PATCH] Payers now swap correctly. --- src/main/webdemo/js/controllers/CreateDeal.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/webdemo/js/controllers/CreateDeal.js b/src/main/webdemo/js/controllers/CreateDeal.js index 73bbd7f7b0..4a57df8dc5 100644 --- a/src/main/webdemo/js/controllers/CreateDeal.js +++ b/src/main/webdemo/js/controllers/CreateDeal.js @@ -22,6 +22,13 @@ define([ let first = $('#irscolumns .eight:eq( 0 )'); let last = $('#irscolumns .eight:eq( 1 )'); first.before(last); + + let swapPayers = () => { + let tmp = $scope.deal.floatingLeg.floatingRatePayer; + $scope.deal.floatingLeg.floatingRatePayer = $scope.deal.fixedLeg.fixedRatePayer; + $scope.deal.fixedLeg.fixedRatePayer = tmp; + }; + $scope.$apply(swapPayers); }); }); }); \ No newline at end of file