Ugly hack to let pilot import bank data
This commit is contained in:
@@ -196,20 +196,24 @@ namespace Swarmops.Logic.Financial
|
||||
{
|
||||
// HACK HACK HACK HACK HACK for our pilots; this will be softcoded later TODO
|
||||
|
||||
if (this.OrganizationId != 1 || !PilotInstallationIds.IsPilot(PilotInstallationIds.PiratePartySE))
|
||||
if (this.OrganizationId == 1 && PilotInstallationIds.IsPilot(PilotInstallationIds.PiratePartySE))
|
||||
{
|
||||
return null;
|
||||
switch (this.FinancialAccountId)
|
||||
{
|
||||
case 1:
|
||||
return ExternalBankDataProfile.FromIdentity(ExternalBankDataProfile.SESebId);
|
||||
case 2:
|
||||
return ExternalBankDataProfile.FromIdentity(ExternalBankDataProfile.PaypalId);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (this.OrganizationId == 7 && PilotInstallationIds.IsPilot(PilotInstallationIds.SwarmopsLive) && this.FinancialAccountId == 29)
|
||||
{
|
||||
return ExternalBankDataProfile.FromIdentity(ExternalBankDataProfile.SESebId);
|
||||
}
|
||||
|
||||
switch (this.FinancialAccountId)
|
||||
{
|
||||
case 1:
|
||||
return ExternalBankDataProfile.FromIdentity(ExternalBankDataProfile.SESebId);
|
||||
case 2:
|
||||
return ExternalBankDataProfile.FromIdentity(ExternalBankDataProfile.PaypalId);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace Swarmops.Logic.Structure
|
||||
OptionalData.SetOptionalDataInt(ObjectOptionalDataType.OrgFirstFiscalYear, 2009);
|
||||
year = 2009;
|
||||
}
|
||||
else if (this.Identity == 2 && this.Name.StartsWith("Europirate Acad"))
|
||||
else if (this.Identity == 7 && this.Name.StartsWith("Europirate Acad"))
|
||||
{
|
||||
OptionalData.SetOptionalDataInt(ObjectOptionalDataType.OrgFirstFiscalYear, 2012);
|
||||
year = 2012;
|
||||
@@ -809,6 +809,13 @@ namespace Swarmops.Logic.Structure
|
||||
|
||||
return result;
|
||||
}
|
||||
else if (PilotInstallationIds.IsPilot(PilotInstallationIds.SwarmopsLive) && this.OrganizationId == 7)
|
||||
{
|
||||
FinancialAccounts result = new FinancialAccounts();
|
||||
result.Add(FinancialAccount.FromIdentity(29));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
static public string DevelopmentSandbox
|
||||
{ get { return "a8187d16-d913-4ddc-a3d5-214f7c14aac5"; } }
|
||||
|
||||
static public string SwarmopsLive
|
||||
{ get { return "db8f4ade-07f2-4f4f-a1c7-c9da91f93ea9"; }}
|
||||
|
||||
static public bool IsPilot(string installationId)
|
||||
{
|
||||
string thisInstallationId = Persistence.Key["SwarmopsInstallationId"];
|
||||
|
||||
@@ -14,7 +14,16 @@ namespace Swarmops.Frontend.Automation
|
||||
[WebMethod]
|
||||
static public int GetProgress(string guid)
|
||||
{
|
||||
return (int) GuidCache.Get(guid + "-Progress"); // suffix because guid may refer to other data too
|
||||
object progressObject = GuidCache.Get(guid + "-Progress"); // suffix because guid may refer to other data too
|
||||
|
||||
if (progressObject != null)
|
||||
{
|
||||
return (int) progressObject;
|
||||
}
|
||||
|
||||
// if the progress object doesn't exist, assume it hasn't been initialized yet
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,6 +240,7 @@ namespace Swarmops.Site.Pages.Ledgers
|
||||
case 0:
|
||||
return string.Empty;
|
||||
case 1:
|
||||
case 29:
|
||||
return "(Instruct Stock-SE-SEB)";
|
||||
case 2:
|
||||
return "(Instruct Stock-Global-Paypal)";
|
||||
|
||||
Reference in New Issue
Block a user