Work on General Ledger

This commit is contained in:
Rick Falkvinge
2018-01-01 18:33:13 +01:00
parent 575ce5cb71
commit 2770fdae8d
9 changed files with 206 additions and 31 deletions
+18
View File
@@ -1149,6 +1149,15 @@ namespace Resources.Pages {
}
}
/// <summary>
/// Looks up a localized string similar to Description / Account.
/// </summary>
internal static string InspectLedgers_Detail {
get {
return ResourceManager.GetString("InspectLedgers_Detail", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Viewing/Editing Transaction #&lt;span id=&quot;spanModalTransactionId&quot;&gt;67890&lt;/span&gt;.
/// </summary>
@@ -1176,6 +1185,15 @@ namespace Resources.Pages {
}
}
/// <summary>
/// Looks up a localized string similar to General Ledger for.
/// </summary>
internal static string InspectLedgers_GeneralLedger {
get {
return ResourceManager.GetString("InspectLedgers_GeneralLedger", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Add rows to transaction.
/// </summary>
@@ -951,4 +951,12 @@
<data name="BalanceTransactions_ModalDialog_RadioPurchase" xml:space="preserve">
<value>Mark this as a direct-from-account purchase?</value>
</data>
<data name="InspectLedgers_Detail" xml:space="preserve">
<value>Description / Account</value>
<comment>As in, description of a transaction OR the full name of an account</comment>
</data>
<data name="InspectLedgers_GeneralLedger" xml:space="preserve">
<value>General Ledger for</value>
<comment>This phrase is followed by dropdowns for year and month</comment>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

+47 -17
View File
@@ -12,6 +12,7 @@
<script type="text/javascript">
$(document).ready(function() {
$('#divTabs').tabs();
$('#divActionAddTransaction').click(function() {
if (canWriteRows) {
@@ -339,24 +340,48 @@
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<h2><asp:Label ID="LabelHeaderInspect" runat="server" /> <Swarmops5:ComboBudgets Layout="Horizontal" ID="DropBudgets" OnClientSelect=" onAccountSelected " ListType="All" runat="server" /> <asp:Label ID="LabelHeaderInspectFor" runat="server" /> <asp:DropDownList runat="server" ID="DropYears"/> <asp:DropDownList runat="server" ID="DropMonths"/></h2>
<table id="gridLedgers" class="easyui-datagrid" 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:'Json-InspectLedgerData.aspx'"
idField="id">
<thead>
<tr>
<th data-options="field:'id',width:70,align:'right'"><asp:Label ID="LabelGridHeaderId" runat="server" Text="ID#"/></th>
<th data-options="field:'datetime',width:90,sortable:true"><asp:Label ID="LabelGridHeaderDateTime" runat="server" Text="XYZ DateTime" /></th>
<th data-options="field:'description',width:250"><asp:Label ID="LabelGridHeaderDescription" runat="server" Text="XYZ Description" /></th>
<th data-options="field:'deltaPos',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaPositive" runat="server" Text="XYZ Debit" /></th>
<th data-options="field:'deltaNeg',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaNegative" runat="server" Text="XYZ Credit" /></th>
<th data-options="field:'balance',width:80,align:'right'"><asp:Label ID="LabelGridHeaderBalance" runat="server" Text="XYZ Balance" /></th>
<th data-options="field:'action',width:43,align:'center'"><asp:Label ID="LabelGridHeaderAction" runat="server" Text="XYZAct" /></th>
</tr>
</thead>
</table>
<div id="divTabs" class="easyui-tabs" data-options="tabWidth:70,tabHeight:70">
<div class="tab" title="<img src='/Images/Icons/iconshock-groups-docs-lists-64px.png' height='64' width='64' />">
<h2><asp:Label ID="LabelHeaderGeneral" runat="server" /> <asp:Label ID="Label2" runat="server" /> <asp:DropDownList runat="server" ID="DropGeneralYears"/> <asp:DropDownList runat="server" ID="DropGeneralMonths"/></h2>
<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:'Json-GeneralLedgerData.aspx'"
idField="id" treeField="id">
<thead>
<tr>
<th data-options="field:'id',width:70,align:'right'"><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:'description',width:250"><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>
<th data-options="field:'deltaNeg',width:70,align:'right'"><asp:Label ID="LabelTreeHeaderDeltaNegative" runat="server" Text="XYZ Credit" /></th>
<th data-options="field:'balance',width:80,align:'right'"><asp:Label ID="LabelTreeHeaderBalance" runat="server" Text="XYZ Balance" /></th>
<th data-options="field:'action',width:43,align:'center'"><asp:Label ID="LabelTreeHeaderAction" runat="server" Text="XYZAct" /></th>
</tr>
</thead>
</table>
</div>
<div class="tab" title="<img src='/Images/Icons/iconshock-search-256px.png' height='64' width='64' />">
<h2><asp:Label ID="LabelHeaderInspect" runat="server" /> <Swarmops5:ComboBudgets Layout="Horizontal" ID="DropBudgets" OnClientSelect=" onAccountSelected " ListType="All" runat="server" /> <asp:Label ID="LabelHeaderInspectFor" runat="server" /> <asp:DropDownList runat="server" ID="DropYears"/> <asp:DropDownList runat="server" ID="DropMonths"/></h2>
<table id="gridLedgers" class="easyui-datagrid" 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:'Json-InspectLedgerData.aspx'"
idField="id">
<thead>
<tr>
<th data-options="field:'id',width:70,align:'right'"><asp:Label ID="LabelGridHeaderId" runat="server" Text="ID#"/></th>
<th data-options="field:'datetime',width:90,sortable:true"><asp:Label ID="LabelGridHeaderDateTime" runat="server" Text="XYZ DateTime" /></th>
<th data-options="field:'description',width:250"><asp:Label ID="LabelGridHeaderDescription" runat="server" Text="XYZ Description" /></th>
<th data-options="field:'deltaPos',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaPositive" runat="server" Text="XYZ Debit" /></th>
<th data-options="field:'deltaNeg',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaNegative" runat="server" Text="XYZ Credit" /></th>
<th data-options="field:'balance',width:80,align:'right'"><asp:Label ID="LabelGridHeaderBalance" runat="server" Text="XYZ Balance" /></th>
<th data-options="field:'action',width:43,align:'center'"><asp:Label ID="LabelGridHeaderAction" runat="server" Text="XYZAct" /></th>
</tr>
</thead>
</table>
</div>
</div>
<Swarmops5:ModalDialog ID="DialogEditTx" OnClientClose="onModalClose" runat="server">
<DialogCode>
@@ -379,7 +404,12 @@
<div id="divEditTransaction">
<h2><asp:Label ID="LabelAddTransactionRowsHeader" runat="server" /></h2>
<span class="content"><h2 style="border-bottom: none"><asp:Label ID="LabelAddRowAccount" runat="server" /><Swarmops5:ComboBudgets ID="BudgetAddRow" ListType="All" runat="server" Layout="Horizontal" />, <asp:Label ID="LabelAddRowAmount" runat="server" /> <Swarmops5:CurrencyTextBox ID="TextInsertAmount" Layout="Horizontal" runat="server" /> <span class="elementFloatFar"><input id="ButtonAddTransactionRow" type="button" value='#AddRow#'/></span></h2></span>
<div id="divTransactionDocumentation">
<h2><asp:Label runat="server" ID="LabelTransactionDocumentation"/></h2>
<asp:Label runat="server" ID="LabelTransactionHasDocumentation" Text="This transaction has X pages of documentation: "/>&nbsp;<span id="spanLabelDocumentationPages"></span>
</div>
</div>
<div id="divTransactionTracking">
<h2><asp:Label ID="LabelTrackedTransactionHeader" runat="server" /></h2>
+8 -6
View File
@@ -67,13 +67,15 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
{
this.LabelHeaderInspect.Text = Resources.Pages.Ledgers.InspectLedgers_Header_Inspect;
this.LabelHeaderInspectFor.Text = Resources.Pages.Ledgers.InspectLedgers_Header_For;
this.LabelGridHeaderAction.Text = Global.Global_Action;
this.LabelGridHeaderBalance.Text = Global.Ledgers_Balance;
this.LabelGridHeaderDateTime.Text = Global.Global_Timestamp;
this.LabelGridHeaderDeltaNegative.Text = Global.Ledgers_Credit;
this.LabelGridHeaderDeltaPositive.Text = Global.Ledgers_Debit;
this.LabelGridHeaderAction.Text = this.LabelTreeHeaderAction.Text = Global.Global_Action;
this.LabelGridHeaderBalance.Text = this.LabelTreeHeaderBalance.Text = Global.Ledgers_Balance;
this.LabelGridHeaderDateTime.Text = this.LabelTreeHeaderDateTime.Text = Global.Global_Timestamp;
this.LabelGridHeaderDeltaNegative.Text = this.LabelTreeHeaderDeltaNegative.Text = Global.Ledgers_Credit;
this.LabelGridHeaderDeltaPositive.Text = this.LabelTreeHeaderDeltaPositive.Text = Global.Ledgers_Debit;
this.LabelGridHeaderDescription.Text = Global.Global_Description;
this.LabelGridHeaderId.Text = Resources.Pages.Ledgers.InspectLedgers_TransactionId;
this.LabelTreeHeaderDescriptionAccount.Text = Resources.Pages.Ledgers.InspectLedgers_Detail;
this.LabelGridHeaderId.Text = this.LabelTreeHeaderId.Text = Resources.Pages.Ledgers.InspectLedgers_TransactionId;
this.LabelGridHeaderAccountName.Text = Resources.Pages.Ledgers.InspectLedgers_AccountName;
+117
View File
@@ -75,6 +75,105 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers {
/// </remarks>
protected global::System.Web.UI.WebControls.Literal LiteralAddRowButton;
/// <summary>
/// LabelHeaderGeneral control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelHeaderGeneral;
/// <summary>
/// Label2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// DropGeneralYears control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList DropGeneralYears;
/// <summary>
/// DropGeneralMonths control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList DropGeneralMonths;
/// <summary>
/// LabelTreeHeaderId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderId;
/// <summary>
/// LabelTreeHeaderDateTime control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderDateTime;
/// <summary>
/// LabelTreeHeaderDescriptionAccount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderDescriptionAccount;
/// <summary>
/// LabelTreeHeaderDeltaPositive control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderDeltaPositive;
/// <summary>
/// LabelTreeHeaderDeltaNegative control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderDeltaNegative;
/// <summary>
/// LabelTreeHeaderBalance control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderBalance;
/// <summary>
/// LabelTreeHeaderAction control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTreeHeaderAction;
/// <summary>
/// LabelHeaderInspect control.
/// </summary>
@@ -291,6 +390,24 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers {
/// </remarks>
protected global::Swarmops.Frontend.Controls.Financial.CurrencyTextBox TextInsertAmount;
/// <summary>
/// LabelTransactionDocumentation control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTransactionDocumentation;
/// <summary>
/// LabelTransactionHasDocumentation control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelTransactionHasDocumentation;
/// <summary>
/// LabelTrackedTransactionHeader control.
/// </summary>
@@ -120,7 +120,6 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
throw new ArgumentException ("Invalid month supplied: " + month.ToString (CultureInfo.InvariantCulture));
}
FinancialAccountRows rows = account.GetRows (periodStart, periodEnd);
StringBuilder result = new StringBuilder (16384);
@@ -145,7 +144,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
}
result.Append ("{" +
String.Format ("\"description\":\"{0}\",\"balance\":\"{1:N0}\"", JsonSanitize (startString),
String.Format ("\"description\":\"{0}\",\"balance\":\"{1:N2}\"", JsonSanitize (startString),
runningBalance/100.0) + "},");
foreach (FinancialAccountRow row in rows)
@@ -185,7 +184,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
result.Append ("{" + String.Format (
"\"id\":\"{0:N0}\",\"datetime\":\"{1:MMM-dd HH:mm}\",\"description\":\"{2}\"," +
"\"deltaPos\":\"{3}\",\"deltaNeg\":\"{4}\",\"balance\":\"{5:N0}\",\"action\":\"{6}\"",
"\"deltaPos\":\"{3}\",\"deltaNeg\":\"{4}\",\"balance\":\"{5:N2}\",\"action\":\"{6}\"",
row.Transaction.OrganizationSequenceId,
row.TransactionDateTime,
JsonSanitize (description),
@@ -204,7 +203,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
}
result.Append ("{" +
String.Format ("\"description\":\"{0}\",\"balance\":\"{1:N0}\"", JsonSanitize (endString),
String.Format ("\"description\":\"{0}\",\"balance\":\"{1:N2}\"", JsonSanitize (endString),
runningBalance/100.0) + "},");
Response.Output.WriteLine ("[" + result.ToString().TrimEnd (',') + "]");
+1
View File
@@ -789,6 +789,7 @@
<Content Include="Images\Flags\ph-64px.png" />
<Content Include="Images\Flags\tr-24px.png" />
<Content Include="Images\Flags\tr-64px.png" />
<Content Include="Images\Icons\iconshock-groups-docs-lists-64px.png" />
<Content Include="Images\Icons\iconshock-pdf-128px.png" />
<Content Include="Images\Other\blank-logo-640x360.png" />
<Content Include="Images\Flags\ae-24px.png" />
+4 -4
View File
@@ -397,7 +397,7 @@ body.rtl .sidebar {
width:500px;
}
.content h2
.content h2, .tab h2
{
font-family: Ubuntu, Arial, Sans-Serif;
color: #FFBC37;
@@ -411,7 +411,7 @@ body.rtl .sidebar {
margin-bottom: 7px;
}
.content > h2 > select, .content > h2 > span > span.combo > input.textbox-text, .content > h2 > input, .content > h2 > span.elementFloatFar > input {
.content > h2 > select, .tab > h2 > select, .content > h2 > span > span.combo > input.textbox-text, .tab > h2 > span > span.combo > input.textbox-text, .content > h2 > input, .tab > h2 > input, .content > h2 > span.elementFloatFar > input, .tab > h2 > span.elementFloatFar > input {
font-size: 16px;
font-weight: bold;
color: #1C397E;
@@ -420,11 +420,11 @@ body.rtl .sidebar {
}
.content > h2 > span > span.combo {
.content > h2 > span > span.combo, .tab > h2 > span > span.combo {
height: 20px !important;
}
.content > h2 > span > span.combo > input.textbox-text {
.content > h2 > span > span.combo > input.textbox-text, .tab > h2 > span > span.combo > input.textbox-text {
height: 20px !important;
line-height: 20px !important;
}