Two more dumbfixes

This commit is contained in:
Rick Falkvinge
2017-09-25 19:22:10 +02:00
parent 77db2f1d14
commit 626d0fa85f
2 changed files with 9 additions and 8 deletions
@@ -112,6 +112,7 @@ namespace Swarmops.Frontend.Automation
return new InterpretedCurrencyResult
{
Success = true,
EnteredAmount = amountDouble.ToString("N2"),
CurrencyCode = money.Currency.Code,
DisplayAmount = (money.ToCurrency(authData.CurrentOrganization.Currency).Cents/100.0).ToString("N2")
};
@@ -40,13 +40,13 @@
if (currencyText.trim().indexOf(' ') >= 0) {
// the text contains at least one space, so try to interpret it and convert it to presentation currency
SwarmopsJS.ajaxCall('/Automation/FinancialFunctions.aspx/InterpretCurrency',
jsonData,
function(data) {
if (data.Success) {
alert("PresentationAmount:" + data.DisplayAmount + "\r\nUsed Currency:" + data.CurrencyCode + "\r\nEntered Amount:" + data.EnteredAmount);
}
});
SwarmopsJS.ajaxCall('/Automation/FinancialFunctions.aspx/InterpretCurrency',
jsonData,
function(data) {
if (data.Success) {
alert("PresentationAmount:" + data.DisplayAmount + "\r\nUsed Currency:" + data.CurrencyCode + "\r\nEntered Amount:" + data.EnteredAmount);
}
});
} else {
// the text does NOT contain at least one space, so we should format it for presentation currency
$('#<%=this.ClientID%>_TextInput').blur(function() {
@@ -54,7 +54,7 @@
jsonData,
function(data) {
if (data.Success) {
$('#<%=this.ClientID%>_TextInput').val(data.Result);
$('#<%=this.ClientID%>_TextInput').val(data.NewValue);
}
});
});