Commit 8e029b72 by Amelin Konstantin

Fix CommodityOptionTemplate. optionType - required

parent e9f23bde
......@@ -12,8 +12,8 @@ class CommodityOptionTemplate(source: Node) extends TradeTemplate(source) {
<fpml:buyerPartyReference href={ parties(get(source \\ "trade" \ "commodityOption" \ "buyerPartyReference", "href").mkString)._1 }/>
<fpml:sellerPartyReference href={ parties(get(source \\ "trade" \ "commodityOption" \ "sellerPartyReference", "href").mkString)._1 }/>
{ /* Should be filled. optionType isn`t present in source!!!*/ }
{ /* { <fpml:optionType>{ get(source \\ "trade" \ "commodityOption" \ "optionType") }</fpml:optionType> } */ }
<fpml:optionType>{ if (get(source \\ "trade" \ "commodityOption" \ "buyerPartyReference", "href").mkString == "Party1") "Call" else "Put" }</fpml:optionType>
<fpml:optionType>{ get(source \\ "trade" \ "commodityOption" \ "optionType") }</fpml:optionType> }
{/* <fpml:optionType>{ if (get(source \\ "trade" \ "commodityOption" \ "buyerPartyReference", "href").mkString == "Party1") "Call" else "Put" }</fpml:optionType> */ }
<fpml:commodity id={ get(source \\ "trade" \ "commodityOption" \ "commodity", "id") }>
<fpml:instrumentId instrumentIdScheme={ get(source \\ "trade" \ "commodityOption" \ "commodity" \ "instrumentId", "instrumentIdScheme") }>{ get(source \\ "trade" \ "commodityOption" \ "commodity" \ "instrumentId") }</fpml:instrumentId>
<fpml:unit>{ get(source \\ "trade" \ "commodityOption" \ "commodity" \ "unit") }</fpml:unit>
......
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