diff --git a/Logic/Financial/FinancialAccount.cs b/Logic/Financial/FinancialAccount.cs index 6627331b..52d77dde 100644 --- a/Logic/Financial/FinancialAccount.cs +++ b/Logic/Financial/FinancialAccount.cs @@ -160,7 +160,7 @@ namespace Swarmops.Logic.Financial try { int yearClosed = this.Organization.Parameters.FiscalBooksClosedUntilYear; - if (this.OpenedYear >= yearClosed) + if (yearClosed > 0 && this.OpenedYear <= yearClosed) { throw new InvalidOperationException("Can't reparent an account with transactions in closedledger space"); } @@ -223,7 +223,7 @@ namespace Swarmops.Logic.Financial try { int yearClosed = this.Organization.Parameters.FiscalBooksClosedUntilYear; - if (this.OpenedYear >= yearClosed) + if (yearClosed > 0 && this.OpenedYear <= yearClosed) { throw new InvalidOperationException("Can't rename an account with transactions in closedledger space"); } diff --git a/Site5/App_Code/CommonV5Base.cs b/Site5/App_Code/CommonV5Base.cs new file mode 100644 index 00000000..887719b8 --- /dev/null +++ b/Site5/App_Code/CommonV5Base.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +/// +/// Summary description for CommonV5Base +/// +public class CommonV5Base +{ + public CommonV5Base() + { + // + // TODO: Add constructor logic here + // + } +} \ No newline at end of file diff --git a/Site5/App_GlobalResources/Pages.Ledgers.resx b/Site5/App_GlobalResources/Pages.Ledgers.resx index 1bf19b9e..24341948 100644 --- a/Site5/App_GlobalResources/Pages.Ledgers.resx +++ b/Site5/App_GlobalResources/Pages.Ledgers.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Create new root account @@ -428,4 +428,77 @@ List Unsettled Accounts + + Account name + + + Is this account open for transactions? + + + Active + + + Are transactions here excluded from 2-D reports? + + + Admin + + + Budget (balance is <span id="SpanTextCurrency">foo</span> <span id="SpanEditBalance">bar</span>) + foo, bar replaced on load with actual values + + + Can people use this account for expense reports? + + + Expensable + + + File upload profile + + + Editing Account + + + Automation + Automatic connections to bank, blockchain etc. + + + Configuration + + + Daily Operations + + + Initial Value + For asset and liability accounts - the value going into Swarmops first ledger year + + + Owner + + + Parent account or group + + + This is an Expenses account. Such accounts normally have a budget in the negative, since they drain assets from the organization. Your proposed budget was changed to negative. + Displayed as a message box + + + Account + + + Balance + + + Budget + + + Edit + + + Flags + + + Owner + \ No newline at end of file diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx b/Site5/Pages/v5/Ledgers/AccountPlan.aspx index 96b9b097..3c32a618 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx @@ -104,6 +104,22 @@ $(this).parent().css('box-shadow', '0 0 1px 0 #FFFFC0'); var callParameters = "{'accountId': '" + escape(accountId) + "', 'switchName':'" + $(this).attr("rel") + "','switchValue':'" + $(this).prop('checked') + "'}"; + // If changing Active, set Expensable.Enabled to Active.Checked. If false, set Expensable.Checked to false, too + + if ($(this).attr("rel") == "Active") { + if (!$(this).prop('checked')) { + $("#CheckAccountExpensable").prop("checked", false).change(); + } + } + + // If changing Expensable to true, make sure that Active is true, too + + if ($(this).attr("rel") == "Expensable") { + if ($(this).prop('checked')) { + $("#CheckAccountActive").prop("checked", true).change(); + } + } + $.ajax({ type: "POST", url: "AccountPlan.aspx/SetAccountSwitch", @@ -258,7 +274,7 @@ } if (accountType == 'C' && newAccountBudget[0] != '-') { - alertify.alert("This is an Expenses account. Such accounts normally have a budget in the negative, since they drain assets from the organization. Your proposed budget was changed to negative."); + alertify.alert(''); newAccountBudget = "-" + newAccountBudget; } @@ -426,12 +442,12 @@ idField="id" treeField="accountName"> - Account Name - Owner - Balance - Budget - Flags - Edit + + + + + + @@ -440,32 +456,32 @@