From 517b49f9e38e8d80370e5ef28b7fe05b42cf71c6 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 5 Mar 2018 16:36:14 +0100 Subject: [PATCH] Added Download to General LEdger, too --- Site/App_GlobalResources/Global.designer.cs | 9 +++++++++ Site/App_GlobalResources/Global.resx | 3 +++ Site/Pages/v5/Ledgers/InspectLedgers.aspx | 4 ++-- Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs | 5 +++-- Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs | 2 +- Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs | 4 +--- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Site/App_GlobalResources/Global.designer.cs b/Site/App_GlobalResources/Global.designer.cs index 4374242f..45b77d2b 100644 --- a/Site/App_GlobalResources/Global.designer.cs +++ b/Site/App_GlobalResources/Global.designer.cs @@ -519,6 +519,15 @@ namespace Resources { } } + /// + /// Looks up a localized string similar to General Ledger. + /// + internal static string Financial_GeneralLedger { + get { + return ResourceManager.GetString("Financial_GeneralLedger", resourceCulture); + } + } + /// /// Looks up a localized string similar to Invoices. /// diff --git a/Site/App_GlobalResources/Global.resx b/Site/App_GlobalResources/Global.resx index 8f1db949..134e4753 100644 --- a/Site/App_GlobalResources/Global.resx +++ b/Site/App_GlobalResources/Global.resx @@ -982,4 +982,7 @@ Submit As in "Submit this data for processing" + + General Ledger + \ No newline at end of file diff --git a/Site/Pages/v5/Ledgers/InspectLedgers.aspx b/Site/Pages/v5/Ledgers/InspectLedgers.aspx index ddbef7c9..69a76bda 100644 --- a/Site/Pages/v5/Ledgers/InspectLedgers.aspx +++ b/Site/Pages/v5/Ledgers/InspectLedgers.aspx @@ -52,12 +52,12 @@ // Enable various actions on icon $('img.LocalIconFlag').click(function() { - inspectingTransactionId = $(this).attr("txId"); + inspectingTransactionId = $(this).attr("data-txid"); onFlagTransaction("Add Tx Id here"); }); $('img.LocalIconInspect').click(function() { - onInspectTransaction($(this).attr("txId")); + onInspectTransaction($(this).attr("data-txid")); }); } }); diff --git a/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs b/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs index b35fe7f4..52e0ebac 100644 --- a/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs @@ -116,7 +116,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers string description = transaction.Description; string hasDoxString = - ""; + "" + + ""; string actionHtml = string.Empty; @@ -130,7 +131,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers doc.Identity, doc.ClientFileName.Replace("\"", "'"), transaction.Identity); } - actionHtml = String.Format(hasDoxString, row.FinancialTransactionId.ToString(CultureInfo.InvariantCulture)) + "" + actionHtml + ""; + actionHtml = String.Format(hasDoxString, row.FinancialTransactionId.ToString(CultureInfo.InvariantCulture), documents[0].Identity, CurrentOrganization.Name + " - " + Resources.Global.Financial_GeneralLedger + " " + transaction.DateTime.ToShortDateString() + " - " + Resources.Global.Financial_TransactionIdShort + transaction.Identity.ToString("N0")) + "" + actionHtml + ""; } result.Append("{" + String.Format( diff --git a/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs b/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs index ba39fe31..e5f3052b 100644 --- a/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs @@ -170,7 +170,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers runningBalance += row.AmountCents; string hasDoxString = - ""; + ""; string actionHtml = String.Format (hasDoxString, row.FinancialTransactionId.ToString (CultureInfo.InvariantCulture)); diff --git a/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs b/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs index 102d1431..c95f749f 100644 --- a/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs @@ -90,9 +90,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers include = true; } - Documents documents = transaction.Dependency != null - ? Documents.ForObject(transaction.Dependency) - : Documents.ForObject(transaction); + Documents documents = Documents.ForObject(transaction.Dependency ?? transaction); if (documents.Count > 0) {