|
228 | 228 | } else { |
229 | 229 | bgColor = alternateRow2 ? "white" : "lightgray"; |
230 | 230 | } |
| 231 | + bool isIBond = investment.Ticker == "IBOND"; |
231 | 232 | <tr style=background-color:@bgColor @onclick='@(e=>chooseInvestment(e,accBuffer,invBuffer))'> |
232 | 233 | <td style=padding-left:8px;height:30px; title=@investment.Name> |
233 | 234 | @(investment.Ticker != null ? investment.Ticker : investment.Name) |
234 | 235 | </td> |
235 | | - <td style=text-align:right;padding-left:8px>@FormatUtilities.formatDoubleTwoDecimal(investment.SharesPIN)</td> |
236 | | - <td style=text-align:right;padding-left:8px>@FormatUtilities.formatMoney(investment.Price)</td> |
| 236 | + @if (isIBond) |
| 237 | + { |
| 238 | + <td style=text-align:center colspan="2">@FormatUtilities.formatMonth(investment.PurchaseDate)</td> |
| 239 | + } else { |
| 240 | + <td style=text-align:right;padding-left:8px>@FormatUtilities.formatDoubleTwoDecimal(investment.SharesPIN)</td> |
| 241 | + <td style=text-align:right;padding-left:8px>@FormatUtilities.formatMoney(investment.Price)</td> |
| 242 | + } |
237 | 243 | <td style=text-align:right;padding-left:8px> |
238 | 244 | @FormatUtilities.formatMoney(investment.ValuePIN, decimalPlaces:0) |
239 | 245 | </td> |
|
363 | 369 | <button @onclick='@(e=>plan(e,account,account.SelectedInvestment))'>Plan</button> <button @onclick='@(e=>commit(e,account,account.SelectedInvestment))'>Commit</button><br/> |
364 | 370 | break; |
365 | 371 | case "Edit": |
366 | | - @((MarkupString)bold("Edit:"))<br/> |
| 372 | + bool isIBond = @account.SelectedInvestment.Ticker?.ToUpperInvariant() == "IBOND"; |
| 373 | + <span>@((MarkupString)bold("Edit:"))</span><br/> |
367 | 374 | <table> |
368 | 375 | <tr> |
369 | | - <td style=padding-left:16px> |
370 | | - <input type=text style=width:70px @bind-Value=account.SelectedInvestment.Ticker @bind-Value:event=oninput placeholder='ticker'/></td> |
371 | | - <label>Quantity: </label> |
372 | | - <td style=text-align:right;padding-left:8px><input type=text style=width:100px;text-align:right @bind-Value=account.SelectedInvestment.SharesPIN @bind-Value:event=onchange placeholder='shares'/></td> |
373 | | - <td></td> |
| 376 | + <td style=text-align:right> |
| 377 | + <label>Ticker: </label> |
| 378 | + </td> |
| 379 | + <td style=padding-left:8px> |
| 380 | + <input type=text style=width:70px @bind-Value=account.SelectedInvestment.Ticker @bind-Value:event=oninput placeholder='ticker'/> |
| 381 | + </td> |
374 | 382 | </tr> |
| 383 | + @if (isIBond) |
| 384 | + { |
| 385 | + <tr> |
| 386 | + <td style=text-align:right> |
| 387 | + <label>Purchase Date: </label> |
| 388 | + </td> |
| 389 | + <td style=padding-left:8px> |
| 390 | + <input type=text style=width:100px @bind-Value=account.SelectedInvestment.PurchaseDate @bind-Value:event=oninput placeholder='m/yyyy'/> |
| 391 | + </td> |
| 392 | + </tr> |
| 393 | + } else { |
| 394 | + <tr> |
| 395 | + <td style=text-align:right> |
| 396 | + <label>Quantity: </label> |
| 397 | + </td> |
| 398 | + <td style=text-align:right;padding-left:8px> |
| 399 | + <input type=text style=width:100px;text-align:right @bind-Value=account.SelectedInvestment.SharesPIN @bind-Value:event=onchange placeholder='shares'/></td> |
| 400 | + <td></td> |
| 401 | + </tr> |
| 402 | + <tr> |
| 403 | + <td style=text-align:right> |
| 404 | + <label>Price: </label> |
| 405 | + </td> |
| 406 | + <td style=text-align:left;padding-left:8px colspan=2> |
| 407 | + $<input type=text style=width:80px;text-align:right @bind-Value=account.SelectedInvestment.Price @bind-Value:event=onchange placeholder='price'/> |
| 408 | + </td> |
| 409 | + </tr> |
| 410 | + } |
375 | 411 | <tr> |
376 | | - <td style=text-align:right;padding-left:8px colspan=2> |
377 | | - <label>Price: </label> |
378 | | - $<input type=text style=width:80px;text-align:right @bind-Value=account.SelectedInvestment.Price @bind-Value:event=onchange placeholder='price'/></td> |
379 | | - <td style=text-align:right;padding-left:8px colspan=2> |
| 412 | + <td style=text-align:right> |
380 | 413 | <label>Balance: </label> |
| 414 | + </td> |
| 415 | + <td style=padding-left:8px colspan=2> |
381 | 416 | $<input type=text style=width:100px;text-align:right @bind-Value=account.SelectedInvestment.ValuePIN @bind-Value:event=onchange placeholder='value'/> |
382 | 417 | </td> |
383 | 418 | </tr> |
384 | 419 | <tr> |
385 | | - <td style=text-align:right;padding-left:8px colspan=3> |
| 420 | + <td style=text-align:right> |
386 | 421 | <label>Cost Basis: </label> |
| 422 | + </td> |
| 423 | + <td style=padding-left:8px colspan=3> |
387 | 424 | $<input type=text style=width:100px;text-align:right @bind-Value=account.SelectedInvestment.CostBasis @bind-Value:event=oninput placeholder='cost basis'/> |
388 | 425 | </td> |
389 | 426 | <td></td> |
|
0 commit comments