diff --git a/Common/Enums/ObjectOptionalDataType.cs b/Common/Enums/ObjectOptionalDataType.cs index 29747628..4e204892 100644 --- a/Common/Enums/ObjectOptionalDataType.cs +++ b/Common/Enums/ObjectOptionalDataType.cs @@ -200,6 +200,7 @@ namespace Swarmops.Common.Enums /// True if the organization declares inbound/outbound Value Added Tax /// OrgValueAddedTaxEnabled, + OrgValueAddedTaxFrequency, OrgFinancialMailName, OrgFinancialMailAddress, diff --git a/Logic/Financial/VatReports.cs b/Logic/Financial/VatReports.cs index bfcd56af..35ff3eb6 100644 --- a/Logic/Financial/VatReports.cs +++ b/Logic/Financial/VatReports.cs @@ -24,7 +24,7 @@ namespace Swarmops.Logic.Financial // foreach organization, if organization is VAT enabled Organization organization = Organization.FromIdentity(8); // HACK TEMPORARY HACK - int reportMonthInterval = 1; // TODO: READ FROM ORG PARAMETERS + int reportMonthInterval = organization.VatReportFrequencyMonths; // Get the list of previous VAT reports diff --git a/Logic/Structure/Organization.cs b/Logic/Structure/Organization.cs index 4a994340..004b571b 100644 --- a/Logic/Structure/Organization.cs +++ b/Logic/Structure/Organization.cs @@ -1091,6 +1091,23 @@ namespace Swarmops.Logic.Structure } } + public int VatReportFrequencyMonths + { + get + { + int frequency = OptionalData.GetOptionalDataInt(ObjectOptionalDataType.OrgValueAddedTaxFrequency); + if (frequency == 0) + { + return 12; // default to annual (the frequency is in months) + } + return frequency; + } + set + { + OptionalData.SetOptionalDataInt(ObjectOptionalDataType.OrgValueAddedTaxFrequency, value); + } + } + public Document LogoLandscape { get diff --git a/Site/Controls/v5/Base/DropDown.ascx b/Site/Controls/v5/Base/DropDown.ascx index 077499c4..c54f7e81 100644 --- a/Site/Controls/v5/Base/DropDown.ascx +++ b/Site/Controls/v5/Base/DropDown.ascx @@ -2,6 +2,7 @@ <%@ Import Namespace="System.Threading" %> <%@ Import Namespace="Swarmops.Common.Enums" %> +