Commit 51cbf3d6 by Amelin Konstantin

Fix TradeTemplate. partyTradeInformation -> Clients (one to many)

parent c5d4c356
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment