diff --git a/Logic/Financial/VatReports.cs b/Logic/Financial/VatReports.cs
index 3bad815f..eed6ddb0 100644
--- a/Logic/Financial/VatReports.cs
+++ b/Logic/Financial/VatReports.cs
@@ -58,7 +58,7 @@ namespace Swarmops.Logic.Financial
}
}
- private static int VatReportSorterByDate (VatReport a, VatReport b)
+ public static int VatReportSorterByDate (VatReport a, VatReport b)
{
return a.YearMonthStart - b.YearMonthStart;
}
diff --git a/Site/App_GlobalResources/Global.designer.cs b/Site/App_GlobalResources/Global.designer.cs
index 53c9ef47..6446475b 100644
--- a/Site/App_GlobalResources/Global.designer.cs
+++ b/Site/App_GlobalResources/Global.designer.cs
@@ -915,6 +915,15 @@ namespace Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Download This.
+ ///
+ internal static string Global_DownloadThis {
+ get {
+ return ResourceManager.GetString("Global_DownloadThis", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to -- Select Budget/Account --.
///
@@ -1356,6 +1365,15 @@ namespace Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Send this to me in mail.
+ ///
+ internal static string Global_SendThisInMail {
+ get {
+ return ResourceManager.GetString("Global_SendThisInMail", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to (several).
///
diff --git a/Site/App_GlobalResources/Global.resx b/Site/App_GlobalResources/Global.resx
index 5dfba89a..df94b308 100644
--- a/Site/App_GlobalResources/Global.resx
+++ b/Site/App_GlobalResources/Global.resx
@@ -916,4 +916,10 @@
ProgressUsed for something progressing through the system, i.e. progress of an invoice toward payment
+
+ Download This
+
+
+ Send this to me in mail
+
\ No newline at end of file
diff --git a/Site/App_GlobalResources/Menu5.designer.cs b/Site/App_GlobalResources/Menu5.designer.cs
index cd5a1e94..16c1aff5 100644
--- a/Site/App_GlobalResources/Menu5.designer.cs
+++ b/Site/App_GlobalResources/Menu5.designer.cs
@@ -753,6 +753,15 @@ namespace Resources {
}
}
+ ///
+ /// Looks up a localized string similar to VAT Reports.
+ ///
+ internal static string Menu5_Ledgers_VatReports {
+ get {
+ return ResourceManager.GetString("Menu5_Ledgers_VatReports", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to List Unsettled Accounts.
///
diff --git a/Site/App_GlobalResources/Menu5.resx b/Site/App_GlobalResources/Menu5.resx
index 3aeb93d4..31b76cf4 100644
--- a/Site/App_GlobalResources/Menu5.resx
+++ b/Site/App_GlobalResources/Menu5.resx
@@ -439,4 +439,8 @@
Impersonate
+
+ VAT Reports
+ This is a European thing (Value Added Tax).
+
\ No newline at end of file
diff --git a/Site/App_GlobalResources/Pages.Ledgers.designer.cs b/Site/App_GlobalResources/Pages.Ledgers.designer.cs
index ccef928f..7833fb9c 100644
--- a/Site/App_GlobalResources/Pages.Ledgers.designer.cs
+++ b/Site/App_GlobalResources/Pages.Ledgers.designer.cs
@@ -2031,5 +2031,23 @@ namespace Resources.Pages {
return ResourceManager.GetString("ViewOutstandingAccounts_PageTitle", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to You're viewing a filed VAT report. The inbound and outbound VAT, as well as total turnover, has been recorded for the report period. This report is ready to be transmitted to tax authorities..
+ ///
+ internal static string ViewVatReports_Info {
+ get {
+ return ResourceManager.GetString("ViewVatReports_Info", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to VAT Reports.
+ ///
+ internal static string ViewVatReports_PageTitle {
+ get {
+ return ResourceManager.GetString("ViewVatReports_PageTitle", resourceCulture);
+ }
+ }
}
}
diff --git a/Site/App_GlobalResources/Pages.Ledgers.resx b/Site/App_GlobalResources/Pages.Ledgers.resx
index 1e0df4e9..c846c67a 100644
--- a/Site/App_GlobalResources/Pages.Ledgers.resx
+++ b/Site/App_GlobalResources/Pages.Ledgers.resx
@@ -871,4 +871,11 @@
Close a VAT report with this transaction?
+
+ You're viewing a filed VAT report. The inbound and outbound VAT, as well as total turnover, has been recorded for the report period. This report is ready to be transmitted to tax authorities.
+
+
+ VAT Reports
+ VAT is short for Value Added Tax; it has completely different names in different EU countries (moms, Umsatzsteuer, etc.)
+
\ No newline at end of file
diff --git a/Site/MainMenu-v5.xml b/Site/MainMenu-v5.xml
index 23c82b1c..f2be7278 100644
--- a/Site/MainMenu-v5.xml
+++ b/Site/MainMenu-v5.xml
@@ -437,6 +437,17 @@
+
+ Ledgers_VatReports
+ 3
+
+ iconshock-walletmoney
+ /Pages/v5/Ledgers/ViewVatReports.aspx
+ Link
+
+
+
+
Ledgers_TaxForms3
diff --git a/Site/Pages/v5/Ledgers/ViewVatReports.aspx b/Site/Pages/v5/Ledgers/ViewVatReports.aspx
index 03b3c138..97e937d8 100644
--- a/Site/Pages/v5/Ledgers/ViewVatReports.aspx
+++ b/Site/Pages/v5/Ledgers/ViewVatReports.aspx
@@ -1,7 +1,99 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeBehind="ViewVatReports.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Ledgers.ViewVatReports" %>
-
+
+
+
+
+
+
+
-
+
+
+
<%= CurrentOrganization.Currency.DisplayCode %>
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+ UNDER CONSTRUCTION
+
+
+
+
+
+
+
diff --git a/Site/Pages/v5/Ledgers/ViewVatReports.aspx.cs b/Site/Pages/v5/Ledgers/ViewVatReports.aspx.cs
index ed3c9f88..e9923131 100644
--- a/Site/Pages/v5/Ledgers/ViewVatReports.aspx.cs
+++ b/Site/Pages/v5/Ledgers/ViewVatReports.aspx.cs
@@ -1,17 +1,64 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
+using Swarmops.Logic.Financial;
+using Swarmops.Logic.Security;
namespace Swarmops.Frontend.Pages.v5.Ledgers
{
- public partial class ViewVatReports : System.Web.UI.Page
+ public partial class ViewVatReports : PageV5Base
{
protected void Page_Load(object sender, EventArgs e)
{
+ if (!CurrentOrganization.IsEconomyEnabled)
+ {
+ Response.Redirect("/Pages/v5/Financial/EconomyNotEnabled.aspx", true);
+ return;
+ }
+ PageTitle = Resources.Pages.Ledgers.ViewVatReports_PageTitle;
+ InfoBoxLiteral = Resources.Pages.Ledgers.ViewVatReports_Info;
+
+ // Security: If the org has open ledgers, then anyone may read. Otherwise, Financials.Read.
+
+ if (!String.IsNullOrEmpty(CurrentOrganization.OpenLedgersDomain))
+ {
+ PageAccessRequired = new Access(AccessAspect.Null, AccessType.Read);
+ }
+ else
+ {
+ PageAccessRequired = new Access(CurrentOrganization, AccessAspect.Financials, AccessType.Read);
+ }
+
+
+ if (!Page.IsPostBack)
+ {
+ // Populate VAT report dropdown
+
+ // TODO: Disable if viewing specific report and not open ledgers
+
+ VatReports reports = VatReports.ForOrganization(CurrentOrganization, true);
+ reports.Sort(VatReports.VatReportSorterByDate);
+
+ foreach (VatReport report in reports)
+ {
+ this.DropReports.Items.Add(new ListItem(report.Description,
+ report.Identity.ToString(CultureInfo.InvariantCulture)));
+ }
+
+ Localize();
+ }
+
+ RegisterControl(EasyUIControl.DataGrid | EasyUIControl.Tree);
+ }
+
+ private void Localize()
+ {
+ // Localize all controls - todo
}
}
}
\ No newline at end of file
diff --git a/Site/Pages/v5/Ledgers/ViewVatReports.aspx.designer.cs b/Site/Pages/v5/Ledgers/ViewVatReports.aspx.designer.cs
index 2efc1108..edce608c 100644
--- a/Site/Pages/v5/Ledgers/ViewVatReports.aspx.designer.cs
+++ b/Site/Pages/v5/Ledgers/ViewVatReports.aspx.designer.cs
@@ -11,5 +11,95 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers {
public partial class ViewVatReports {
+
+ ///
+ /// LabelContentHeader control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelContentHeader;
+
+ ///
+ /// DropReports control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList DropReports;
+
+ ///
+ /// LiteralHeaderTransactionId control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralHeaderTransactionId;
+
+ ///
+ /// LiteralHeaderDateTime control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralHeaderDateTime;
+
+ ///
+ /// LiteralHeaderDescription control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralHeaderDescription;
+
+ ///
+ /// LiteralHeaderTurnover control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralHeaderTurnover;
+
+ ///
+ /// LiteralHeaderVatOutbound control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralHeaderVatOutbound;
+
+ ///
+ /// LiteralHeaderVatInbound control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralHeaderVatInbound;
+
+ ///
+ /// LiteralSeeDox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal LiteralSeeDox;
+
+ ///
+ /// LabelSidebarDownload control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label LabelSidebarDownload;
}
}