From a1f1cf921da84fa441b30873ce60be9bbf4b61b2 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 17 Mar 2015 14:12:22 +0100 Subject: [PATCH] Work on balancing/matching; broke out modal dialog functionality --- Site5/App_GlobalResources/Menu5.resx | 3 + Site5/App_GlobalResources/Pages.Ledgers.resx | 22 ++++- Site5/Controls/v5/Base/ModalDialog.ascx | 38 +++++++ Site5/Controls/v5/Base/ModalDialog.ascx.cs | 35 +++++++ Site5/Controls/v5/Financial/ComboBudgets.ascx | 15 ++- .../PageIcons/iconshock-balance-40px.png | Bin 0 -> 2965 bytes .../PageIcons/iconshock-balance-96px.png | Bin 0 -> 10660 bytes Site5/MainMenu-v5.xml | 57 +++++++---- .../Pages/v5/Ledgers/BalanceTransactions.aspx | 93 ++++++++++++++++++ .../v5/Ledgers/BalanceTransactions.aspx.cs | 36 +++++++ Site5/Pages/v5/Ledgers/InspectLedgers.aspx | 85 ++++++++-------- Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs | 7 +- .../Ledgers/Json-UnbalancedTransactions.aspx | 1 + .../Json-UnbalancedTransactions.aspx.cs | 54 ++++++++++ Site5/Style/style-v5.css | 38 +++++-- 15 files changed, 403 insertions(+), 81 deletions(-) create mode 100644 Site5/Controls/v5/Base/ModalDialog.ascx create mode 100644 Site5/Controls/v5/Base/ModalDialog.ascx.cs create mode 100644 Site5/Images/PageIcons/iconshock-balance-40px.png create mode 100644 Site5/Images/PageIcons/iconshock-balance-96px.png create mode 100644 Site5/Pages/v5/Ledgers/BalanceTransactions.aspx create mode 100644 Site5/Pages/v5/Ledgers/BalanceTransactions.aspx.cs create mode 100644 Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx create mode 100644 Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx.cs diff --git a/Site5/App_GlobalResources/Menu5.resx b/Site5/App_GlobalResources/Menu5.resx index 0dc80e05..01cc385c 100644 --- a/Site5/App_GlobalResources/Menu5.resx +++ b/Site5/App_GlobalResources/Menu5.resx @@ -405,4 +405,7 @@ Payroll Tax Forms + + Balance & Match Transactions + \ No newline at end of file diff --git a/Site5/App_GlobalResources/Pages.Ledgers.resx b/Site5/App_GlobalResources/Pages.Ledgers.resx index 9d49a14c..673ce1b7 100644 --- a/Site5/App_GlobalResources/Pages.Ledgers.resx +++ b/Site5/App_GlobalResources/Pages.Ledgers.resx @@ -674,6 +674,26 @@ (detailed description withheld) - Unbalanced Transactions (Must Fix) + Unbalanced Transactions (Must Match Or Fix) + + + Account + Usually the account name. Can also be "several". + + + Amount + + + Description + + + Tx# + Keep VERY short. + + + 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"). + + + Balance & Match Transactions \ No newline at end of file diff --git a/Site5/Controls/v5/Base/ModalDialog.ascx b/Site5/Controls/v5/Base/ModalDialog.ascx new file mode 100644 index 00000000..c542896a --- /dev/null +++ b/Site5/Controls/v5/Base/ModalDialog.ascx @@ -0,0 +1,38 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModalDialog.ascx.cs" Inherits="Swarmops.Frontend.Controls.v5.Base.ModalDialog" %> + + + +
+
+ +
+
+
\ No newline at end of file diff --git a/Site5/Controls/v5/Base/ModalDialog.ascx.cs b/Site5/Controls/v5/Base/ModalDialog.ascx.cs new file mode 100644 index 00000000..0a5c3094 --- /dev/null +++ b/Site5/Controls/v5/Base/ModalDialog.ascx.cs @@ -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; } + } +} \ No newline at end of file diff --git a/Site5/Controls/v5/Financial/ComboBudgets.ascx b/Site5/Controls/v5/Financial/ComboBudgets.ascx index 8ebe00ec..29a6da2b 100644 --- a/Site5/Controls/v5/Financial/ComboBudgets.ascx +++ b/Site5/Controls/v5/Financial/ComboBudgets.ascx @@ -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); }"); diff --git a/Site5/Images/PageIcons/iconshock-balance-40px.png b/Site5/Images/PageIcons/iconshock-balance-40px.png new file mode 100644 index 0000000000000000000000000000000000000000..a97c05cc1612e9ea4b490789e73f49953b9da985 GIT binary patch literal 2965 zcmV;G3u^Re04Rdg|$- zt%{08#Db;Nh3YX-1YCk4qzHtXNyv&Jgd~IvA)-vF!R@*z z;B)1JXP5r8zGM^mfYWIoW|gJEzvv+T!lq>ki~E zyy@kf^l8OMt2a!w64_s0-%RE$UrT>204pm$f-7f|v*NW?Ay3}4SH)o9p)uM0b+k}F z#hqkCG)$wZK}TG1sY0k_?t;Y_&k5Q%?Z2QCJ zEhQgrT)*?3b=Sng5>E&jG=jf!_wWEzVqpM)*^~NYLgqC~0Dx%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JH?h$FLAo$vX4zh;&ctE^X`Q%5j2*6h`mK0VfN11_w?w zHlld_DRgzHaAap=;%)O<@@_5IYI7$vh~eIpNKoR$x4WTxTi;x``7%bC6YQhT5aYVoDyPX~*b#ucmbCf&UdUvAtA)7Ugv^D-fe z1?Va3Ks=R#)>eoyaSnj>Llds>>UJ{# zu=$y_%naVBte(FDKl$K>(ZV1Tk@tbq$iFAr{pTji`u5WJIDeVsQ;J zMS(RKpeQPgFhV1GcvyEc0N97`S#m>qL?~+hV7JQwAZ27SY&;JmD6kw0nPwnq8bn1y zEG{D!7ZDc~#8nM~tReyt?#ygV|MB96@{?`zHodX6eb@lfG)3t;;Q_eb-2CF*(&t|k zMyu*Zu%U2*S<@|?qCiqK$U1>UQBYV8n$ZA-<%q&@5p&kaQ2H!iE0dkR^{&MaZM9h~ z!uSaj)$;Q4VYA@5;b3Hq26JZSNQa4{EUc*eiw#@nUKcDU{taZ{BHt{^|5x%a;jlQ@4omik00000 LNkvXXu0mjfd>fr* literal 0 HcmV?d00001 diff --git a/Site5/Images/PageIcons/iconshock-balance-96px.png b/Site5/Images/PageIcons/iconshock-balance-96px.png new file mode 100644 index 0000000000000000000000000000000000000000..b200b5fc6bd7daadf911ae1c3b11a1f027fa4118 GIT binary patch literal 10660 zcmV;VDO=WwP){zZ*6GD5>p0HF z-gVlh*l~&Nn7AMtjE!v!7y%klL>EN@Ay6GjQ(w9F?jJJ(83U#W+w5|Gzo!|E=Dm4y zzI(p&opbJc0xph=I-t;@pmK!xDsQ7F`73e2g7?)?oaY*;x9-f6Qv% z`1+eFkIR&BBn*aei|$By@`@%-t-NmEg$e@wpwq(mF|z>x-Mbq9QZc1QzWR=PG4sP; z!G!8cw5)hk7Xps}xL`eC*a2t^*A2Td3?Z`2zP5_I(c{qH-h}AkZBR7 zH)5UJKqz3x+aXd%K&T8w)lEPc7XcVDylUHG>+n+L&;fy%ku@d7vc9AHb6ZO)$FASC zZ`FEPl{P4v)-WMAQL{oG9buBMFuq;#)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ions + 3 - Submenu - - - Ledgers_TaxForms_Payroll - 3 - - iconshock-invoice - /Pages/v5/Ledgers/TaxForms/PayrollForms.aspx - Link - - - + iconshock-balance + /Pages/v5/Ledgers/BalanceTransactions.aspx + Link + + + + + + 3 + Separator + + + + + Ledgers_TaxForms + 3 + iconshock-invoice + + Submenu + + + Ledgers_TaxForms_Payroll + 3 + + iconshock-invoice + /Pages/v5/Ledgers/TaxForms/PayrollForms.aspx + Link + + + diff --git a/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx b/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx new file mode 100644 index 00000000..2ba859b1 --- /dev/null +++ b/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx @@ -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" %> + + + + + + + + + + + +

+ + + + + + + + + + + + + +
+ + + + +

+ + + + + + + + + + +
+ +
+

+

,

+ +
+
+

+
+
+ + +
+
+ + + + +
+ + + + + diff --git a/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx.cs b/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx.cs new file mode 100644 index 00000000..dcdb6e20 --- /dev/null +++ b/Site5/Pages/v5/Ledgers/BalanceTransactions.aspx.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/Site5/Pages/v5/Ledgers/InspectLedgers.aspx b/Site5/Pages/v5/Ledgers/InspectLedgers.aspx index 42213043..f7e8ded6 100644 --- a/Site5/Pages/v5/Ledgers/InspectLedgers.aspx +++ b/Site5/Pages/v5/Ledgers/InspectLedgers.aspx @@ -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" %> @@ -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 @@ -

+

- -
- + + diff --git a/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs b/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs index 68a401c2..383887f2 100644 --- a/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs +++ b/Site5/Pages/v5/Ledgers/InspectLedgers.aspx.cs @@ -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) diff --git a/Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx b/Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx new file mode 100644 index 00000000..4a26b223 --- /dev/null +++ b/Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx @@ -0,0 +1 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Json-UnbalancedTransactions.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Ledgers.Json_UnbalancedTransactions" %> diff --git a/Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx.cs b/Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx.cs new file mode 100644 index 00000000..e3e135d2 --- /dev/null +++ b/Site5/Pages/v5/Ledgers/Json-UnbalancedTransactions.aspx.cs @@ -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 rows = new List(); + + 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\":\"\"", + transaction.Identity); + + rows.Add ("{" + row + "}"); + } + } + + Response.Output.WriteLine("[" + String.Join (",", rows) + "]"); + + Response.End(); + } + } +} \ No newline at end of file diff --git a/Site5/Style/style-v5.css b/Site5/Style/style-v5.css index 40260502..d8ab13b4 100644 --- a/Site5/Style/style-v5.css +++ b/Site5/Style/style-v5.css @@ -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;