From 9b49dbc50fc50fdd1f0bc113ae0372395a5abed3 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 1 Jan 2019 19:24:26 +0100 Subject: [PATCH] EOM work --- .../Pages.Ledgers.designer.cs | 9 +++++++++ Site/App_GlobalResources/Pages.Ledgers.resx | 4 ++++ Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs | 17 +++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/Site/App_GlobalResources/Pages.Ledgers.designer.cs b/Site/App_GlobalResources/Pages.Ledgers.designer.cs index fb205a8a..ee5ec096 100644 --- a/Site/App_GlobalResources/Pages.Ledgers.designer.cs +++ b/Site/App_GlobalResources/Pages.Ledgers.designer.cs @@ -1149,6 +1149,15 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to Payroll: No payroll defined. + /// + internal static string EndOfMonth_PayrollInactive { + get { + return ResourceManager.GetString("EndOfMonth_PayrollInactive", resourceCulture); + } + } + /// /// Looks up a localized string similar to <strong>SKIP BANK STATEMENT?</strong><br/><br/>Bank statements are typically needed for audit verification of the internal records. The only valid reason to skip a month's statement is that the account wasn't opened yet, in which case you skip the months before the account was opened and no statements therefore exist.<br/><br/>You won't be asked again to upload this particular statement if you skip it now.. /// diff --git a/Site/App_GlobalResources/Pages.Ledgers.resx b/Site/App_GlobalResources/Pages.Ledgers.resx index 87726112..5cd2016c 100644 --- a/Site/App_GlobalResources/Pages.Ledgers.resx +++ b/Site/App_GlobalResources/Pages.Ledgers.resx @@ -1031,4 +1031,8 @@ <strong>SKIP DOCUMENT UPLOAD?</strong><br/><br/>This document is typically needed for operation records. The only valid reason to skip a document is that it doesn't exist because the operations weren't running yet, like when an operation started in June of a year won't have documents for January of that year.<br/><br/>You won't be asked again to upload this document if you skip it now. + + Payroll: No payroll defined + This is shown as a disabled action item when there's no active payroll + \ No newline at end of file diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs b/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs index c519f061..c31c4c31 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs @@ -123,6 +123,23 @@ namespace Swarmops.Frontend.Pages.Ledgers group2.Items.Add(vatReport); } + Payroll payroll = Payroll.ForOrganization(this.CurrentOrganization); + if (payroll.Any()) + { + // There is active payroll + + + } + else + { + EomItem payrollInactive = new EomItem(); + payrollInactive.Id = "PayrollInactive"; + payrollInactive.Completed = true; + payrollInactive.Name = Resources.Pages.Ledgers.EndOfMonth_PayrollInactive; + payrollInactive.Icon = "document"; + group2.Items.Add(payrollInactive); + } + if (group2.Items.Count > 0) {