Adding some resources
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+18
@@ -915,6 +915,15 @@ namespace Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Download This.
|
||||
/// </summary>
|
||||
internal static string Global_DownloadThis {
|
||||
get {
|
||||
return ResourceManager.GetString("Global_DownloadThis", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to -- Select Budget/Account --.
|
||||
/// </summary>
|
||||
@@ -1356,6 +1365,15 @@ namespace Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Send this to me in mail.
|
||||
/// </summary>
|
||||
internal static string Global_SendThisInMail {
|
||||
get {
|
||||
return ResourceManager.GetString("Global_SendThisInMail", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to (several).
|
||||
/// </summary>
|
||||
|
||||
@@ -916,4 +916,10 @@
|
||||
<value>Progress</value>
|
||||
<comment>Used for something progressing through the system, i.e. progress of an invoice toward payment</comment>
|
||||
</data>
|
||||
<data name="Global_DownloadThis" xml:space="preserve">
|
||||
<value>Download This</value>
|
||||
</data>
|
||||
<data name="Global_SendThisInMail" xml:space="preserve">
|
||||
<value>Send this to me in mail</value>
|
||||
</data>
|
||||
</root>
|
||||
+9
@@ -753,6 +753,15 @@ namespace Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to VAT Reports.
|
||||
/// </summary>
|
||||
internal static string Menu5_Ledgers_VatReports {
|
||||
get {
|
||||
return ResourceManager.GetString("Menu5_Ledgers_VatReports", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to List Unsettled Accounts.
|
||||
/// </summary>
|
||||
|
||||
@@ -439,4 +439,8 @@
|
||||
<data name="Menu5_Administration_Debug_Impersonate" xml:space="preserve">
|
||||
<value>Impersonate</value>
|
||||
</data>
|
||||
<data name="Menu5_Ledgers_VatReports" xml:space="preserve">
|
||||
<value>VAT Reports</value>
|
||||
<comment>This is a European thing (Value Added Tax).</comment>
|
||||
</data>
|
||||
</root>
|
||||
+18
@@ -2031,5 +2031,23 @@ namespace Resources.Pages {
|
||||
return ResourceManager.GetString("ViewOutstandingAccounts_PageTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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..
|
||||
/// </summary>
|
||||
internal static string ViewVatReports_Info {
|
||||
get {
|
||||
return ResourceManager.GetString("ViewVatReports_Info", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to VAT Reports.
|
||||
/// </summary>
|
||||
internal static string ViewVatReports_PageTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("ViewVatReports_PageTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -871,4 +871,11 @@
|
||||
<data name="BalanceTransactions_ModalDialog_RadioVatReport" xml:space="preserve">
|
||||
<value>Close a VAT report with this transaction?</value>
|
||||
</data>
|
||||
<data name="ViewVatReports_Info" xml:space="preserve">
|
||||
<value>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.</value>
|
||||
</data>
|
||||
<data name="ViewVatReports_PageTitle" xml:space="preserve">
|
||||
<value>VAT Reports</value>
|
||||
<comment>VAT is short for Value Added Tax; it has completely different names in different EU countries (moms, Umsatzsteuer, etc.)</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -437,6 +437,17 @@
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_VatReports</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
<Permissions />
|
||||
<ImageUrl>iconshock-walletmoney</ImageUrl>
|
||||
<NavigateUrl>/Pages/v5/Ledgers/ViewVatReports.aspx</NavigateUrl>
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_TaxForms</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
|
||||
@@ -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" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" runat="server">
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#tableVatReport').treegrid(
|
||||
{
|
||||
onLoadSuccess: function () {
|
||||
$('div.datagrid').css('opacity', 1);
|
||||
$('#imageLoadIndicator').hide();
|
||||
$('span.loadingHeader').hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$('#<%=DropReports.ClientID %>').change(function () {
|
||||
var selectedReportId = $('#<%=DropReports.ClientID %>').val();
|
||||
|
||||
$('#tableVatReport').treegrid({ url: 'Json-VatReportData.aspx?ReportId=' + selectedReportId });
|
||||
$('#imageLoadIndicator').show();
|
||||
$('div.datagrid').css('opacity', 0.4);
|
||||
|
||||
//$('#tableAnnualReport').treegrid('reload');
|
||||
});
|
||||
|
||||
|
||||
$('div.datagrid').css('opacity', 0.4);
|
||||
});
|
||||
|
||||
function formatGray(val, row, index) {
|
||||
if (val === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return "<span style='color:#AAA'>" + val + "</span>";
|
||||
}
|
||||
|
||||
var currentYear = <%=DateTime.Today.Year %>;
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.content h2 select {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #1C397E;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.datagrid-row-selected,.datagrid-row-over{
|
||||
background:transparent;
|
||||
}
|
||||
table.datagrid-ftable {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
|
||||
|
||||
<h2><div class="elementFloatFar"><%= CurrentOrganization.Currency.DisplayCode %></div><asp:Label ID="LabelContentHeader" runat="server" /> <asp:DropDownList runat="server" ID="DropReports"/> <img alt="Loading" src="/Images/Abstract/ajaxloader-blackcircle.gif" ID="imageLoadIndicator" /></h2>
|
||||
<table id="tableVatReport" title="" class="easyui-treegrid" style="width:680px;height:600px"
|
||||
url="Json-VatReportData.aspx"
|
||||
rownumbers="false"
|
||||
animate="true"
|
||||
fitColumns="true" showFooter="true"
|
||||
idField="id" treeField="txid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="txid" width="40"><asp:Literal ID="LiteralHeaderTransactionId" Text="Tx#" runat="server"/></th>
|
||||
<th field="datetime" width="100"><asp:Literal ID="LiteralHeaderDateTime" runat="server" /></th>
|
||||
<th field="description" width="280"><asp:Literal ID="LiteralHeaderDescription" runat="server" /></th>
|
||||
<th field="turnover" width="140" align="right"><asp:Literal ID="LiteralHeaderTurnover" runat="server" /></th>
|
||||
<th field="vatoutbound" width="100" align="right"><asp:Literal ID="LiteralHeaderVatOutbound" runat="server" /></th>
|
||||
<th field="vatinbound" width="100" align="right"><asp:Literal ID="LiteralHeaderVatInbound" runat="server" /></th>
|
||||
<th field="dox" width="40" align="center"><asp:Literal ID="LiteralSeeDox" runat="server" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" runat="server">
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
|
||||
<h2 class="blue"><asp:Label ID="LabelSidebarDownload" Text="Download This" runat="server" /><span class="arrow"></span></h2>
|
||||
|
||||
<div class="box">
|
||||
<div class="content">
|
||||
<div class="link-row-encaps" id="linkDownloadReport" onclick="document.location='placeholder';" >
|
||||
<div class="link-row-icon" style="background-image:url('/Images/Icons/iconshock-downarrow-16px.png');background-position:-1px -1px"></div>
|
||||
UNDER CONSTRUCTION
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,5 +11,95 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers {
|
||||
|
||||
|
||||
public partial class ViewVatReports {
|
||||
|
||||
/// <summary>
|
||||
/// LabelContentHeader control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label LabelContentHeader;
|
||||
|
||||
/// <summary>
|
||||
/// DropReports control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList DropReports;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralHeaderTransactionId control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralHeaderTransactionId;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralHeaderDateTime control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralHeaderDateTime;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralHeaderDescription control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralHeaderDescription;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralHeaderTurnover control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralHeaderTurnover;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralHeaderVatOutbound control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralHeaderVatOutbound;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralHeaderVatInbound control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralHeaderVatInbound;
|
||||
|
||||
/// <summary>
|
||||
/// LiteralSeeDox control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal LiteralSeeDox;
|
||||
|
||||
/// <summary>
|
||||
/// LabelSidebarDownload control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label LabelSidebarDownload;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user