Fix for VAT report due detection

This commit is contained in:
Rick Falkvinge
2019-02-16 07:10:57 +01:00
parent c86851d898
commit e1f58b00c1
+7
View File
@@ -132,6 +132,13 @@ namespace Swarmops.Logic.Financial
return ReportRequirement.Required;
}
// If the next report was due earlier this year, it's definitely required
if (nextReportDue.Year == nowUtc.Year && nextReportDue.Month < nowUtc.Month)
{
return ReportRequirement.Required; // if there was a "VeryRequired" option it would be appropriate here
}
// Otherwise not required
return ReportRequirement.NotRequired;