Added more DocumentTypes

This commit is contained in:
Rick Falkvinge
2018-02-02 18:36:43 +01:00
parent 593fd909cd
commit 6dbb55d83d
2 changed files with 19 additions and 1 deletions
+11 -1
View File
@@ -67,6 +67,16 @@ namespace Swarmops.Common.Enums
/// <summary>
/// There really isn't a standalone doctype for this but still
/// </summary>
Payout
Payout,
/// <summary>
/// Nor for this
/// </summary>
PaymentGroup,
/// <summary>
/// Nor this
/// </summary>
Salary
}
}
+8
View File
@@ -181,6 +181,14 @@ namespace Swarmops.Logic.Support
{
return DocumentType.Payout;
}
else if (foreignObject is PaymentGroup)
{
return DocumentType.PaymentGroup;
}
else if (foreignObject is Salary)
{
return DocumentType.Salary;
}
else
{
throw new ArgumentException ("Unrecognized foreign object type:" + foreignObject.GetType().ToString());