From 157cd3413e187ba2da6c1e9c0f6881882e293e1f Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 19 Dec 2018 19:27:30 +0100 Subject: [PATCH] Added some loc --- .../Pages.Ledgers.designer.cs | 9 +++ Site/App_GlobalResources/Pages.Ledgers.resx | 3 + Site/Pages/v5/Ledgers/EndOfMonth.aspx | 6 +- Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs | 75 +++++++++++++++---- 4 files changed, 76 insertions(+), 17 deletions(-) diff --git a/Site/App_GlobalResources/Pages.Ledgers.designer.cs b/Site/App_GlobalResources/Pages.Ledgers.designer.cs index e48a5512..fb205a8a 100644 --- a/Site/App_GlobalResources/Pages.Ledgers.designer.cs +++ b/Site/App_GlobalResources/Pages.Ledgers.designer.cs @@ -1158,6 +1158,15 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to <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.. + /// + internal static string EndOfMonth_SkipDocumentDialogGeneric { + get { + return ResourceManager.GetString("EndOfMonth_SkipDocumentDialogGeneric", resourceCulture); + } + } + /// /// Looks up a localized string similar to End-of-Month Routine: {0:MMMM yyyy}. /// diff --git a/Site/App_GlobalResources/Pages.Ledgers.resx b/Site/App_GlobalResources/Pages.Ledgers.resx index 0343b66f..87726112 100644 --- a/Site/App_GlobalResources/Pages.Ledgers.resx +++ b/Site/App_GlobalResources/Pages.Ledgers.resx @@ -1028,4 +1028,7 @@ <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. + + <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. + \ No newline at end of file diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx b/Site/Pages/v5/Ledgers/EndOfMonth.aspx index d0b0887c..10318bca 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx @@ -240,6 +240,10 @@ var triggeredUpload = null; var activeUpload = null; + var localized_skipNoResponse = SwarmopsJS.unescape('<%=this.Localized_SkipNo%>'); + var localized_skipYesResponse = SwarmopsJS.unescape('<%=this.Localized_SkipYes%>'); + var localized_skipPromptBankStatement = SwarmopsJS.unescape('<%=this.Localized_SkipPrompt_BankStatement%>'); + var localized_skipPromptGeneric = SwarmopsJS.unescape('<%=this.Localized_SkipPrompt_Generic%>'); // Function: Match all mismatched transactions @@ -290,7 +294,7 @@ transition: all 0.50s;*/ } - .action-skip-disabled { + .action-list-item .action-skip-disabled { display: none !important; } diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs b/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs index d7c2d580..106fa6d3 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx.cs @@ -24,8 +24,8 @@ namespace Swarmops.Frontend.Pages.Ledgers this.PageTitle = this.Title = - this.LabelHeader.Text = - String.Format(Resources.Pages.Ledgers.EndOfMonth_Title, DateTime.UtcNow.AddMonths(-1)); + this.LabelHeader.Text = + String.Format(Resources.Pages.Ledgers.EndOfMonth_Title, DateTime.UtcNow.AddMonths(-1)); this.InfoBoxLiteral = Resources.Pages.Ledgers.EndOfMonth_Info; @@ -55,13 +55,15 @@ namespace Swarmops.Frontend.Pages.Ledgers // This account has automation // If automation has Bank Account Statement enabled (assume true for now): - FinancialAccountDocument lastBankStatement = assetAccount.GetMostRecentDocument(FinancialAccountDocumentType.BankStatement); - int lastStatementMonth = (this.CurrentOrganization.FirstFiscalYear-1) *100 + 12; // December of the year before + FinancialAccountDocument lastBankStatement = + assetAccount.GetMostRecentDocument(FinancialAccountDocumentType.BankStatement); + int lastStatementMonth = (this.CurrentOrganization.FirstFiscalYear - 1)*100 + 12; + // December of the year before if (lastBankStatement != null) { lastStatementMonth = lastBankStatement.ConcernsPeriodStart.Year*100 + - lastBankStatement.ConcernsPeriodStart.Month; + lastBankStatement.ConcernsPeriodStart.Month; skippable = false; } @@ -79,9 +81,11 @@ namespace Swarmops.Frontend.Pages.Ledgers EomItem bankStatement = new EomItem(); bankStatement.DependsOn = lastId; // empty for first record bankStatement.Id = lastId = "BankStatement-" + - assetAccount.Identity.ToString(CultureInfo.InvariantCulture) + monthIterator; + assetAccount.Identity.ToString(CultureInfo.InvariantCulture) + + monthIterator; bankStatement.Name = string.Format(Resources.Pages.Ledgers.EndOfMonth_UploadBankStatementFor, - assetAccount.Name, "PDF", new DateTime(monthIterator / 100, monthIterator % 100, 15).ToString("MMMM yyyy")); + assetAccount.Name, "PDF", + new DateTime(monthIterator/100, monthIterator%100, 15).ToString("MMMM yyyy")); bankStatement.Completed = false; // TODO bankStatement.Icon = "upload"; bankStatement.Skippable = skippable; @@ -157,8 +161,12 @@ namespace Swarmops.Frontend.Pages.Ledgers builder.Append(@" $('#TableEomItems').datagrid('appendRow', { - itemGroupName: '" + group.Header.Replace(" ", " ").Replace("'", "''") + @"', - action: """", + itemGroupName: '" + + group.Header.Replace(" ", " ").Replace("'", "''") + @"', + action: """", itemId: '" + group.Id + @"' }); @@ -172,7 +180,7 @@ namespace Swarmops.Frontend.Pages.Ledgers }); "); - + foreach (EomItem item in group.Items) { if (!item.Completed) @@ -202,8 +210,19 @@ namespace Swarmops.Frontend.Pages.Ledgers builder.Append(@" $('#TableEomItems').datagrid('appendRow', { - itemName: """ + itemName + @""", - action: """" + itemName: """ + itemName + @""", + action: """" }); "); } @@ -211,19 +230,22 @@ namespace Swarmops.Frontend.Pages.Ledgers { builder.Append(@" $('#TableEomItems').datagrid('appendRow', { - itemName: """ + item.Name + @""", - action: """" + itemName: """ + item.Name + @""", + action: """" }); "); } } - previousGroupId = group.Id; // only set if group has items + previousGroupId = group.Id; // only set if group has items } } return builder.ToString(); - + } } @@ -267,5 +289,26 @@ namespace Swarmops.Frontend.Pages.Ledgers } private List ItemGroups { get; set; } + + + public string Localized_SkipPrompt_BankStatement + { + get { return CommonV5.JavascriptEscape(Resources.Pages.Ledgers.EndOfMonth_SkipBankStatementDialog); } + } + + public string Localized_SkipPrompt_Generic + { + get { return CommonV5.JavascriptEscape(Resources.Pages.Ledgers.EndOfMonth_SkipDocumentDialogGeneric); } + } + + public string Localized_SkipYes + { + get { return CommonV5.JavascriptEscape(Resources.Global.Global_SkipYes); } + } + + public string Localized_SkipNo + { + get { return CommonV5.JavascriptEscape(Resources.Global.Global_SkipNo); } + } } } \ No newline at end of file