Refactor: Moved financial basic types into Swarmops.Basic.Types.Financial

This commit is contained in:
Rick Falkvinge
2013-10-06 10:10:07 +00:00
parent 6b584d87d5
commit da7752e394
32 changed files with 106 additions and 148 deletions
+5 -5
View File
@@ -66,7 +66,7 @@
<Compile Include="Types\BasicElection.cs" />
<Compile Include="Types\BasicExceptionLog.cs" />
<Compile Include="Types\BasicExternalActivity.cs" />
<Compile Include="Types\BasicFinancialValidation.cs" />
<Compile Include="Types\Financial\BasicFinancialValidation.cs" />
<Compile Include="Types\BasicPostalCode.cs" />
<Compile Include="Types\Financial\BasicFinancialAccount.cs" />
<Compile Include="Types\Governance\BasicMeeting.cs" />
@@ -98,10 +98,10 @@
<Compile Include="Types\BasicExpenseClaim.cs" />
<Compile Include="Types\BasicExternalCredential.cs" />
<Compile Include="Types\BasicExternalIdentity.cs" />
<Compile Include="Types\BasicFinancialAccountRow.cs" />
<Compile Include="Types\BasicFinancialDependency.cs" />
<Compile Include="Types\BasicFinancialTransaction.cs" />
<Compile Include="Types\BasicFinancialTransactionRow.cs" />
<Compile Include="Types\Financial\BasicFinancialAccountRow.cs" />
<Compile Include="Types\Financial\BasicFinancialDependency.cs" />
<Compile Include="Types\Financial\BasicFinancialTransaction.cs" />
<Compile Include="Types\Financial\BasicFinancialTransactionRow.cs" />
<Compile Include="Types\BasicInboundInvoice.cs" />
<Compile Include="Types\BasicInternalPoll.cs" />
<Compile Include="Types\BasicInternalPollCandidate.cs" />
@@ -95,13 +95,5 @@ namespace Swarmops.Basic.Enums
/// When closing books, this is the yearly result (balanced against DebtsEquity)
/// </summary>
CostsYearlyResult, // multi-account type
/// <summary>
/// Dimension 2 - default income account
/// </summary>
IncomeTypeUnspecified,
/// <summary>
/// Dimensione 2 - default cost account
/// </summary>
CostTypeUnspecified
};
}
@@ -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; }
@@ -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
{
@@ -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
{
/// <summary>
/// This class encapsulates what a financial transaction was constructed from.
@@ -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
{
@@ -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
{
@@ -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
{