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 ...@@ -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:mandatorilyClearable>{ if (get(source \\ "trade" \ "nsdSpecificTradeFields" \ "cleared").mkString.contains("Y")) "true" else msgNotFound }</fpml:mandatorilyClearable>
</fpml:reportingRegime> </fpml:reportingRegime>
</fpml:partyTradeInformation> </fpml:partyTradeInformation>
{ for (s <- source \\ "trade" \ "nsdSpecificTradeFields" \ "clientDetails") yield { { /* Uses dictionary from PartyTemplate for identifier */
for (p <- parties.filterKeys(_.startsWith("Party"))) yield
<fpml:partyTradeInformation> <fpml:partyTradeInformation>
{ /* Uses dictionary from PartyTemplate for identifier */ } <fpml:partyReference href={ p._2._1 } />
<fpml:partyReference href={ parties(get(s \ "servicingParty", "href").mkString)._1 } /> { for { s <- source \\ "trade" \ "nsdSpecificTradeFields" \ "clientDetails"
{ val id = get(s \ "id").mkString if parties(get(s \ "servicingParty", "href").mkString)._1 == p._2._1
if (id != msgNotFound) id = get(s \ "id").mkString
if id != msgNotFound } yield {
<fpml:relatedParty> <fpml:relatedParty>
<fpml:partyReference href={ parties(id)._1 } /> <fpml:partyReference href={ parties(id)._1 } />
<fpml:role>{ "Client" }</fpml:role> <fpml:role>{ "Client" }</fpml:role>
<fpml:type>{ get(s \ "type") }</fpml:type> <fpml:type>{ get(s \ "type") }</fpml:type>
</fpml:relatedParty> </fpml:relatedParty>
} }
}
<fpml:timestamps> <fpml:timestamps>
<fpml:timestamp> <fpml:timestamp>
<fpml:type>{ if (get(source \\ "trade" \ "nsdSpecificTradeFields" \ "clearedDate").mkString != msgNotFound) "InClearingPool" else msgNotFound}</fpml:type> <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 ...@@ -93,7 +96,6 @@ abstract class TradeTemplate(source: Node) extends RegiAmendTradeTemplate(source
<fpml:collateralPortfolio>{ get(source \\ "trade" \ "collateral" \ "collateralForm") }</fpml:collateralPortfolio> <fpml:collateralPortfolio>{ get(source \\ "trade" \ "collateral" \ "collateralForm") }</fpml:collateralPortfolio>
</fpml:partyTradeInformation> </fpml:partyTradeInformation>
} }
}
</fpml:tradeHeader> </fpml:tradeHeader>
{ templateTradeBody } { templateTradeBody }
<fpml:documentation> <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