Work on balancing/matching; broke out modal dialog functionality
This commit is contained in:
@@ -405,4 +405,7 @@
|
||||
<data name="Menu5_Ledgers_TaxForms_Payroll" xml:space="preserve">
|
||||
<value>Payroll Tax Forms</value>
|
||||
</data>
|
||||
<data name="Menu5_Ledgers_BalanceTransactions" xml:space="preserve">
|
||||
<value>Balance & Match Transactions</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -674,6 +674,26 @@
|
||||
<value>(detailed description withheld)</value>
|
||||
</data>
|
||||
<data name="BalanceTransactions_HeaderUnbalancedTransactions" xml:space="preserve">
|
||||
<value>Unbalanced Transactions (Must Fix)</value>
|
||||
<value>Unbalanced Transactions (Must Match Or Fix)</value>
|
||||
</data>
|
||||
<data name="BalanceTransactions_GridHeader_AccountName" xml:space="preserve">
|
||||
<value>Account</value>
|
||||
<comment>Usually the account name. Can also be "several".</comment>
|
||||
</data>
|
||||
<data name="BalanceTransactions_GridHeader_Amount" xml:space="preserve">
|
||||
<value>Amount</value>
|
||||
</data>
|
||||
<data name="BalanceTransactions_GridHeader_Description" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name="BalanceTransactions_GridHeader_TransactionId" xml:space="preserve">
|
||||
<value>Tx#</value>
|
||||
<comment>Keep VERY short.</comment>
|
||||
</data>
|
||||
<data name="BalanceTransactions_Info" xml:space="preserve">
|
||||
<value>Some auto-imported financial transactions can't be automatically matched to the ongoing accounting. This is where you manually match such transactions to "balance" them (if a transaction only has one part completed, like the money sent to the organization with no record of what the money is for, the transaction is said to be "unbalanced").</value>
|
||||
</data>
|
||||
<data name="BalanceTransactions_PageTitle" xml:space="preserve">
|
||||
<value>Balance & Match Transactions</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,38 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModalDialog.ascx.cs" Inherits="Swarmops.Frontend.Controls.v5.Base.ModalDialog" %>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#<%=this.ClientID %>_iconClose').click(function () {
|
||||
<%=this.ClientID%>_close();
|
||||
});
|
||||
|
||||
$('#<%=this.ClientID %>_divModalCover').click(function () { // click outside dialog
|
||||
<%=this.ClientID%>_close();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function <%=this.ClientID%>_close() {
|
||||
$('#<%=this.ClientID %>_divModalCover').fadeOut(100); // fast - 1/4 of normal time
|
||||
|
||||
<%
|
||||
if (!string.IsNullOrEmpty (this.OnClientClose))
|
||||
{
|
||||
Response.Write(this.OnClientClose + "();");
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id="<%=this.ClientID %>_divModalCover" class="modalCover">
|
||||
<div id="<%=this.ClientID %>_divModalWrap" class="modalWrap">
|
||||
<div id="<%=this.ClientID %>_divModalBox" class="box modal">
|
||||
<div class="content" style="overflow: hidden">
|
||||
<asp:PlaceHolder runat="server" ID="PlaceHolderDialog" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="<%=this.ClientID %>_iconClose" class="modalIconClose"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Swarmops.Frontend.Controls.v5.Base
|
||||
{
|
||||
public partial class ModalDialog : ControlV5Base, INamingContainer
|
||||
{
|
||||
protected void Page_Init()
|
||||
{
|
||||
if (this.DialogCode != null)
|
||||
{
|
||||
ModalDialog dialog = new ModalDialog();
|
||||
this.DialogCode.InstantiateIn (dialog);
|
||||
this.PlaceHolderDialog.Controls.Add (dialog);
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[TemplateInstance(TemplateInstance.Single)]
|
||||
[TemplateContainer(typeof(ModalDialog))]
|
||||
[PersistenceMode(PersistenceMode.InnerProperty)]
|
||||
public ITemplate DialogCode { get; set; }
|
||||
|
||||
public string OnClientClose { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,16 @@
|
||||
$(document).ready(function () {
|
||||
$('#<%=this.ClientID %>_DropBudgets').combotree({
|
||||
animate: true,
|
||||
height: 30 <%
|
||||
if (!String.IsNullOrEmpty(this.OnClientLoaded))
|
||||
{
|
||||
Response.Write(", onLoadSuccess: function() { " + this.OnClientLoaded + "(); }");
|
||||
}
|
||||
height: 30,
|
||||
onLoadSuccess: function() {
|
||||
$("#<%= this.ClientID%>_SpanBudgets span.combo input.combo-text").val("<%=Resources.Global.Global_DropInits_SelectFinancialAccount%>");
|
||||
<%
|
||||
if (!String.IsNullOrEmpty(this.OnClientLoaded))
|
||||
{
|
||||
Response.Write(this.OnClientLoaded + "();");
|
||||
}%>
|
||||
}
|
||||
<%
|
||||
if (!String.IsNullOrEmpty(this.OnClientSelect))
|
||||
{
|
||||
Response.Write(", onSelect: function(account) { " + this.OnClientSelect + "(account.id); }");
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
+37
-20
@@ -345,30 +345,47 @@
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<UserLevel>3</UserLevel>
|
||||
<Type>Separator</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_TaxForms</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
<ImageUrl>iconshock-invoice</ImageUrl>
|
||||
<Type>Separator</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_BalanceTransactions</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
<Permissions />
|
||||
<Type>Submenu</Type>
|
||||
<Children>
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_TaxForms_Payroll</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
<Permissions />
|
||||
<ImageUrl>iconshock-invoice</ImageUrl>
|
||||
<NavigateUrl>/Pages/v5/Ledgers/TaxForms/PayrollForms.aspx</NavigateUrl>
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
</Children>
|
||||
<ImageUrl>iconshock-balance</ImageUrl>
|
||||
<NavigateUrl>/Pages/v5/Ledgers/BalanceTransactions.aspx</NavigateUrl>
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
|
||||
<MainMenuItem>
|
||||
<UserLevel>3</UserLevel>
|
||||
<Type>Separator</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_TaxForms</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
<ImageUrl>iconshock-invoice</ImageUrl>
|
||||
<Permissions />
|
||||
<Type>Submenu</Type>
|
||||
<Children>
|
||||
<MainMenuItem>
|
||||
<ResourceKey>Ledgers_TaxForms_Payroll</ResourceKey>
|
||||
<UserLevel>3</UserLevel>
|
||||
<Permissions />
|
||||
<ImageUrl>iconshock-invoice</ImageUrl>
|
||||
<NavigateUrl>/Pages/v5/Ledgers/TaxForms/PayrollForms.aspx</NavigateUrl>
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
</Children>
|
||||
|
||||
</MainMenuItem>
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="BalanceTransactions.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Ledgers.BalanceTransactions" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="CurrencyTextBox" Src="~/Controls/v5/Financial/CurrencyTextBox.ascx" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ModalDialog" Src="~/Controls/v5/Base/ModalDialog.ascx" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(document).ready( function() {
|
||||
$('#gridTransactions').datagrid({
|
||||
onLoadSuccess: function() {
|
||||
|
||||
$('img.LocalIconFix').click(function() {
|
||||
transactionId = $(this).attr("txId");
|
||||
onFixTransaction(transactionId);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var transactionId = 0;
|
||||
|
||||
function onFixTransaction(newTransactionId) {
|
||||
transactionId = newTransactionId;
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
|
||||
|
||||
<h2><asp:Label ID="LabelHeaderUnbalancedTransactions" runat="server" /></h2>
|
||||
|
||||
<table id="gridTransactions" 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:'/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx'"
|
||||
idField="id">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="checkTx" checkbox="true"></th>
|
||||
<th data-options="field:'id',width:60,align:'right'"><asp:Label ID="LabelGridHeaderId" runat="server" Text="ID#"/></th>
|
||||
<th data-options="field:'dateTime',width:170,sortable:true"><asp:Label ID="LabelGridHeaderDateTime" runat="server" Text="XYZ DateTime" /></th>
|
||||
<th data-options="field:'accountName',width:170,align:'right'"><asp:Label ID="LabelGridHeaderAccountName" runat="server" Text="XYZ Debit" /></th>
|
||||
<th data-options="field:'description',width:210"><asp:Label ID="LabelGridHeaderDescription" runat="server" Text="XYZ Description" /></th>
|
||||
<th data-options="field:'delta',width:100,align:'right'"><asp:Label ID="LabelGridHeaderDelta" runat="server" Text="XYZ Delta" /></th>
|
||||
<th data-options="field:'action',width:43,align:'center'"><asp:Label ID="LabelGridHeaderAction" runat="server" Text="XYZAct" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
<Swarmops5:ModalDialog runat="server" ID="DialogTx">
|
||||
<DialogCode>
|
||||
<div class="divIconCloseModal"><img id="IconCloseEdit" src="/Images/Icons/iconshock-cross-16px.png" /></div><h2><asp:Literal ID="LiteralEditHeader" runat="server"/></h2>
|
||||
<table id="gridTransaction" class="easyui-datagrid" style="width: 910px"
|
||||
data-options="rownumbers:false,singleSelect:false,nowrap:false,fitColumns:true,fit:true,showFooter:false,loading:false,selectOnCheck:true,checkOnSelect:true,url:'Json-InspectLedgerTxData.aspx'"
|
||||
idField="id">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'accountName',width:270"><asp:Label ID="LabelGridHeaderAccountName2" runat="server" Text="XYZ Description" /></th>
|
||||
<th data-options="field:'deltaPos',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaPositive2" runat="server" Text="XYZ Debit" /></th>
|
||||
<th data-options="field:'deltaNeg',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaNegative2" runat="server" Text="XYZ Credit" /></th>
|
||||
<th data-options="field:'dateTime',width:90"><asp:Label ID="LabelGridHeaderDateTimeEntered" runat="server" Text="XYZ DateTime" /></th>
|
||||
<th data-options="field:'initials',width:50"><asp:Label ID="LabelGridHeaderInitials" runat="server" Text="ID#"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<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" />, <asp:Label ID="LabelAddRowAmount" runat="server" /> <Swarmops5:CurrencyTextBox ID="TextInsertAmount" runat="server" /> <span class="elementFloatFar"><input id="ButtonAddTransactionRow" type="button" value=' <asp:Literal ID="LiteralAddRowButton" runat="server" /> '/></span></h2></span>
|
||||
|
||||
</div>
|
||||
<div id="divTransactionTracking">
|
||||
<h2><asp:Label ID="LabelTrackedTransactionHeader" runat="server" /></h2>
|
||||
<div id="divTransactionTrackingDetails"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</DialogCode>
|
||||
</Swarmops5:ModalDialog>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Swarmops.Logic.Security;
|
||||
|
||||
namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
{
|
||||
public partial class BalanceTransactions : PageV5Base
|
||||
{
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
PageAccessRequired = new Access (CurrentOrganization, AccessAspect.BookkeepingDetails, AccessType.Read);
|
||||
|
||||
RegisterControl (EasyUIControl.DataGrid);
|
||||
Localize();
|
||||
}
|
||||
|
||||
private void Localize()
|
||||
{
|
||||
this.PageTitle = Resources.Pages.Ledgers.BalanceTransactions_PageTitle;
|
||||
this.InfoBoxLiteral = Resources.Pages.Ledgers.BalanceTransactions_Info;
|
||||
this.LabelHeaderUnbalancedTransactions.Text =
|
||||
Resources.Pages.Ledgers.BalanceTransactions_HeaderUnbalancedTransactions;
|
||||
|
||||
this.LabelGridHeaderAccountName.Text = Resources.Pages.Ledgers.BalanceTransactions_GridHeader_AccountName;
|
||||
this.LabelGridHeaderAction.Text = Resources.Global.Global_Action;
|
||||
this.LabelGridHeaderDateTime.Text = Resources.Global.Global_Timestamp;
|
||||
this.LabelGridHeaderDelta.Text = Resources.Pages.Ledgers.BalanceTransactions_GridHeader_Amount;
|
||||
this.LabelGridHeaderId.Text = Resources.Pages.Ledgers.BalanceTransactions_GridHeader_TransactionId;
|
||||
this.LabelGridHeaderDescription.Text = Resources.Pages.Ledgers.BalanceTransactions_GridHeader_Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ Import Namespace="Resources" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ComboBudgets" Src="~/Controls/v5/Financial/ComboBudgets.ascx" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="CurrencyTextBox" Src="~/Controls/v5/Financial/CurrencyTextBox.ascx" %>
|
||||
<%@ Register TagPrefix="Swarmops5" TagName="ModalDialog" Src="~/Controls/v5/Base/ModalDialog.ascx" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
|
||||
|
||||
@@ -57,14 +58,14 @@
|
||||
|
||||
// Dynamic reloading screws up resizing for some reason, so we'll have to resize the tx grid manually.
|
||||
|
||||
var heightBody = $('div#divModalCover table.datagrid-btable').height();
|
||||
$('div#divModalCover div.datagrid-body').height(heightBody);
|
||||
var heightBody = $('div#<%=this.DialogEditTx.ClientID%>_divModalCover table.datagrid-btable').height();
|
||||
$('div#<%=this.DialogEditTx.ClientID%>_divModalCover div.datagrid-body').height(heightBody);
|
||||
|
||||
var heightHeaders = $('div#divModalCover div.datagrid-header').height();
|
||||
$('div#divModalCover div.datagrid-view').height(heightBody + heightHeaders + 20); // +20 adds some margin on the bottom. It's an arbitrary number.
|
||||
$('div#divModalCover div.datagrid-wrap').height(heightBody + heightHeaders + 20);
|
||||
var heightHeaders = $('div#<%=this.DialogEditTx.ClientID%>_divModalCover div.datagrid-header').height();
|
||||
$('div#<%=this.DialogEditTx.ClientID%>_divModalCover div.datagrid-view').height(heightBody + heightHeaders + 20); // +20 adds some margin on the bottom. It's an arbitrary number.
|
||||
$('div#<%=this.DialogEditTx.ClientID%>_divModalCover div.datagrid-wrap').height(heightBody + heightHeaders + 20);
|
||||
|
||||
$('div#divModalBox').height($('div#divModalBox div.content').height() + 20);
|
||||
$('div#<%=this.DialogEditTx.ClientID%>_divModalBox').height($('div#<%=this.DialogEditTx.ClientID%>_divModalBox div.content').height() + 20);
|
||||
|
||||
}
|
||||
});
|
||||
@@ -77,15 +78,6 @@
|
||||
reloadData();
|
||||
});
|
||||
|
||||
$("#IconCloseEdit").click(function() {
|
||||
$('#divModalCover').fadeOut();
|
||||
|
||||
if (transactionDirty) {
|
||||
$('#gridLedgers').datagrid('reload');
|
||||
transactionDirty = false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#ButtonAddTransactionRow').click(function() {
|
||||
addTransactionRow();
|
||||
});
|
||||
@@ -99,8 +91,11 @@
|
||||
var transactionId = 0;
|
||||
var transactionDirty = false;
|
||||
|
||||
function onAccountSelectorLoaded() {
|
||||
$("#<%= DropBudgets.ClientID%>_SpanBudgets span.combo input.combo-text").val("<%=Resources.Global.Global_DropInits_SelectFinancialAccount%>");
|
||||
function onModalClose() {
|
||||
if (transactionDirty) {
|
||||
$('#gridLedgers').datagrid('reload');
|
||||
transactionDirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onAccountSelected(newAccountId) {
|
||||
@@ -190,7 +185,7 @@
|
||||
function onInspectTransaction(transactionId) {
|
||||
window.scrollTo(0, 0);
|
||||
$('body').css('overflow-y', 'hidden');
|
||||
$('#divModalCover').fadeIn();
|
||||
$('#<%=this.DialogEditTx.ClientID%>_divModalCover').fadeIn();
|
||||
$('span#spanModalTransactionId').text(transactionId);
|
||||
|
||||
$('#gridTransaction').datagrid({ url: 'Json-InspectLedgerTxData.aspx?TxId=' + transactionId });
|
||||
@@ -302,7 +297,7 @@
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
|
||||
|
||||
<h2><asp:Label ID="LabelHeaderInspect" runat="server" /> <Swarmops5:ComboBudgets ID="DropBudgets" OnClientLoaded=" onAccountSelectorLoaded " 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>
|
||||
<h2><asp:Label ID="LabelHeaderInspect" runat="server" /> <Swarmops5:ComboBudgets 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'"
|
||||
@@ -320,38 +315,36 @@
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
|
||||
<div id="divModalCover" class="modalcover">
|
||||
<div id="divModalBox" class="box modal">
|
||||
<div class="content" style="overflow: hidden">
|
||||
<div class="divIconCloseModal"><img id="IconCloseEdit" src="/Images/Icons/iconshock-cross-16px.png" /></div><h2><asp:Literal ID="LiteralEditHeader" runat="server"/></h2>
|
||||
<table id="gridTransaction" class="easyui-datagrid" style="width: 910px"
|
||||
data-options="rownumbers:false,singleSelect:false,nowrap:false,fitColumns:true,fit:true,showFooter:false,loading:false,selectOnCheck:true,checkOnSelect:true,url:'Json-InspectLedgerTxData.aspx'"
|
||||
idField="id">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'accountName',width:270"><asp:Label ID="LabelGridHeaderAccountName" runat="server" Text="XYZ Description" /></th>
|
||||
<th data-options="field:'deltaPos',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaPositive2" runat="server" Text="XYZ Debit" /></th>
|
||||
<th data-options="field:'deltaNeg',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaNegative2" runat="server" Text="XYZ Credit" /></th>
|
||||
<th data-options="field:'dateTime',width:90"><asp:Label ID="LabelGridHeaderDateTimeEntered" runat="server" Text="XYZ DateTime" /></th>
|
||||
<th data-options="field:'initials',width:50"><asp:Label ID="LabelGridHeaderInitials" runat="server" Text="ID#"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<Swarmops5:ModalDialog ID="DialogEditTx" OnClientClose="onModalClose" runat="server">
|
||||
<DialogCode>
|
||||
<h2><asp:Literal ID="LiteralEditHeader" runat="server"/></h2>
|
||||
|
||||
<table id="gridTransaction" class="easyui-datagrid" style="width: 910px"
|
||||
data-options="rownumbers:false,singleSelect:false,nowrap:false,fitColumns:true,fit:true,showFooter:false,loading:false,selectOnCheck:true,checkOnSelect:true,url:'Json-InspectLedgerTxData.aspx'"
|
||||
idField="id">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'accountName',width:270"><asp:Label ID="LabelGridHeaderAccountName" runat="server" Text="XYZ Debit" /></th>
|
||||
<th data-options="field:'deltaPos',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaPositive2" runat="server" Text="XYZ Debit" /></th>
|
||||
<th data-options="field:'deltaNeg',width:70,align:'right'"><asp:Label ID="LabelGridHeaderDeltaNegative2" runat="server" Text="XYZ Credit" /></th>
|
||||
<th data-options="field:'dateTime',width:90"><asp:Label ID="LabelGridHeaderDateTimeEntered" runat="server" Text="XYZ DateTime" /></th>
|
||||
<th data-options="field:'initials',width:50"><asp:Label ID="LabelGridHeaderInitials" runat="server" Text="ID#"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<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" />, <asp:Label ID="LabelAddRowAmount" runat="server" /> <Swarmops5:CurrencyTextBox ID="TextInsertAmount" runat="server" /> <span class="elementFloatFar"><input id="ButtonAddTransactionRow" type="button" value=' <asp:Literal ID="LiteralAddRowButton" runat="server" /> '/></span></h2></span>
|
||||
<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" />, <asp:Label ID="LabelAddRowAmount" runat="server" /> <Swarmops5:CurrencyTextBox ID="TextInsertAmount" runat="server" /> <span class="elementFloatFar"><input id="ButtonAddTransactionRow" type="button" value=' <asp:Literal ID="LiteralAddRowButton" runat="server" /> '/></span></h2></span>
|
||||
|
||||
</div>
|
||||
<div id="divTransactionTracking">
|
||||
</div>
|
||||
<div id="divTransactionTracking">
|
||||
<h2><asp:Label ID="LabelTrackedTransactionHeader" runat="server" /></h2>
|
||||
<div id="divTransactionTrackingDetails"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</DialogCode>
|
||||
</Swarmops5:ModalDialog>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
this.LabelGridHeaderDescription.Text = Global.Global_Description;
|
||||
this.LabelGridHeaderId.Text = Resources.Pages.Ledgers.InspectLedgers_TransactionId;
|
||||
|
||||
|
||||
this.LabelGridHeaderAccountName.Text = Resources.Pages.Ledgers.InspectLedgers_AccountName;
|
||||
this.LabelGridHeaderDateTimeEntered.Text = Resources.Pages.Ledgers.InspectLedgers_LoggedDate;
|
||||
this.LabelGridHeaderDeltaNegative2.Text = Global.Ledgers_Credit;
|
||||
@@ -83,6 +84,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
|
||||
this.LabelFlagNotAvailable.Text = Resources.Pages.Ledgers.InspectLedgers_FlaggingNotAvailable;
|
||||
|
||||
|
||||
this.LabelAddTransactionRowsHeader.Text = Resources.Pages.Ledgers.InspectLedgers_HeaderAddTransactionRow;
|
||||
this.LabelTrackedTransactionHeader.Text =
|
||||
Resources.Pages.Ledgers.InspectLedgers_HeaderAutoTransactionTracking;
|
||||
@@ -93,7 +95,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
CurrentUser.HasAccess (new Access (CurrentOrganization, AccessAspect.BookkeepingDetails,
|
||||
AccessType.Write)))
|
||||
{
|
||||
this.LiteralEditHeader.Text = Resources.Pages.Ledgers.InspectLedgers_EditingTransactionX;
|
||||
LiteralEditHeader.Text = Resources.Pages.Ledgers.InspectLedgers_EditingTransactionX;
|
||||
|
||||
this.LabelAddRowAccount.Text = Global.Financial_Account;
|
||||
this.LabelAddRowAmount.Text = Global.Financial_Amount;
|
||||
this.LiteralErrorAddRowSelectAccount.Text =
|
||||
@@ -102,7 +105,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
}
|
||||
else // read access, at a minimum of AccessAspect.Bookkeeping
|
||||
{
|
||||
this.LiteralEditHeader.Text = Resources.Pages.Ledgers.InspectLedgers_InspectingTransactionX;
|
||||
LiteralEditHeader.Text = Resources.Pages.Ledgers.InspectLedgers_InspectingTransactionX;
|
||||
}
|
||||
|
||||
// Access helpers to JavaScript (these don't actually determine access, but help in UI prettiness)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Json-UnbalancedTransactions.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Ledgers.Json_UnbalancedTransactions" %>
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Swarmops.Logic.Financial;
|
||||
using Swarmops.Logic.Security;
|
||||
|
||||
namespace Swarmops.Frontend.Pages.v5.Ledgers
|
||||
{
|
||||
public partial class Json_UnbalancedTransactions : DataV5Base
|
||||
{
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Response.ContentType = "application/json";
|
||||
|
||||
FinancialTransactions unbalancedTransactions = FinancialTransactions.GetUnbalanced (CurrentOrganization);
|
||||
List<string> rows = new List<string>();
|
||||
|
||||
if (
|
||||
CurrentUser.HasAccess (new Access (CurrentOrganization, AccessAspect.BookkeepingDetails, AccessType.Read)))
|
||||
{
|
||||
foreach (FinancialTransaction transaction in unbalancedTransactions)
|
||||
{
|
||||
string accountName = string.Empty;
|
||||
|
||||
FinancialTransactionRows txRows = transaction.Rows;
|
||||
if (txRows.Count > 1)
|
||||
{
|
||||
accountName = Resources.Global.Global_Several_Display;
|
||||
}
|
||||
else
|
||||
{
|
||||
// one transaction row (we know there's not zero rows, because the transaction is unbalanced, which requires at least one nonzero row)
|
||||
accountName = txRows[0].AccountName;
|
||||
}
|
||||
|
||||
string row =
|
||||
String.Format (
|
||||
"\"id\":\"{0:N0}\",\"description\":\"{1}\",\"accountName\":\"{2}\",\"delta\":\"{3:+#,#.00;-#,#.00}\",\"dateTime\":\"{4:yyyy-MMM-dd HH:mm}\"",
|
||||
transaction.Identity, JsonSanitize (transaction.Description), JsonSanitize (accountName), txRows.AmountCentsTotal / 100.0, transaction.DateTime);
|
||||
|
||||
row +=
|
||||
String.Format (
|
||||
",\"action\":\"<img src='/Images/Icons/iconshock-wrench-16px.png' class='LocalIconFix' txId='{0}' />\"",
|
||||
transaction.Identity);
|
||||
|
||||
rows.Add ("{" + row + "}");
|
||||
}
|
||||
}
|
||||
|
||||
Response.Output.WriteLine("[" + String.Join (",", rows) + "]");
|
||||
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@ body.rtl .sidebar {
|
||||
|
||||
|
||||
|
||||
.modalcover {
|
||||
.modalCover {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
@@ -353,23 +353,47 @@ body.rtl .sidebar {
|
||||
z-index: 9001;
|
||||
display: none;
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
|
||||
}
|
||||
|
||||
.modal
|
||||
{
|
||||
.modalWrap {
|
||||
position: absolute;
|
||||
height: 80%;
|
||||
width: 950px;
|
||||
box-shadow: black 0px 0px 30px 2px;
|
||||
height: 70%;
|
||||
width: 980px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto auto;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.modal
|
||||
{
|
||||
box-shadow: black 0px 0px 30px 2px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.modal.box {
|
||||
margin-top: inherit;
|
||||
}
|
||||
|
||||
.modalIconClose { /* copies the close button from Fancybox */
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -15px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: url("/Scripts/fancybox/fancybox.png") repeat scroll -40px 0px transparent;
|
||||
cursor: pointer;
|
||||
z-index: 9103;
|
||||
}
|
||||
|
||||
body.rtl .modalIconClose, body.rtl #fancybox-close {
|
||||
right: inherit !important;
|
||||
left: -15px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.divIconCloseModal {
|
||||
float:right;
|
||||
|
||||
Reference in New Issue
Block a user