This commit is contained in:
Rick Falkvinge
2019-01-01 19:24:26 +01:00
parent a85bbcf37b
commit 9b49dbc50f
3 changed files with 30 additions and 0 deletions
+9
View File
@@ -1149,6 +1149,15 @@ namespace Resources.Pages {
}
}
/// <summary>
/// Looks up a localized string similar to Payroll: No payroll defined.
/// </summary>
internal static string EndOfMonth_PayrollInactive {
get {
return ResourceManager.GetString("EndOfMonth_PayrollInactive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;strong&gt;SKIP BANK STATEMENT?&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Bank statements are typically needed for audit verification of the internal records. The only valid reason to skip a month&apos;s statement is that the account wasn&apos;t opened yet, in which case you skip the months before the account was opened and no statements therefore exist.&lt;br/&gt;&lt;br/&gt;You won&apos;t be asked again to upload this particular statement if you skip it now..
/// </summary>
@@ -1031,4 +1031,8 @@
<data name="EndOfMonth_SkipDocumentDialogGeneric" xml:space="preserve">
<value>&lt;strong&gt;SKIP DOCUMENT UPLOAD?&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;You won't be asked again to upload this document if you skip it now.</value>
</data>
<data name="EndOfMonth_PayrollInactive" xml:space="preserve">
<value>Payroll: No payroll defined</value>
<comment>This is shown as a disabled action item when there's no active payroll</comment>
</data>
</root>
+17
View File
@@ -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)
{