<% # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. %>
<% # Checking whether there is new status change happened in the # related to a particular order. if (@closedOrders != nil) %>

Trade Alert: The following orders have completed.

<% index = 0 if(@closedOrders["OrderDataBean"].class.to_s == "Array") while ((order = @closedOrders["OrderDataBean"][index]) != nil) openDate = convert_date(order["openDate"]) completionDate = convert_date(order["completionDate"]) %> <% index = index + 1 end else order = @closedOrders["OrderDataBean"] openDate = convert_date(order["openDate"]) completionDate = convert_date(order["completionDate"]) %> <% end %>
Order IDOrder Status Creation DateCompletion Date Txn FeeTypeSymbol Quantity
<%=order["orderID"]%> <%=order["orderStatus"]%> <%=openDate%> <%=completionDate%> $<%=order["orderFee"]%> <%=order["orderType"]%> <%=order["symbol"]%> <%=order["quantity"]%>
<%=order["orderID"]%> <%=order["orderStatus"]%> <%=openDate%> <%=completionDate%> $<%=order["orderFee"]%> <%=order["orderType"]%> <%=order["symbol"]%> <%=order["quantity"]%>


<% end %> <% # Display the account summary information of a particular user. if (@accountSummary != nil) %>

Account Information

Subtotal BuysSubtotal SellsSubtotal Fees Net Impact Cash Balance
<%=@accountSummary["totalBuys"] %> <%=@accountSummary["totalSells"] %> <%=@accountSummary["totalTax"] %> <% if (@accountSummary["totalImpact"].to_i > 0) %> <%=@accountSummary["totalImpact"]%> <% elsif (@accountSummary["totalImpact"].to_i < 0) %> <%=@accountSummary["totalImpact"]%> <% else %> <%=@accountSummary["totalImpact"]%> <% end %>
<% end %> <% # Display the orders a particular user is associated with if (@ordersReturn != nil) %>

Total Orders Shown

<% index = 0 if(@ordersReturn["OrderDataBean"].class.to_s == "Array") while((order = @ordersReturn["OrderDataBean"][index]) != nil) openDate = convert_date(order["openDate"]) completionDate = convert_date(order["completionDate"]) %> <% index = index +1 end else order = @ordersReturn["OrderDataBean"] openDate = converte_date(order["openDate"]) completionDate = convert_date(order["completionDate"]) %> <% end %>
Order IDOrder StatusCreation DateCompletion Date Txn FeeTypeSymbolQuantityPrice Total
<%=order["orderID"]%> <%=order["orderStatus"]%> <%=openDate%> <%=completionDate%> <%=order["orderFee"]%> <%=order["orderType"]%>
"/> "/>
<%=order["quantity"]%> $<%=order["price"]%> $<%="%.2f" % ((order["price"].to_f * order["quantity"].to_i) + order["orderFee"].to_f)%>
<%=order["orderID"]%> <%=order["orderStatus"]%> <%=openDate%> <%=completionDate%> <%=order["orderFee"]%> <%=order["orderType"]%>
"/> "/>
<%=order["quantity"]%> <%=order["price"]%> <%="%.2f" % ((order["price"].to_f * order["quantity"].to_i) + order["orderFee"].to_f)%>
<% end %> <% # Display the account profile information associted to a # the user. if (@userAccountProfileDataReturn) %>
Update Account Profile:<%=@userId%>
Full Name:" id="" size="25"/> Email Address:" id="" size="25"/>
Address:" id="" size="25"/> Password:" id="" size="25"/>
Credit Card:" id="" size="25"/> Confirm Password:" id="" size="25"/>
<% # Display the account information of a the user if (@userAccountDataReturn) creationDate = convert_date(@userAccountDataReturn["creationDate"]) lastLogin = convert_date(@userAccountDataReturn["lastLogin"]) %> <% if (@userAccountDataReturn["balance"].to_f > 0) %> <% elsif(@userAccountDataReturn["balance"].to_f < 0) %> <% else %> <% end %>
Account ID: <%=@userAccountDataReturn["accountID"]%> Account Created<%=creationDate%>
User ID: <%=@userAccountDataReturn["profileID"]%> Last Login:<%=lastLogin%>
Opening Balance: $<%=@userAccountDataReturn["openBalance"]%> Total Logins: <%=@userAccountDataReturn["loginCount"]%>
Cash Balance:$<%="%.2f" % @userAccountDataReturn["balance"]%>$<%="%.2f" % ((-1) * @userAccountDataReturn["balance"].to_f)%>$<%=@userAccountDataReturn["balance"]%>Total Logouts: <%=@userAccountDataReturn["logoutCount"]%>
<% end %>
<% end %>