diff --git a/Basic/Basic.csproj b/Basic/Basic.csproj index f3b71c1e..812fb6a3 100644 --- a/Basic/Basic.csproj +++ b/Basic/Basic.csproj @@ -66,7 +66,7 @@ - + @@ -98,10 +98,10 @@ - - - - + + + + diff --git a/Basic/Enums/OrganizationFinancialAccountType.cs b/Basic/Enums/OrganizationFinancialAccountType.cs index 5a244dc6..684c9400 100644 --- a/Basic/Enums/OrganizationFinancialAccountType.cs +++ b/Basic/Enums/OrganizationFinancialAccountType.cs @@ -95,13 +95,5 @@ namespace Swarmops.Basic.Enums /// When closing books, this is the yearly result (balanced against DebtsEquity) /// CostsYearlyResult, // multi-account type - /// - /// Dimension 2 - default income account - /// - IncomeTypeUnspecified, - /// - /// Dimensione 2 - default cost account - /// - CostTypeUnspecified }; } diff --git a/Basic/Types/Financial/BasicFinancialAccount.cs b/Basic/Types/Financial/BasicFinancialAccount.cs index 156b5a18..ef2b356e 100644 --- a/Basic/Types/Financial/BasicFinancialAccount.cs +++ b/Basic/Types/Financial/BasicFinancialAccount.cs @@ -7,7 +7,7 @@ namespace Swarmops.Basic.Types.Financial { public BasicFinancialAccount (int financialAccountId, string name, FinancialAccountType accountType, int organizationId, int parentFinancialAccountId, int ownerPersonId, - int dimension, bool open, int openedYear, int closedYear, bool expensable) + bool open, int openedYear, int closedYear, bool expensable) { this.FinancialAccountId = financialAccountId; this.Name = name; @@ -15,7 +15,6 @@ namespace Swarmops.Basic.Types.Financial this.OrganizationId = organizationId; this.OwnerPersonId = ownerPersonId; this.ParentFinancialAccountId = parentFinancialAccountId; - this.Dimension = dimension; this.Open = open; this.OpenedYear = openedYear; this.ClosedYear = closedYear; @@ -23,7 +22,7 @@ namespace Swarmops.Basic.Types.Financial } public BasicFinancialAccount (BasicFinancialAccount original) : - this(original.Identity, original.Name, original.AccountType, original.OrganizationId, original.ParentFinancialAccountId, original.OwnerPersonId, original.Dimension, original.Open, original.OpenedYear, original.ClosedYear, original.Expensable) + this(original.Identity, original.Name, original.AccountType, original.OrganizationId, original.ParentFinancialAccountId, original.OwnerPersonId, original.Open, original.OpenedYear, original.ClosedYear, original.Expensable) { // Empty copy constructor } @@ -35,7 +34,6 @@ namespace Swarmops.Basic.Types.Financial public FinancialAccountType AccountType { get; private set; } public int OwnerPersonId { get; protected set; } public int ParentFinancialAccountId { get; private set; } - public int Dimension { get; protected set; } public bool Open { get; protected set; } public int OpenedYear { get; protected set; } public int ClosedYear { get; protected set; } diff --git a/Basic/Types/BasicFinancialAccountRow.cs b/Basic/Types/Financial/BasicFinancialAccountRow.cs similarity index 92% rename from Basic/Types/BasicFinancialAccountRow.cs rename to Basic/Types/Financial/BasicFinancialAccountRow.cs index 6ee926df..1acf8a06 100644 --- a/Basic/Types/BasicFinancialAccountRow.cs +++ b/Basic/Types/Financial/BasicFinancialAccountRow.cs @@ -1,8 +1,6 @@ using System; -using System.Collections.Generic; -using System.Text; -namespace Swarmops.Basic.Types +namespace Swarmops.Basic.Types.Financial { public class BasicFinancialAccountRow { diff --git a/Basic/Types/BasicFinancialDependency.cs b/Basic/Types/Financial/BasicFinancialDependency.cs similarity index 84% rename from Basic/Types/BasicFinancialDependency.cs rename to Basic/Types/Financial/BasicFinancialDependency.cs index 93e565ba..da5f3864 100644 --- a/Basic/Types/BasicFinancialDependency.cs +++ b/Basic/Types/Financial/BasicFinancialDependency.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Text; using Swarmops.Basic.Enums; -namespace Swarmops.Basic.Types +namespace Swarmops.Basic.Types.Financial { /// /// This class encapsulates what a financial transaction was constructed from. diff --git a/Basic/Types/BasicFinancialTransaction.cs b/Basic/Types/Financial/BasicFinancialTransaction.cs similarity index 92% rename from Basic/Types/BasicFinancialTransaction.cs rename to Basic/Types/Financial/BasicFinancialTransaction.cs index 23ce5e2e..f764ec48 100644 --- a/Basic/Types/BasicFinancialTransaction.cs +++ b/Basic/Types/Financial/BasicFinancialTransaction.cs @@ -1,9 +1,7 @@ using System; -using System.Collections.Generic; -using System.Text; using Swarmops.Basic.Interfaces; -namespace Swarmops.Basic.Types +namespace Swarmops.Basic.Types.Financial { public class BasicFinancialTransaction : IHasIdentity { diff --git a/Basic/Types/BasicFinancialTransactionRow.cs b/Basic/Types/Financial/BasicFinancialTransactionRow.cs similarity index 92% rename from Basic/Types/BasicFinancialTransactionRow.cs rename to Basic/Types/Financial/BasicFinancialTransactionRow.cs index 57df0e8d..d01eeea4 100644 --- a/Basic/Types/BasicFinancialTransactionRow.cs +++ b/Basic/Types/Financial/BasicFinancialTransactionRow.cs @@ -1,9 +1,7 @@ using System; -using System.Collections.Generic; -using System.Text; using Swarmops.Basic.Interfaces; -namespace Swarmops.Basic.Types +namespace Swarmops.Basic.Types.Financial { public class BasicFinancialTransactionRow : IHasIdentity { diff --git a/Basic/Types/BasicFinancialValidation.cs b/Basic/Types/Financial/BasicFinancialValidation.cs similarity index 91% rename from Basic/Types/BasicFinancialValidation.cs rename to Basic/Types/Financial/BasicFinancialValidation.cs index 5a26e4cf..d5bd4f7d 100644 --- a/Basic/Types/BasicFinancialValidation.cs +++ b/Basic/Types/Financial/BasicFinancialValidation.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Generic; -using System.Text; using Swarmops.Basic.Enums; using Swarmops.Basic.Interfaces; -namespace Swarmops.Basic.Types +namespace Swarmops.Basic.Types.Financial { public class BasicFinancialValidation: IHasIdentity { diff --git a/Database/Database-Documents.cs b/Database/Database-Documents.cs index 0eb275e0..0a1f2cc8 100644 --- a/Database/Database-Documents.cs +++ b/Database/Database-Documents.cs @@ -72,11 +72,12 @@ namespace Swarmops.Database { connection.Open(); - DbCommand command = - GetDbCommand( - "SELECT Documents.DocumentId,Documents.ServerFileName,Documents.ClientFileName,Documents.Description,DocumentTypes.Name AS DocumentType,Documents.ForeignId,Documents.FileSize,Documents.UploadedByPersonId,Documents.UploadedDateTime From Documents,DocumentTypes " + - "WHERE Documents.Description = '" + description.Replace ("'", "''") + "' AND " + - "Documents.UploadedDateTime > '" + DateTime.UtcNow.AddDays(-1).ToString("yyyy-MM-dd HH:mm") + "'", connection); + string sqlQuery = + "SELECT Documents.DocumentId,Documents.ServerFileName,Documents.ClientFileName,Documents.Description,DocumentTypes.Name AS DocumentType,Documents.ForeignId,Documents.FileSize,Documents.UploadedByPersonId,Documents.UploadedDateTime From Documents,DocumentTypes " + + "WHERE Documents.Description = '" + description.Replace ("'", "''") + "' AND " + + "Documents.UploadedDateTime > '" + DateTime.UtcNow.AddDays (-1).ToString ("yyyy-MM-dd HH:mm") + "'"; + + DbCommand command = GetDbCommand(sqlQuery, connection); using (DbDataReader reader = command.ExecuteReader()) { diff --git a/Database/Database-FinancialValidations.cs b/Database/Database-FinancialValidations.cs index c0e5df36..165936cc 100644 --- a/Database/Database-FinancialValidations.cs +++ b/Database/Database-FinancialValidations.cs @@ -5,6 +5,7 @@ using System.Data.Common; using Swarmops.Basic.Enums; using Swarmops.Basic.Interfaces; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; namespace Swarmops.Database diff --git a/Database/Database-Financials.cs b/Database/Database-Financials.cs index 39ab17bf..49063d42 100644 --- a/Database/Database-Financials.cs +++ b/Database/Database-Financials.cs @@ -15,8 +15,7 @@ namespace Swarmops.Database { private const string financialAccountFieldSequence = " FinancialAccountId,Name,OrganizationId,AccountType,ParentFinancialAccountId," + // 0-4 - " OwnerPersonId,Dimension,Open,OpenedYear,ClosedYear, " + // 5-9 - " Expensable " + // 10 + " OwnerPersonId,Open,OpenedYear,ClosedYear,Expensable " + // 5-9 " FROM FinancialAccounts "; public int CreateFinancialAccount(int pOrganizationId, string pName, FinancialAccountType pAccountType, int pParentFinancialAccountId) @@ -38,25 +37,6 @@ namespace Swarmops.Database } - public void SetFinancialAccountDimension(int financialAccountId, int dimension) - { - // This is only intended to be used when creating the account, and never used once in use. - - using (DbConnection connection = GetMySqlDbConnection()) - { - connection.Open(); - - DbCommand command = GetDbCommand("SetFinancialAccountDimension", connection); - command.CommandType = CommandType.StoredProcedure; - - AddParameterWithName(command, "financialAccountId", financialAccountId); - AddParameterWithName(command, "dimension", dimension); - - command.ExecuteNonQuery(); - } - } - - public BasicFinancialAccount GetFinancialAccount(int financialAccountId) { using (DbConnection connection = GetMySqlDbConnection()) @@ -686,7 +666,6 @@ namespace Swarmops.Database } } - private BasicFinancialTransactionRow ReadFinancialTransactionRowFromDataReader(DbDataReader reader) { int rowId = reader.GetInt32(0); @@ -707,13 +686,12 @@ namespace Swarmops.Database var accountType = (FinancialAccountType) reader.GetInt32(3); int parentFinancialAccountId = reader.GetInt32(4); int ownerPersonId = reader.GetInt32(5); - int dimension = reader.GetInt32(6); - bool open = reader.GetBoolean(7); - int openedYear = reader.GetInt32(8); - int closedYear = reader.GetInt32(9); - bool expensable = reader.GetBoolean(10); + bool open = reader.GetBoolean(6); + int openedYear = reader.GetInt32(7); + int closedYear = reader.GetInt32(8); + bool expensable = reader.GetBoolean(9); - return new BasicFinancialAccount(accountId, name, accountType, organizationId, parentFinancialAccountId, ownerPersonId, dimension, open, openedYear, closedYear, expensable); + return new BasicFinancialAccount(accountId, name, accountType, organizationId, parentFinancialAccountId, ownerPersonId, open, openedYear, closedYear, expensable); } private BasicFinancialAccountRow ReadFinancialAccountRowFromDataReader (DbDataReader reader) diff --git a/Database/Database-Payouts.cs b/Database/Database-Payouts.cs index 5723c759..78804844 100644 --- a/Database/Database-Payouts.cs +++ b/Database/Database-Payouts.cs @@ -7,6 +7,7 @@ using System.Text; using Swarmops.Basic.Enums; using Swarmops.Basic.Interfaces; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; namespace Swarmops.Database { diff --git a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs index 5368f9c2..78c48ba5 100644 --- a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs +++ b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs @@ -73,7 +73,7 @@ namespace Swarmops.Logic.App_GlobalResources { } /// - /// Looks up a localized string similar to [OrganizationName] Cash Advance Requested. + /// Looks up a localized string similar to [OrganizationName] Cash Advance Requested: [CurrencyCode] [BudgetAmountFloat]. /// internal static string CashAdvance_Requested_Subject { get { @@ -81,6 +81,26 @@ namespace Swarmops.Logic.App_GlobalResources { } } + /// + /// Looks up a localized string similar to [ConcernedPersonName] has created an expense claim against the budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. The claim concerns [RequestPurpose]. You will need to attest this expense claim. + /// + ///Please log on to Swarmops at [SystemUrl] to attest or deny.. + /// + internal static string ExpenseClaim_Created_Body { + get { + return ResourceManager.GetString("ExpenseClaim_Created_Body", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [OrganizationName] Expense Claim Created: [CurrencyCode] [BudgetAmountFloat]. + /// + internal static string ExpenseClaim_Created_Subject { + get { + return ResourceManager.GetString("ExpenseClaim_Created_Subject", resourceCulture); + } + } + /// /// Looks up a localized string similar to An unhandled exception was thrown in Swarmops: /// diff --git a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx index 55c63abb..82d75ce1 100644 --- a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx +++ b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx @@ -123,7 +123,15 @@ Please log on to Swarmops at [SystemUrl] to attest or deny. - [OrganizationName] Cash Advance Requested + [OrganizationName] Cash Advance Requested: [CurrencyCode] [BudgetAmountFloat] + + + [ConcernedPersonName] has created an expense claim against the budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. The claim concerns [RequestPurpose]. You will need to attest this expense claim. + +Please log on to Swarmops at [SystemUrl] to attest or deny. + + + [OrganizationName] Expense Claim Created: [CurrencyCode] [BudgetAmountFloat] An unhandled exception was thrown in Swarmops: diff --git a/Logic/Communications/Transmission/NotificationPayload.cs b/Logic/Communications/Transmission/NotificationPayload.cs index 899cff4e..583cd9a7 100644 --- a/Logic/Communications/Transmission/NotificationPayload.cs +++ b/Logic/Communications/Transmission/NotificationPayload.cs @@ -90,7 +90,11 @@ namespace Swarmops.Logic.Communications.Transmission System_Startup, System_Exception, CashAdvance_Requested, - CashAdvance_Attested + CashAdvance_Attested, + ExpenseClaim_Created, + ExpenseClaim_Attested, + ExpenseClaim_Validated, + Payout_Settled } // ReSharper restore InconsistentNaming diff --git a/Logic/Financial/ExpenseClaim.cs b/Logic/Financial/ExpenseClaim.cs index 43a508dd..6ee00ace 100644 --- a/Logic/Financial/ExpenseClaim.cs +++ b/Logic/Financial/ExpenseClaim.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Swarmops.Basic.Enums; using Swarmops.Basic.Types; using Swarmops.Database; +using Swarmops.Logic.Communications; +using Swarmops.Logic.Communications.Transmission; using Swarmops.Logic.Swarm; using Swarmops.Logic.Structure; using Swarmops.Logic.Support; @@ -56,12 +58,15 @@ namespace Swarmops.Logic.Financial transaction.AddRow(organization.FinancialAccounts.DebtsExpenseClaims, -amountCents, claimer); transaction.AddRow(budget, amountCents, claimer); - transaction.AddRow(costType, amountCents, claimer); // dimension 2 - + // Make the transaction dependent on the expense claim transaction.Dependency = newClaim; + // Create notification + + OutboundComm.CreateNotificationForAttest(budget, claimer, (double)amountCents / 100.0, description, NotificationResource.ExpenseClaim_Created); // Slightly misplaced logic, but failsafer here + return newClaim; } @@ -363,6 +368,8 @@ namespace Swarmops.Logic.Financial nominalTransaction[debtAccountId] = -AmountCents; nominalTransaction[BudgetId] = AmountCents; + + // TODO: Balance cost account, too } this.FinancialTransaction.RecalculateTransaction(nominalTransaction, updatingPerson); diff --git a/Logic/Financial/FinancialAccount.cs b/Logic/Financial/FinancialAccount.cs index 7dfdb808..46ad2abb 100644 --- a/Logic/Financial/FinancialAccount.cs +++ b/Logic/Financial/FinancialAccount.cs @@ -112,19 +112,6 @@ namespace Swarmops.Logic.Financial } } - new public int Dimension - { - get { return base.Dimension; } - set - { - if (base.Dimension != value) - { - SwarmDb.GetDatabaseForWriting().SetFinancialAccountDimension(this.Identity, value); - base.Dimension = value; - } - } - } - public Person Owner { get diff --git a/Logic/Financial/FinancialAccountRow.cs b/Logic/Financial/FinancialAccountRow.cs index 44c0d3fb..ff6b88eb 100644 --- a/Logic/Financial/FinancialAccountRow.cs +++ b/Logic/Financial/FinancialAccountRow.cs @@ -1,4 +1,5 @@ using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; namespace Swarmops.Logic.Financial { diff --git a/Logic/Financial/FinancialAccountRows.cs b/Logic/Financial/FinancialAccountRows.cs index 3c0923f0..81a8cf52 100644 --- a/Logic/Financial/FinancialAccountRows.cs +++ b/Logic/Financial/FinancialAccountRows.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; namespace Swarmops.Logic.Financial { diff --git a/Logic/Financial/FinancialTransaction.cs b/Logic/Financial/FinancialTransaction.cs index 846cf1ac..396b472c 100644 --- a/Logic/Financial/FinancialTransaction.cs +++ b/Logic/Financial/FinancialTransaction.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Swarmops.Basic.Enums; using Swarmops.Basic.Interfaces; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Database; using Swarmops.Logic.Swarm; using Swarmops.Logic.Structure; @@ -273,6 +274,9 @@ namespace Swarmops.Logic.Financial public bool RecalculateTransaction (Dictionary nominalTransaction, Person loggingPerson) { + // TODO: Update dimension 2 with dimension 1 P&L accounts as template + + bool changedTransaction = false; // We need to create a delta. This is... somewhat complicated. @@ -335,6 +339,10 @@ namespace Swarmops.Logic.Financial } } + // TODO: Dimension 2 + + + return changedTransaction; } diff --git a/Logic/Financial/FinancialTransactionRow.cs b/Logic/Financial/FinancialTransactionRow.cs index d1df28ab..f294b3c5 100644 --- a/Logic/Financial/FinancialTransactionRow.cs +++ b/Logic/Financial/FinancialTransactionRow.cs @@ -1,5 +1,6 @@ using System; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Database; namespace Swarmops.Logic.Financial diff --git a/Logic/Financial/FinancialTransactionRows.cs b/Logic/Financial/FinancialTransactionRows.cs index efbb74e9..139ba8b8 100644 --- a/Logic/Financial/FinancialTransactionRows.cs +++ b/Logic/Financial/FinancialTransactionRows.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using Swarmops.Basic.Enums; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; namespace Swarmops.Logic.Financial { diff --git a/Logic/Financial/FinancialTransactions.cs b/Logic/Financial/FinancialTransactions.cs index ce672b32..32fd01b4 100644 --- a/Logic/Financial/FinancialTransactions.cs +++ b/Logic/Financial/FinancialTransactions.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Swarmops.Basic.Enums; using Swarmops.Basic.Interfaces; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Database; using Swarmops.Logic.Structure; using Swarmops.Logic.Support; diff --git a/Logic/Financial/FinancialValidation.cs b/Logic/Financial/FinancialValidation.cs index 0422b94f..59ee09fb 100644 --- a/Logic/Financial/FinancialValidation.cs +++ b/Logic/Financial/FinancialValidation.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Text; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Logic.Swarm; namespace Swarmops.Logic.Financial diff --git a/Logic/Financial/FinancialValidations.cs b/Logic/Financial/FinancialValidations.cs index 630eae49..421eb8d0 100644 --- a/Logic/Financial/FinancialValidations.cs +++ b/Logic/Financial/FinancialValidations.cs @@ -4,6 +4,7 @@ using System.Text; using Swarmops.Basic.Enums; using Swarmops.Basic.Interfaces; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Database; using Swarmops.Logic.Swarm; using Swarmops.Logic.Support; diff --git a/Logic/Financial/OrganizationFinancialAccounts.cs b/Logic/Financial/OrganizationFinancialAccounts.cs index ee178346..858fe199 100644 --- a/Logic/Financial/OrganizationFinancialAccounts.cs +++ b/Logic/Financial/OrganizationFinancialAccounts.cs @@ -182,18 +182,6 @@ namespace Swarmops.Logic.Financial get { return this[OrganizationFinancialAccountType.IncomeSales]; } } - public FinancialAccount IncomeTypeUnspecified - { - // dimension 2 - get { return this[OrganizationFinancialAccountType.IncomeTypeUnspecified]; } - } - - public FinancialAccount CostTypeUnspecified - { - // dimension 2 - get { return this[OrganizationFinancialAccountType.CostTypeUnspecified]; } - } - public FinancialAccounts CostsConferences { get @@ -234,7 +222,7 @@ namespace Swarmops.Logic.Financial foreach (FinancialAccount account in costAccounts) { - if (account.Identity != yearlyResultId && account.Dimension == 1 && account.Expensable) + if (account.Identity != yearlyResultId && account.Expensable) // really should be redundant, but still... { result.Add(account); } @@ -251,43 +239,8 @@ namespace Swarmops.Logic.Financial get { - FinancialAccounts result = new FinancialAccounts(); - - int yearlyResultId = this.CostsYearlyResult.Identity; - - FinancialAccounts costAccounts = - FinancialAccounts.ForOrganization(Organization.FromIdentity(_organizationId), - FinancialAccountType.Cost); - - foreach (FinancialAccount account in costAccounts) - { - if (account.Identity != yearlyResultId && account.Dimension == 2 && account.Expensable) - { - result.Add(account); - } - } - - if (result.Count == 0) - { - // Cost types have not been primed; add default account to organization and return it. - - FinancialAccount defaultCostTypeAccount = FinancialAccount.Create(this._organizationId, - "Unspecified Costs", - FinancialAccountType.Cost, 0); - defaultCostTypeAccount.Dimension = 2; - this[OrganizationFinancialAccountType.CostTypeUnspecified] = defaultCostTypeAccount; - - FinancialAccount defaultIncomeTypeAccount = FinancialAccount.Create(this._organizationId, - "Unspecified Income", - FinancialAccountType.Income, 0); - defaultIncomeTypeAccount.Dimension = 2; - this[OrganizationFinancialAccountType.IncomeTypeUnspecified] = defaultIncomeTypeAccount; - - result.Add(defaultCostTypeAccount); - - } - - return result; + + throw new NotImplementedException(); } } diff --git a/Logic/Financial/Payout.cs b/Logic/Financial/Payout.cs index 8978b362..8c32e564 100644 --- a/Logic/Financial/Payout.cs +++ b/Logic/Financial/Payout.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Text; using Swarmops.Basic.Enums; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Database; using Swarmops.Logic.Swarm; using Swarmops.Logic.Structure; diff --git a/Logic/Structure/Organization.cs b/Logic/Structure/Organization.cs index 74cffbf2..1f92a807 100644 --- a/Logic/Structure/Organization.cs +++ b/Logic/Structure/Organization.cs @@ -265,16 +265,6 @@ namespace Swarmops.Logic.Structure FinancialAccounts[OrganizationFinancialAccountType.IncomeSales] = FinancialAccount.Create(this.Identity, "Sales", FinancialAccountType.Income, 0); - // 2-dimension base accounts - - FinancialAccount incomeUnspecified = FinancialAccount.Create(this.Identity, "Unspecified Income", FinancialAccountType.Income, 0); - incomeUnspecified.Dimension = 2; - FinancialAccounts[OrganizationFinancialAccountType.IncomeTypeUnspecified] = incomeUnspecified; - - FinancialAccount costUnspecified = FinancialAccount.Create(this.Identity, "Unspecified Cost", FinancialAccountType.Cost, 0); - costUnspecified.Dimension = 2; - FinancialAccounts[OrganizationFinancialAccountType.CostTypeUnspecified] = costUnspecified; - // Then, create various cost accounts that are probably needed, or that could be used as a starting point diff --git a/Logic/Swarm/Parley.cs b/Logic/Swarm/Parley.cs index 48ded44c..2f38cc45 100644 --- a/Logic/Swarm/Parley.cs +++ b/Logic/Swarm/Parley.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using Swarmops.Basic.Enums; using Swarmops.Basic.Types; +using Swarmops.Basic.Types.Financial; using Swarmops.Database; using Swarmops.Logic.Financial; using Swarmops.Logic.Structure; diff --git a/Site5/App_GlobalResources/Global.resx b/Site5/App_GlobalResources/Global.resx index 9cec81cc..a5a5636b 100644 --- a/Site5/App_GlobalResources/Global.resx +++ b/Site5/App_GlobalResources/Global.resx @@ -253,8 +253,8 @@ Upload File Displayed on "Submit" button next to file upload controls. - - Upload File To Activizr + + Upload File To Swarmops Used as header above upload sections. @@ -324,4 +324,16 @@ Today + + Cost Type + Second-dimension bookkeeping + + + Project + Tagging costs/income to projects + + + Related + List of shortcuts to related actions to current one + \ No newline at end of file diff --git a/Site5/App_GlobalResources/Pages.Financial.resx b/Site5/App_GlobalResources/Pages.Financial.resx index 70ad51f6..b6489ba1 100644 --- a/Site5/App_GlobalResources/Pages.Financial.resx +++ b/Site5/App_GlobalResources/Pages.Financial.resx @@ -312,7 +312,7 @@ Purpose - A cash advance has been requested for <strong>{0}</strong> for the purpose of {1}. The requested amount is {2} {3:N2}. Note that this is a <strong>loan</strong> from the organization until receipts have been presented. + A cash advance has been requested for <strong>{0}</strong>. The requested amount is {2} {3:N2}. Note that this is a <strong>loan</strong> from the organization until receipts have been presented. {0} is the person receiving the advance, {1} is the entered description. {2} is the currency (in caps) and {3:N2} is the amount, with two decimals, displayed in culture. diff --git a/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs b/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs index 53d4bc76..8a2cf337 100644 --- a/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs +++ b/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs @@ -43,7 +43,7 @@ namespace Swarmops.Site.Pages.Ledgers this.LabelSelectFileType.Text = Resources.Pages.Ledgers.UploadBankFiles_SelectBankFileType; this.LabelSelectAccount.Text = Resources.Pages.Ledgers.UploadBankFiles_SelectAccount; this.LabelUploadH2Header.Text = Resources.Pages.Ledgers.UploadBankFiles_UploadBankFile; - this.LabelUploadH3Header.Text = Resources.Global.Global_UploadFileToActivizr; + this.LabelUploadH3Header.Text = Resources.Global.Global_UploadFileToSwarmops; this.Upload.Text = Resources.Global.Global_UploadFile; this.LabelProcessing.Text = Resources.Global.Global_ProcessingFile; this.LinkUploadAnother.Text = Resources.Pages.Ledgers.UploadBankFiles_UploadAnother;