From 6dbb55d83d554c1bda93f6e214b676d0524f8d30 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 2 Feb 2018 18:36:43 +0100 Subject: [PATCH] Added more DocumentTypes --- Common/Enums/DocumentType.cs | 12 +++++++++++- Logic/Support/Document.cs | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Common/Enums/DocumentType.cs b/Common/Enums/DocumentType.cs index 0c33f969..e844d989 100644 --- a/Common/Enums/DocumentType.cs +++ b/Common/Enums/DocumentType.cs @@ -67,6 +67,16 @@ namespace Swarmops.Common.Enums /// /// There really isn't a standalone doctype for this but still /// - Payout + Payout, + + /// + /// Nor for this + /// + PaymentGroup, + + /// + /// Nor this + /// + Salary } } \ No newline at end of file diff --git a/Logic/Support/Document.cs b/Logic/Support/Document.cs index 6faa87cb..0d180cf3 100644 --- a/Logic/Support/Document.cs +++ b/Logic/Support/Document.cs @@ -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());