diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master index a42b0456..21ac8387 100644 --- a/Site5/Master-v5.master +++ b/Site5/Master-v5.master @@ -10,8 +10,7 @@ - - + diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx b/Site5/Pages/v5/Ledgers/AccountPlan.aspx index 66b53441..59a18eb3 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx @@ -72,18 +72,29 @@ window.scrollTo(0, 0); $('body').css('overflow-y', 'hidden'); $('#divModalCover').fadeIn(); - - $.ajax({ + + if (!checkboxesInitialized) { + // This is a weird construct, but comes from the switchbuttons needing to be visible when initialized + setTimeout(function() { + $('.EditCheck').switchbutton({ + checkedLabel: '<%=Resources.Global.Global_On.ToUpperInvariant() %>', + uncheckedLabel: '<%=Resources.Global.Global_Off.ToUpperInvariant() %>' + }); + }, 1); + checkboxesInitialized = true; + } + + $.ajax({ type: "POST", url: "AccountPlan.aspx/GetAccountData", data: "{'accountId': '" + escape(accountId) + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { - /* - $('#CheckAccountActive').switchButton( {checked: msg.d.Open }); - $('#CheckAccountExpensable').switchButton( {checked: msg.d.Expensable }); - $('#CheckAccountAdministrative').switchButton( {checked: msg.d.Administrative });*/ + + $("#CheckAccountActive").prop("checked", msg.d.Open).change(); + $("#CheckAccountExpensable").prop("checked", msg.d.Expensable).change(); + $("#CheckAccountAdministrative").prop("checked", msg.d.Administrative).change(); modalAccountName = msg.d.AccountName; $('#TextAccountName').val(msg.d.AccountName); @@ -91,6 +102,7 @@ modalAccountBudget = msg.d.Budget; $('#TextAccountBudget').val(msg.d.Budget); + $('#SpanTextCurrency').text(msg.d.CurrencyCode); $('#SpanEditBalance').text(msg.d.Balance); //var parentAccountNode = accountTree.tree('find', msg.d.ParentAccountId); @@ -207,12 +219,6 @@ }); }); - $('.EditCheck').switchbutton( - /*{ - checkedLabel: "<% =Resources.Global.Global_On.ToUpperInvariant() %>", - uncheckedLabel: "<% =Resources.Global.Global_Off.ToUpperInvariant() %>" - }*/); - }); function modalShow() { @@ -256,7 +262,7 @@ var accountType = ''; var accountDirty = false; - + var checkboxesInitialized = false; @@ -308,9 +314,9 @@
 
 
 
-
-
-
+

+

+

 
 
 
@@ -319,11 +325,11 @@ Parent account or group

Daily operations

Owner
- Budget (balance is [ยค] foo)
-

Switches

- Active
- Expensable
- Administrative
+ Budget (balance is foo bar)
+

Configuration

+ Is this account open for transactions?
+ Can people use this account for expense reports?
+ Are transactions here excluded from 2-D reports?

Automation

File upload profile
Upload parameter, if any
diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs index a9772b54..67ec3d85 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs @@ -70,6 +70,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers { result.Balance = (-accountTree.GetDeltaCents(new DateTime(year, 1, 1), new DateTime(year + 1, 1, 1)) / 100L).ToString("N0"); } + result.CurrencyCode = account.Organization.Currency.Code; return result; } @@ -223,6 +224,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers public string Budget; public string AccountOwnerAvatarUrl; public string Balance; + public string CurrencyCode; } }