diff --git a/Common/Enums/ObjectOptionalDataType.cs b/Common/Enums/ObjectOptionalDataType.cs
index 3a790c85..157597f7 100644
--- a/Common/Enums/ObjectOptionalDataType.cs
+++ b/Common/Enums/ObjectOptionalDataType.cs
@@ -264,6 +264,11 @@ namespace Swarmops.Common.Enums
///
OrgVanityDomain,
+ ///
+ /// Organization's maintenance donation level, in parts-per-million; typically 1000 or 100
+ ///
+ OrgMaintenanceDonationLevel,
+
///
/// Free-text description of an inbound invoice (what's it for?)
///
diff --git a/Common/Enums/OrganizationFinancialAccountType.cs b/Common/Enums/OrganizationFinancialAccountType.cs
index c4aa5775..dad12ef0 100644
--- a/Common/Enums/OrganizationFinancialAccountType.cs
+++ b/Common/Enums/OrganizationFinancialAccountType.cs
@@ -167,6 +167,11 @@
///
CostsLocalDonationTransfers,
+ ///
+ /// Voluntary donations toward maintenance of this very code base
+ ///
+ CostsMaintenanceDonations,
+
///
/// No description
///
diff --git a/Logic/Resources/Logic.Financial.FinancialAccount.Designer.cs b/Logic/Resources/Logic.Financial.FinancialAccount.Designer.cs
index 7bee18b6..eb56527e 100644
--- a/Logic/Resources/Logic.Financial.FinancialAccount.Designer.cs
+++ b/Logic/Resources/Logic.Financial.FinancialAccount.Designer.cs
@@ -402,6 +402,15 @@ namespace Swarmops.Logic.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Maintenance Donations.
+ ///
+ internal static string Cost_MaintenanceDonations {
+ get {
+ return ResourceManager.GetString("Cost_MaintenanceDonations", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Marketing and Campaigns.
///
diff --git a/Logic/Resources/Logic.Financial.FinancialAccount.resx b/Logic/Resources/Logic.Financial.FinancialAccount.resx
index d4048714..f9c46ca6 100644
--- a/Logic/Resources/Logic.Financial.FinancialAccount.resx
+++ b/Logic/Resources/Logic.Financial.FinancialAccount.resx
@@ -368,4 +368,8 @@
Business Services
Like paperwork services, fruit delivery, travel booking, anything that isn't strictly office maintenance
+
+ Maintenance Donations
+ This is donations toward maintenance of the Swarmops / Backoffice.Cash codebase and data.
+
\ No newline at end of file
diff --git a/Logic/Structure/Organization.cs b/Logic/Structure/Organization.cs
index fd171477..17493799 100644
--- a/Logic/Structure/Organization.cs
+++ b/Logic/Structure/Organization.cs
@@ -607,6 +607,15 @@ namespace Swarmops.Logic.Structure
}
}
+ public void EnsureMaintenanceDonationAccountExists()
+ {
+ if (FinancialAccounts[OrganizationFinancialAccountType.CostsBitcoinFees] == null)
+ {
+ FinancialAccounts[OrganizationFinancialAccountType.CostsBitcoinFees] =
+ FinancialAccount.Create(this, "[LOC]Cost_MaintenanceDonations", FinancialAccountType.Cost, FinancialAccounts.CostsBankFees);
+ }
+ }
+
#endregion
#region Public properties
@@ -705,6 +714,20 @@ namespace Swarmops.Logic.Structure
get { return !String.IsNullOrEmpty(OpenLedgersDomain); }
}
+ public Int64 MaintenanceDonationLevelPpm
+ {
+ get
+ {
+ return
+ ObjectOptionalData.ForObject(this)
+ .GetOptionalDataInt64(ObjectOptionalDataType.OrgMaintenanceDonationLevel);
+ }
+ set
+ {
+ ObjectOptionalData.ForObject(this).SetOptionalDataInt64(ObjectOptionalDataType.OrgMaintenanceDonationLevel, value);
+ }
+ }
+
#endregion
#region UptakeGeographies
diff --git a/Site/App_GlobalResources/Pages.Ledgers.designer.cs b/Site/App_GlobalResources/Pages.Ledgers.designer.cs
index 471c1e09..1460125b 100644
--- a/Site/App_GlobalResources/Pages.Ledgers.designer.cs
+++ b/Site/App_GlobalResources/Pages.Ledgers.designer.cs
@@ -1131,6 +1131,15 @@ namespace Resources.Pages {
}
}
+ ///
+ /// Looks up a localized string similar to This is a checklist of things to do to close the previous month and begin the new one with respect to accounting..
+ ///
+ internal static string EndOfMonth_Info {
+ get {
+ return ResourceManager.GetString("EndOfMonth_Info", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Resolve all unmatched accounts.
///
@@ -1140,6 +1149,15 @@ namespace Resources.Pages {
}
}
+ ///
+ /// Looks up a localized string similar to End-of-Month Routine.
+ ///
+ internal static string EndOfMonth_Title {
+ get {
+ return ResourceManager.GetString("EndOfMonth_Title", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Upload Bank Statement ({1}) for {0} for {2}.
///
diff --git a/Site/App_GlobalResources/Pages.Ledgers.resx b/Site/App_GlobalResources/Pages.Ledgers.resx
index a0d0a7a8..44042349 100644
--- a/Site/App_GlobalResources/Pages.Ledgers.resx
+++ b/Site/App_GlobalResources/Pages.Ledgers.resx
@@ -1006,10 +1006,16 @@
Send Reports to Accountants, Shareholders, etc.
This is the header for all items that send reports to external people at the end-of-month routine.
+
+ This is a checklist of things to do to close the previous month and begin the new one with respect to accounting.
+
Resolve all unmatched accounts
This means to match bank transactions with incoming/outgoing expected payments (invoices, expense reports, etc) where it couldn't be done automatically
+
+ End-of-Month Routine
+
Upload Bank Statement ({1}) for {0} for {2}
Parameter zero is the account name, parameter one the format (e.g. PDF), parameter two is the month (e.g. October 2018)
diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx b/Site/Pages/v5/Ledgers/EndOfMonth.aspx
index 39415131..7e10b8c0 100644
--- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx
+++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx
@@ -29,20 +29,17 @@
$('#TableEomItems').datagrid('appendRow', {
itemName: 'Upload/Fetch bank transaction data (FORMAT) up until [lastdatelastmonth]',
- docs: "
",
- actions: "
"
+ action: "
"
});
$('#TableEomItems').datagrid('appendRow', {
itemName: 'Upload bank statement (PDF) for [lastmonth]',
- docs: "
",
- actions: "
"
+ action: "
"
});
$('#TableEomItems').datagrid('appendRow', {
itemName: 'Resolve unmatched ledger transactions',
- docs: "
",
- actions: "
"
+ action: "
"
});
$('#TableEomItems').datagrid('appendRow', {
@@ -61,8 +58,7 @@
$('#TableEomItems').datagrid('appendRow', {
itemName: 'VAT Report for [lastmonth]',
- docs: "
",
- actions: "
"
+ action: "
"
});
/*
@@ -98,7 +94,7 @@
$('#TableEomItems').datagrid('appendRow', {
itemName: 'Close ledgers for [year]',
docs: "
",
- actions: "
"
+ action: "
"
});
@@ -119,7 +115,7 @@
$('#TableEomItems').datagrid('appendRow', {
itemName: 'Send all reports as required',
docs: "
",
- actions: "
"
+ action: "
"
});
@@ -177,9 +173,8 @@
| |
- Todo |
- Docs |
- Actions |
+ Todo |
+ Action |
diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs b/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs
index 4bcc9aa6..33d4c4a2 100644
--- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs
+++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs
@@ -17,6 +17,9 @@ namespace Swarmops.Frontend.Pages.Ledgers
{
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.BookkeepingDetails);
+ this.Title = Resources.Pages.Ledgers.EndOfMonth_Title;
+ this.InfoBoxLiteral = Resources.Pages.Ledgers.EndOfMonth_Info;
+
// Check which reports are required
ItemGroups = new List();
@@ -43,6 +46,7 @@ namespace Swarmops.Frontend.Pages.Ledgers
vatReport.Callback = "CreateVatReport";
vatReport.Name = String.Format(Resources.Pages.Ledgers.EndOfMonth_CreateVatReport, VatReport.NextReportDescription (this.CurrentOrganization));
vatReport.Completed = (vatRequired == ReportRequirement.Completed ? true : false);
+ vatReport.Icon = "document";
group2.Items.Add(vatReport);
}
@@ -69,10 +73,10 @@ namespace Swarmops.Frontend.Pages.Ledgers
builder.AppendFormat(@"
- $('#TableEomItems').datagrid('appendRow', {
- itemGroupName: '',
+ $('#TableEomItems').datagrid('appendRow', " + '{' + @"
+ itemGroupName: '{0}',
itemId: '{1}'
- });
+ " + '}' + @");
rowCount = $('#TableEomItems').datagrid('getRows').length;
@@ -83,11 +87,17 @@ namespace Swarmops.Frontend.Pages.Ledgers
field: 'itemGroupName'
});
- ", group.Header.Replace(" ", " "), group.Id);
+ ", group.Header.Replace(" ", " ").Replace("'", "''"), group.Id);
foreach (EomItem item in group.Items)
{
-
+ builder.AppendFormat(@"
+ $('#TableEomItems').datagrid('appendRow', " + '{' + @"
+ itemName: '{0}',
+ docs: ""
"",
+ actions: ""
""
+ });
+ ", item.Name);
}
}
}
@@ -101,6 +111,7 @@ namespace Swarmops.Frontend.Pages.Ledgers
{
public string Id { get; set; }
public string Name { get; set; }
+ public string Icon { get; set; }
public string Callback { get; set; }
public bool Completed { get; set; }
}
diff --git a/Site/Site.csproj b/Site/Site.csproj
index cb064e77..5c92cee9 100644
--- a/Site/Site.csproj
+++ b/Site/Site.csproj
@@ -1349,6 +1349,8 @@
+
+