diff --git a/Site5/Controls/v5/Financial/CurrencyTextBox.ascx.cs b/Site5/Controls/v5/Financial/CurrencyTextBox.ascx.cs index e507e18b..22afdfe3 100644 --- a/Site5/Controls/v5/Financial/CurrencyTextBox.ascx.cs +++ b/Site5/Controls/v5/Financial/CurrencyTextBox.ascx.cs @@ -23,11 +23,11 @@ namespace Swarmops.Frontend.Controls.v5.Financial double outParse = 0.0; string contents = Input.Text; - if (Double.TryParse (contents, NumberStyles.Currency, CultureInfo.CurrentCulture, out outParse)) + if (Double.TryParse (contents, NumberStyles.AllowThousands | NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture, out outParse)) { return outParse; } - if (Double.TryParse (contents, NumberStyles.Currency, CultureInfo.InvariantCulture, out outParse)) + if (Double.TryParse(contents, NumberStyles.AllowThousands | NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out outParse)) { return outParse; } diff --git a/Site5/Pages/v5/Financial/RequestCashAdvance.aspx.cs b/Site5/Pages/v5/Financial/RequestCashAdvance.aspx.cs index 88232c01..f43d6161 100644 --- a/Site5/Pages/v5/Financial/RequestCashAdvance.aspx.cs +++ b/Site5/Pages/v5/Financial/RequestCashAdvance.aspx.cs @@ -62,6 +62,10 @@ namespace Swarmops.Frontend.Pages.v5.Financial { // The data has been validated client-side already. We'll throw unfriendly exceptions if invalid data is passed here. + // MONO BUG: Need to re-set the current culture for parsing to work properly. + + AuthenticationData authData = CommonV5.GetAuthenticationDataAndCulture (HttpContext.Current); + double amount = this.TextAmount.Value; Int64 amountCents = (Int64) amount*100;