diff --git a/Logic/Financial/ExternalBankData.cs b/Logic/Financial/ExternalBankData.cs index f37dcce0..f96aace4 100644 --- a/Logic/Financial/ExternalBankData.cs +++ b/Logic/Financial/ExternalBankData.cs @@ -204,6 +204,10 @@ namespace Swarmops.Logic.Financial } } } + else + { + newRecord.TransactionGrossCents = newRecord.TransactionNetCents; // if no "Gross" field, copy from net + } // Check for consistency of gross/net/fee: diff --git a/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx b/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx index 5a557c8d..ead189f2 100644 --- a/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx +++ b/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx @@ -3,86 +3,19 @@ <%@ Register src="~/Controls/v5/Base/FileUpload.ascx" tagname="FileUpload" tagprefix="Swarmops5" %> + + + + + - -input.UnselectedType -{ - opacity:0.2; -} - -div.Invisible -{ - display:none; - opacity:0; -} - -div.Visible -{ - dispay:inline; - opacity:1; -} - -div.BankUploadInstructionsImage -{ - float:right; -} - -#lean_overlay { - position: fixed; - z-index:10000; - top: 0px; - left: 0px; - height:100%; - width:100%; - background: #000; - display: none; -} - -#ModalDownloadInstructions -{ - display:none; - background:white; - width:720px; - position: fixed; - z-index: 11000; - left: 50%; - margin-left: -360px; - top: 160px; - opacity: 1; - padding: 10px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - box-shadow: 0px 0px 4px rgba(0,0,0,0.7); - -webkit-box-shadow: 0 0 4px rgba(0,0,0,0.7); - -moz-box-shadow: 0 0px 4px rgba(0,0,0,0.7); -} - - - @@ -104,29 +37,30 @@ div.BankUploadInstructionsImage }); function uploadCompletedCallback() { - $('#DivStepUpload').slideUp().fadeOut(); - $('#DivStepProcessing').fadeIn(); + $('#DivProcessing').fadeIn(); $('#DivProgressProcessing').progressbar({ value: 0, max: 100 }); + $('#DivProgressFake').progressbar({ value: 0, max: 100 }); + $('#DivProgressFake').progressbar({ value: 100 }); // this guy is swapped in on completion + halfway = false; $.ajax({ type: "POST", - url: "UploadBankAccount.aspx/InitializeProcessing", + url: "UploadBankFiles.aspx/InitializeProcessing", data: "{'guid': '<%= this.UploadFile.GuidString %>', 'accountIdString':'" + $('#<%= this.DropAccounts.ClientID %>').val() + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { + alert('quux'); setTimeout('updateProgressProcessing();', 1000); } }); - - // Set timeout to update progress bar } function updateProgressProcessing() { $.ajax({ type: "POST", - url: "UploadBankFiles.aspx/GetProcessingProgress", + url: "/Automation/Json-ByGuid.aspx/GetProgress", data: "{'guid': '<%= this.UploadFile.GuidString %>'}", contentType: "application/json; charset=utf-8", dataType: "json", @@ -136,12 +70,16 @@ div.BankUploadInstructionsImage { width: "100%" }, { queue: false }); - $("#tableResyncPreview").treegrid( // <<---- THIS needs to replace - { url: 'Json-ResyncPreview.aspx?Guid=<%= this.UploadFile.GuidString %>' }); $('#DivStepPreview').fadeIn(); $('#DivStepProcessing').slideUp(); + // Add processing results here } else { + if (msg.d > 50 && !halfway) { + halfway = true; + $('#DivUploadBankFile').slideUp().fadeOut(); + } + // We're not done yet. Keep the progress bar on-screen and keep re-checking. if (msg.d == 1) { @@ -154,17 +92,17 @@ div.BankUploadInstructionsImage } if (msg.d > 0 && !progressReceived) { - progressReceived = true; + progressReceived = true; $.ajax({ type: "POST", url: "UploadBankFiles.aspx/GetProcessingStatistics", data: "{'guid': '<%= this.UploadFile.GuidString %>'}", contentType: "application/json; charset=utf-8", dataType: "json", - success: function (msg2) { + success: function (msg2) {/* $('#SpanFirstTx').text(msg2.d.FirstTransaction); $('#SpanLastTx').text(msg2.d.LastTransaction); - $('#SpanTxCount').text(msg2.d.TransactionCount); + $('#SpanTxCount').text(msg2.d.TransactionCount);*/ } }); } @@ -178,22 +116,34 @@ div.BankUploadInstructionsImage var progressReceived = false; + var halfway = false; + var currentYear = <%=DateTime.Today.Year %>; - -
+ + + +
+ +
+ +
+ +
+

Upload Bank File

- Dropdown
- Instructions
-
+ (Account statement)
+ (Instructions - TODO)
+
-