Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SPB_Exchange_Repo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Amelin Konstantin
SPB_Exchange_Repo
Commits
51cbf3d6
Commit
51cbf3d6
authored
Feb 22, 2020
by
Amelin Konstantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TradeTemplate. partyTradeInformation -> Clients (one to many)
parent
c5d4c356
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/main/scala/templates/TradeTemplate.scala
+8
-6
No files found.
src/main/scala/templates/TradeTemplate.scala
View file @
51cbf3d6
...
...
@@ -41,18 +41,21 @@ abstract class TradeTemplate(source: Node) extends RegiAmendTradeTemplate(source
<fpml:mandatorilyClearable>
{
if
(
get
(
source
\\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
cleared
"
)
.mkString.contains
(
"
Y
"
))
"
true
"
else
msgNotFound
}
</fpml:mandatorilyClearable>
</fpml:reportingRegime>
</fpml:partyTradeInformation>
{
for
(
s
<-
source
\\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
clientDetails
"
)
yield
{
{
/*
Uses
dictionary
from
PartyTemplate
for
identifier
*/
for
(
p
<-
parties.filterKeys
(
_
.startsWith
(
"
Party
"
)))
yield
<fpml:partyTradeInformation>
{
/*
Uses
dictionary
from
PartyTemplate
for
identifier
*/
}
<fpml:partyReference
href
={
parties
(
get
(
s
\
"
servicingParty
"
,
"
href
"
)
.mkString
)
.
_
1
}
/>
{
val
id
=
get
(
s
\
"
id
"
)
.mkString
if
(
id
!=
msgNotFound
)
<fpml:partyReference
href
={
p
.
_2
.
_1
}
/>
{
for
{
s
<-
source
\\
"trade"
\
"nsdSpecificTradeFields"
\
"clientDetails"
if
parties
(
get
(
s
\
"servicingParty"
,
"href"
).
mkString
).
_1
==
p
.
_2
.
_1
id
=
get
(
s
\
"id"
).
mkString
if
id
!=
msgNotFound
}
yield
{
<
fpml
:
relatedParty>
<fpml:partyReference
href
={
parties
(
id
).
_1
}
/>
<
fpml
:
role>
{
"
Client
"
}
</fpml:role>
<fpml:
type
>
{
get
(
s
\
"
type
"
)
}
</fpml:
type
>
</fpml:relatedParty>
}
}
<
fpml
:
timestamps>
<fpml:timestamp>
<fpml:
type
>
{
if
(
get
(
source
\\
"
trade
"
\
"
nsdSpecificTradeFields
"
\
"
clearedDate
"
)
.mkString
!=
msgNotFound
)
"
InClearingPool
"
else
msgNotFound
}
</fpml:
type
>
...
...
@@ -93,7 +96,6 @@ abstract class TradeTemplate(source: Node) extends RegiAmendTradeTemplate(source
<fpml:collateralPortfolio>
{
get
(
source
\\
"
trade
"
\
"
collateral
"
\
"
collateralForm
"
)
}
</fpml:collateralPortfolio>
</fpml:partyTradeInformation>
}
}
</
fpml
:
tradeHeader>
{
templateTradeBody
}
<fpml:documentation>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment