diff --git a/Site5/App_GlobalResources/Pages.Ledgers.resx b/Site5/App_GlobalResources/Pages.Ledgers.resx
index 7cc42cca..2cef0781 100644
--- a/Site5/App_GlobalResources/Pages.Ledgers.resx
+++ b/Site5/App_GlobalResources/Pages.Ledgers.resx
@@ -358,9 +358,9 @@
Zero is new transaction count, one is duplicate transaction count, two and three are lowest and highest dates found in file. Pay attention to date format and adjust to culture.
- <p>The file was imported, but the <strong>resulting account balance mismatches.</strong></p><p>After importing {0:N0} transactions (and discarding {1:N0} duplicates), the entire file has been processed. However, the resulting account balance in Swarmops is not the same as that of the bank statement.</p>
+ <p>The file was imported, but the <strong>resulting account balance mismatches.</strong></p><p>After importing {0:N0} transactions (and discarding {1:N0} duplicates), the entire file has been processed. However, the resulting account balance in Swarmops is not the same as that of the bank statement; there is a difference of {3} {2:N2}.</p>
<p>Please try uploading a fresh account statement. If that still produces a mismatch, you may need to try <a href="/Pages/v5/Ledgers/ResyncExternalAccount.aspx">resynchronizing</a> the bank account with a comprehensive account statement file.</p>
- Displayed on successful import, but the resulting balance is off compared to the account statement file that was just uploaded.
+ Displayed on successful import, but the resulting balance is off compared to the account statement file that was just uploaded. 2 is the diff, 3 is the currency.
Select Bookkeeping Account
diff --git a/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs b/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs
index 7742b9d8..eecf50e8 100644
--- a/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs
+++ b/Site5/Pages/v5/Ledgers/UploadBankFiles.aspx.cs
@@ -267,7 +267,7 @@ namespace Swarmops.Site.Pages.Ledgers
case ImportResultsCategory.Questionable:
html = String.Format(Resources.Pages.Ledgers.UploadBankFiles_ResultsQuestionable,
resultDetail.TransactionsImported, resultDetail.DuplicateTransactions,
- resultDetail.EarliestTransaction, resultDetail.LatestTransaction);
+ Math.Abs(resultDetail.BalanceMismatchCents / 100.0), resultDetail.CurrencyCode);
break;
case ImportResultsCategory.Bad:
html = Resources.Pages.Ledgers.UploadBankFiles_ResultsBad;
@@ -501,6 +501,8 @@ namespace Swarmops.Site.Pages.Ledgers
public int TransactionsImported;
public int DuplicateTransactions;
public bool AccountBalanceMatchesBank;
+ public long BalanceMismatchCents;
+ public string CurrencyCode;
}
@@ -668,12 +670,16 @@ namespace Swarmops.Site.Pages.Ledgers
{
Payouts.AutomatchAgainstUnbalancedTransactions(args.Organization);
result.AccountBalanceMatchesBank = true;
+ result.BalanceMismatchCents = 0;
}
else
{
result.AccountBalanceMatchesBank = false;
+ result.BalanceMismatchCents = (databaseAccountBalanceCents - beyondEofCents) -
+ import.LatestAccountBalanceCents;
}
+ result.CurrencyCode = args.Organization.Currency.Code;
return result;
}