EOM work
This commit is contained in:
@@ -77,6 +77,11 @@ namespace Swarmops.Common.Enums
|
||||
/// <summary>
|
||||
/// Nor this
|
||||
/// </summary>
|
||||
Salary
|
||||
Salary,
|
||||
|
||||
/// <summary>
|
||||
/// Documentation related to a financial account, usually an external one
|
||||
/// </summary>
|
||||
FinancialAccountDocument
|
||||
}
|
||||
}
|
||||
@@ -249,6 +249,10 @@ namespace Swarmops.Logic.Support
|
||||
{
|
||||
return DocumentType.Salary;
|
||||
}
|
||||
else if (foreignObject is FinancialAccountDocument)
|
||||
{
|
||||
return DocumentType.FinancialAccountDocument;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException ("Unrecognized foreign object type:" + foreignObject.GetType().ToString());
|
||||
|
||||
@@ -277,15 +277,21 @@
|
||||
}
|
||||
|
||||
var itemType = activeUpload.substring(0, activeUpload.indexOf('-'));
|
||||
console.log(itemType);
|
||||
console.log("Upload" + itemType);
|
||||
|
||||
/*
|
||||
// Note that the function to call is selected dynamically!
|
||||
|
||||
SwarmopsJS.ajaxCall(
|
||||
"EndOfMonth.aspx/Upload" + ,
|
||||
{guid: uploadGuid, itemId: activeUpload},
|
||||
)
|
||||
// TODO: AJAX CALL TO STORE UPLOAD*/
|
||||
"EndOfMonth.aspx/Upload" + itemType,
|
||||
{ guid: uploadGuid, itemId: activeUpload },
|
||||
function(result) {
|
||||
if (result.Success) {
|
||||
|
||||
} else {
|
||||
// Todo: add more error handling later, maybe
|
||||
clientFailedUpload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
markItemCompleted(activeUpload);
|
||||
|
||||
|
||||
@@ -277,6 +277,7 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
string[] parts = itemId.Split('-');
|
||||
FinancialAccount account = FinancialAccount.FromIdentity(Int32.Parse(parts[1]));
|
||||
int yearMonth = Int32.Parse(parts[2]);
|
||||
DateTime statementStart = new DateTime(yearMonth/100, yearMonth%100, 1);
|
||||
|
||||
if (account.OrganizationId != authData.CurrentOrganization.Identity)
|
||||
{
|
||||
@@ -285,6 +286,11 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
|
||||
Documents documents = Documents.RecentFromDescription(guid);
|
||||
|
||||
FinancialAccountDocument accountDoc = FinancialAccountDocument.Create(account, FinancialAccountDocumentType.BankStatement, authData.CurrentUser,
|
||||
statementStart, statementStart.AddMonths(1), string.Empty);
|
||||
|
||||
documents.SetForeignObjectForAll(accountDoc);
|
||||
|
||||
return new AjaxCallResult {Success = true};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -5311,7 +5311,7 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Frames\" />
|
||||
<Folder Include="Frames\v5\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
||||
Reference in New Issue
Block a user