Work on EOM
This commit is contained in:
+2
-2
@@ -1186,7 +1186,7 @@ namespace Resources.Pages {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Upload Bank Statement ({1}) for {0} for {2}.
|
||||
/// Looks up a localized string similar to Upload Bank <strong>Statement</strong> ({1}) for {0} for {2}.
|
||||
/// </summary>
|
||||
internal static string EndOfMonth_UploadBankStatementFor {
|
||||
get {
|
||||
@@ -1195,7 +1195,7 @@ namespace Resources.Pages {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Upload Transaction Data ({1}) for {0}.
|
||||
/// Looks up a localized string similar to Upload <strong>Transaction Data</strong> ({1}) for {0}.
|
||||
/// </summary>
|
||||
internal static string EndOfMonth_UploadTransactionDataFor {
|
||||
get {
|
||||
|
||||
@@ -1018,11 +1018,11 @@
|
||||
<comment>Parameter zero is the month that's just ended</comment>
|
||||
</data>
|
||||
<data name="EndOfMonth_UploadBankStatementFor" xml:space="preserve">
|
||||
<value>Upload Bank Statement ({1}) for {0} for {2}</value>
|
||||
<value>Upload Bank <strong>Statement</strong> ({1}) for {0} for {2}</value>
|
||||
<comment>Parameter zero is the account name, parameter one the format (e.g. PDF), parameter two is the month (e.g. October 2018)</comment>
|
||||
</data>
|
||||
<data name="EndOfMonth_UploadTransactionDataFor" xml:space="preserve">
|
||||
<value>Upload Transaction Data ({1}) for {0}</value>
|
||||
<value>Upload <strong>Transaction Data</strong> ({1}) for {0}</value>
|
||||
<comment>Parameter zero is the account name, parameter one is the format (e.g. XML or CSV)</comment>
|
||||
</data>
|
||||
<data name="EndOfMonth_SkipBankStatementDialog" xml:space="preserve">
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
// set action icons to their respective initial icons
|
||||
|
||||
$('img.eomitem-wrench').attr('src', '/Images/Icons/iconshock-balloon-wrench-128x96px.png');
|
||||
$('img.eomitem-document').attr('src', '/Images/Icons/iconshock-balloon-invoice-128x96px.png');
|
||||
$('img.eomitem-upload').attr('src', '/Images/Icons/iconshock-upload-128x96px.png');
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
group1.Header = Resources.Pages.Ledgers.EndOfMonth_Header_ExternalData;
|
||||
group1.Id = "ExternalData";
|
||||
|
||||
string lastUploadItemId = string.Empty;
|
||||
|
||||
// Iterate over all Balance accounts and check for automation;
|
||||
// if so, add it to an upload sequence
|
||||
|
||||
@@ -94,9 +96,27 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
group1.Items.Add(bankStatement);
|
||||
}
|
||||
|
||||
// Add data upload item
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// If there are any items in Group 1, OR if an account matching is necessary, then
|
||||
// add that as an action item
|
||||
|
||||
if (group1.Items.Count() > 0 || FinancialTransactions.GetUnbalanced(this.CurrentOrganization).Count() > 0)
|
||||
{
|
||||
EomItem matchAccounts = new EomItem();
|
||||
matchAccounts.DependsOn = lastUploadItemId; // may be empty if there's nothing to upload and that's ok
|
||||
matchAccounts.Id = "MatchAccounts";
|
||||
matchAccounts.Completed = false; // we already know there's at least one unbalanced
|
||||
matchAccounts.Icon = "wrench";
|
||||
matchAccounts.Skippable = false;
|
||||
matchAccounts.Name = Resources.Pages.Ledgers.EndOfMonth_MatchAccounts;
|
||||
|
||||
group1.Items.Add(matchAccounts);
|
||||
}
|
||||
|
||||
if (group1.Items.Count > 0)
|
||||
{
|
||||
ItemGroups.Add(group1);
|
||||
|
||||
Reference in New Issue
Block a user