Dumbfix VI

This commit is contained in:
Rick Falkvinge
2018-03-05 15:59:04 +01:00
parent a84c97b30e
commit c235acb16b
@@ -55,8 +55,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
List<string> lines = new List<string>();
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-docid='{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='{0}' data-docname=\\\"{1}\\\" class='LocalDownloadDox' style='cursor:pointer' height='18' width='18' />";
"<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' />";
foreach (VatReportItem item in items)
{
@@ -90,10 +90,13 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
include = true;
}
if (transaction.Dependency != null || Documents.ForObject(transaction).Count > 0)
{
Documents documents = transaction.Dependency != null
? Documents.ForObject(transaction.Dependency)
: Documents.ForObject(transaction);
element += String.Format(",\"dox\":\"" + hasDoxString + "\"", transaction.Identity, CurrentOrganization.Name + " - " + report.DescriptionShort + " - " + Resources.Global.Financial_TransactionIdShort + " " + transaction.Identity.ToString("N2"));
if (documents.Count > 0)
{
element += String.Format(",\"dox\":\"" + hasDoxString + "\"", transaction.Identity, documents[0].Identity, CurrentOrganization.Name + " - " + report.DescriptionShort + " - " + Resources.Global.Financial_TransactionIdShort + " " + transaction.Identity.ToString("N2"));
}
if (include)