Added Download to General LEdger, too

This commit is contained in:
Rick Falkvinge
2018-03-05 16:36:14 +01:00
parent b556b8e669
commit 517b49f9e3
6 changed files with 19 additions and 8 deletions
+9
View File
@@ -519,6 +519,15 @@ namespace Resources {
}
}
/// <summary>
/// Looks up a localized string similar to General Ledger.
/// </summary>
internal static string Financial_GeneralLedger {
get {
return ResourceManager.GetString("Financial_GeneralLedger", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Invoices.
/// </summary>
+3
View File
@@ -982,4 +982,7 @@
<value>Submit</value>
<comment>As in "Submit this data for processing"</comment>
</data>
<data name="Financial_GeneralLedger" xml:space="preserve">
<value>General Ledger</value>
</data>
</root>
+2 -2
View File
@@ -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"));
});
}
});
@@ -116,7 +116,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
string description = transaction.Description;
string hasDoxString =
"<img src='/Images/Icons/iconshock-search-256px.png' onmouseover=\"this.src='/Images/Icons/iconshock-search-hot-256px.png';\" onmouseout=\"this.src='/Images/Icons/iconshock-search-256px.png';\" data-txid='{0}' class='LocalIconGeneralViewDoc' style='cursor:pointer' height='20' width='20' />";
"<img src='/Images/Icons/iconshock-search-256px.png' onmouseover=\\\"this.src='/Images/Icons/iconshock-search-hot-256px.png';\\\" onmouseout=\\\"this.src='/Images/Icons/iconshock-search-256px.png';\\\" data-txid='{0}' class='LocalViewDox' style='cursor:pointer' height='20' width='20' />" +
"<img src='/Images/Icons/iconshock-download-240px.png' onmouseover=\\\"this.src='/Images/Icons/iconshock-download-hot-240px.png';\\\" onmouseout=\\\"this.src='/Images/Icons/iconshock-download-240px.png';\\\" data-docid='{1}' data-docname=\\\"{2}\\\" class='LocalDownloadDox' style='cursor:pointer' height='18' width='18' />";
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)) + "<span class='hiddenDocLinks'>" + actionHtml + "</span>";
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")) + "<span class='hiddenDocLinks'>" + actionHtml + "</span>";
}
result.Append("{" + String.Format(
@@ -170,7 +170,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
runningBalance += row.AmountCents;
string hasDoxString =
"<img src='/Images/Icons/iconshock-search-256px.png' onmouseover=\"this.src='/Images/Icons/iconshock-search-hot-256px.png';\" onmouseout=\"this.src='/Images/Icons/iconshock-search-256px.png';\" txId='{0}' class='LocalIconInspect' style='cursor:pointer' height='20' width='20' />";
"<img src='/Images/Icons/iconshock-search-256px.png' onmouseover=\"this.src='/Images/Icons/iconshock-search-hot-256px.png';\" onmouseout=\"this.src='/Images/Icons/iconshock-search-256px.png';\" data-txid='{0}' class='LocalIconInspect' style='cursor:pointer' height='20' width='20' />";
string actionHtml = String.Format (hasDoxString, row.FinancialTransactionId.ToString (CultureInfo.InvariantCulture));
@@ -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)
{