Cosmetics
This commit is contained in:
@@ -278,6 +278,27 @@ namespace Swarmops.Logic.Financial
|
||||
}
|
||||
}
|
||||
|
||||
public string DescriptionShort
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (MonthCount)
|
||||
{
|
||||
case 1:
|
||||
return String.Format("{0:MMM yyyy}",
|
||||
new DateTime(YearMonthStart / 100, YearMonthStart % 100, 2));
|
||||
case 12:
|
||||
return String.Format("{0}",
|
||||
YearMonthStart / 100);
|
||||
default:
|
||||
DateTime start = new DateTime(YearMonthStart / 100, YearMonthStart % 100, 2);
|
||||
|
||||
return String.Format("{0:MMM}-{1:MMM yyyy}",
|
||||
start, start.AddMonths(MonthCount - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private new int OpenTransactionId
|
||||
{
|
||||
get
|
||||
|
||||
+45
@@ -1437,6 +1437,51 @@ namespace Resources.Pages {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This transaction closes the VAT report for {0}..
|
||||
/// </summary>
|
||||
internal static string InspectLedgers_TxInfo_CloseVatReport {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectLedgers_TxInfo_CloseVatReport", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This transaction opens the VAT report for {0}..
|
||||
/// </summary>
|
||||
internal static string InspectLedgers_TxInfo_OpenVatReport {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectLedgers_TxInfo_OpenVatReport", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This transaction receives payment for Outbound Invoice #{0:N0}..
|
||||
/// </summary>
|
||||
internal static string InspectLedgers_TxInfo_PaymentInvoice {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectLedgers_TxInfo_PaymentInvoice", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This transaction pays {0}..
|
||||
/// </summary>
|
||||
internal static string InspectLedgers_TxInfo_PayoutGeneric {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectLedgers_TxInfo_PayoutGeneric", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This transaction pays Inbound Invoice #{0:N0} from {1}..
|
||||
/// </summary>
|
||||
internal static string InspectLedgers_TxInfo_PayoutInvoice {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectLedgers_TxInfo_PayoutInvoice", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Transaction is <span class="spanAnnoyingBlink">UNBALANCED:</span> missing amount.
|
||||
/// </summary>
|
||||
|
||||
@@ -959,4 +959,21 @@
|
||||
<value>General Ledger for</value>
|
||||
<comment>This phrase is followed by dropdowns for year and month</comment>
|
||||
</data>
|
||||
<data name="InspectLedgers_TxInfo_CloseVatReport" xml:space="preserve">
|
||||
<value>This transaction closes the VAT report for {0}.</value>
|
||||
<comment>{0} will be a time period, like "Jan 2017".</comment>
|
||||
</data>
|
||||
<data name="InspectLedgers_TxInfo_OpenVatReport" xml:space="preserve">
|
||||
<value>This transaction opens the VAT report for {0}.</value>
|
||||
<comment>{0} will be a time period, like "Jan 2017".</comment>
|
||||
</data>
|
||||
<data name="InspectLedgers_TxInfo_PaymentInvoice" xml:space="preserve">
|
||||
<value>This transaction receives payment for Outbound Invoice #{0:N0}.</value>
|
||||
</data>
|
||||
<data name="InspectLedgers_TxInfo_PayoutGeneric" xml:space="preserve">
|
||||
<value>This transaction pays {0}.</value>
|
||||
</data>
|
||||
<data name="InspectLedgers_TxInfo_PayoutInvoice" xml:space="preserve">
|
||||
<value>This transaction pays Inbound Invoice #{0:N0} from {1}.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -401,10 +401,10 @@
|
||||
|
||||
<table id="treeGeneralLedger" class="easyui-treegrid" style="width: 680px; height: 500px"
|
||||
data-options="rownumbers:false,singleSelect:false,nowrap:false,fitColumns:true,fit:false,showFooter:false,loading:false,selectOnCheck:true,checkOnSelect:true,url:''"
|
||||
idField="id" treeField="id">
|
||||
idField="id" treeField="idDisplay">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'id',width:110"><asp:Label ID="LabelTreeHeaderId" runat="server" Text="ID#"/></th>
|
||||
<th data-options="field:'idDisplay',width:110"><asp:Label ID="LabelTreeHeaderId" runat="server" Text="ID#"/></th>
|
||||
<th data-options="field:'datetime',width:90,sortable:true"><asp:Label ID="LabelTreeHeaderDateTime" runat="server" Text="XYZ DateTime" /></th>
|
||||
<th data-options="field:'txDescription',width:200"><asp:Label ID="LabelTreeHeaderDescriptionAccount" runat="server" Text="XYZ Description, Account" /></th>
|
||||
<th data-options="field:'deltaPos',width:70,align:'right'"><asp:Label ID="LabelTreeHeaderDeltaPositive" runat="server" Text="XYZ Debit" /></th>
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Common.Interfaces;
|
||||
using Swarmops.Logic.Financial;
|
||||
using Swarmops.Logic.Security;
|
||||
using Swarmops.Logic.Support;
|
||||
@@ -139,13 +140,38 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
}
|
||||
|
||||
result.Append("{" + String.Format(
|
||||
"\"id\":\"{0:N0}\",\"datetime\":\"<span class='weight-more-emphasis'>{1:MMM-dd HH:mm}</span>\",\"txDescription\":\"<span class='weight-more-emphasis tx-description'>{2}</span>\",\"action\":\"{3}\"," +
|
||||
"\"id\":\"{0:N0}\",\"idDisplay\":\"<span class='weight-more-emphasis'>{0:N0}</span>\",\"datetime\":\"<span class='weight-more-emphasis'>{1:MMM-dd HH:mm}</span>\",\"txDescription\":\"<span class='weight-more-emphasis tx-description'>{2}</span>\",\"action\":\"{3}\"," +
|
||||
"\"state\":\"open\",\"children\":[",
|
||||
row.Transaction.OrganizationSequenceId,
|
||||
row.TransactionDateTime,
|
||||
JsonSanitize(description),
|
||||
JsonSanitize(actionHtml)));
|
||||
|
||||
if (transaction.Dependency != null)
|
||||
{
|
||||
IHasIdentity dependency = transaction.Dependency;
|
||||
string info = string.Empty;
|
||||
Documents docs = null;
|
||||
|
||||
if (dependency is VatReport)
|
||||
{
|
||||
VatReport report = (VatReport) dependency;
|
||||
if (report.OpenTransactionId == transaction.Identity)
|
||||
{
|
||||
info = String.Format(Resources.Pages.Ledgers.InspectLedgers_TxInfo_OpenVatReport,
|
||||
report.DescriptionShort);
|
||||
}
|
||||
else if (report.CloseTransactionId == transaction.Identity)
|
||||
{
|
||||
info = String.Format(Resources.Pages.Ledgers.InspectLedgers_TxInfo_CloseVatReport,
|
||||
report.DescriptionShort);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Continue here with adding Info row under transactions where it's helpful
|
||||
// TODO: Remember that the Info row needs cell merging, colspan=5 or =6
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
result.Append("{" + String.Format(
|
||||
@@ -225,7 +251,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
}
|
||||
|
||||
result.Append ("{" + String.Format (
|
||||
"\"id\":\"{0:N0}-{6:N0}\",\"datetime\":\"{1}\",\"txDescription\":\"{2}\"," +
|
||||
"\"id\":\"{0:N0}-{6:N0}\",\"idDisplay\":\"{0:N0}:{6:N0}\",\"datetime\":\"{1}\",\"txDescription\":\"{2}\"," +
|
||||
"\"deltaPos\":\"{3}\",\"deltaNeg\":\"{4}\",\"balance\":\"{5:N2}\"",
|
||||
row.Transaction.OrganizationSequenceId,
|
||||
JsonSanitize (accountClass),
|
||||
|
||||
Reference in New Issue
Block a user