From 10b3a28fcb1e6e2f384349827eb7016168cbc5ce Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 18 Feb 2026 16:34:03 -0500 Subject: [PATCH] Allow for 3 decimal places in PurchasePrice and SellPrice. --- UIUtils/ClosePositionDialog.xaml.cs | 2 +- UIUtils/ClosePositionDialogNoStop.xaml.cs | 2 +- UIUtils/EditPositionDialog.xaml.cs | 2 +- UIUtils/EditPositionDialogNoStop.xaml.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UIUtils/ClosePositionDialog.xaml.cs b/UIUtils/ClosePositionDialog.xaml.cs index 875b7f7..4ee9b80 100644 --- a/UIUtils/ClosePositionDialog.xaml.cs +++ b/UIUtils/ClosePositionDialog.xaml.cs @@ -195,7 +195,7 @@ namespace TradeBlotter.UIUtils private void UpdateSellPrice() { - txtSellPrice.Text=Utility.FormatCurrency(SellPrice); + txtSellPrice.Text=Utility.FormatCurrency(SellPrice,3); } private void UpdateCompanyName() diff --git a/UIUtils/ClosePositionDialogNoStop.xaml.cs b/UIUtils/ClosePositionDialogNoStop.xaml.cs index c1b3f12..51039a0 100644 --- a/UIUtils/ClosePositionDialogNoStop.xaml.cs +++ b/UIUtils/ClosePositionDialogNoStop.xaml.cs @@ -190,7 +190,7 @@ namespace TradeBlotter.UIUtils private void UpdateSellPrice() { - txtSellPrice.Text=Utility.FormatCurrency(SellPrice); + txtSellPrice.Text=Utility.FormatCurrency(SellPrice,3); } private void UpdateCompanyName() diff --git a/UIUtils/EditPositionDialog.xaml.cs b/UIUtils/EditPositionDialog.xaml.cs index b8ac4eb..90bf137 100644 --- a/UIUtils/EditPositionDialog.xaml.cs +++ b/UIUtils/EditPositionDialog.xaml.cs @@ -125,7 +125,7 @@ namespace TradeBlotter.UIUtils } private void UpdatePurchasePrice() { - txtPurchasePrice.Text=Utility.FormatCurrency(PurchasePrice); + txtPurchasePrice.Text=Utility.FormatCurrency(PurchasePrice,3); } // ******************************************************************************************************************************************************************************* // ********************************************************************************** I N I T I A L S T O P R E C O M M E N D A T I O N ************************************** diff --git a/UIUtils/EditPositionDialogNoStop.xaml.cs b/UIUtils/EditPositionDialogNoStop.xaml.cs index 470a50f..be1b446 100644 --- a/UIUtils/EditPositionDialogNoStop.xaml.cs +++ b/UIUtils/EditPositionDialogNoStop.xaml.cs @@ -111,7 +111,7 @@ namespace TradeBlotter.UIUtils } private void UpdatePurchasePrice() { - txtPurchasePrice.Text=Utility.FormatCurrency(PurchasePrice); + txtPurchasePrice.Text=Utility.FormatCurrency(PurchasePrice,3); } // ********************************************************************************************************************************************************************************* private void dpPurchaseDate_SelectionChanged(object sender,RoutedEventArgs e)