From c05ebf414f05b15846a491410500d7f5bf2d128a Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 1 Apr 2018 12:42:50 +0200 Subject: [PATCH] Fixed a minor rare auto-accounting error --- BuildFiles/Logs/changelog-5.01-beta-05.txt | 1 + Site/Pages/v5/Ledgers/BalanceTransactions.aspx.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BuildFiles/Logs/changelog-5.01-beta-05.txt b/BuildFiles/Logs/changelog-5.01-beta-05.txt index f48406dd..d21324b8 100644 --- a/BuildFiles/Logs/changelog-5.01-beta-05.txt +++ b/BuildFiles/Logs/changelog-5.01-beta-05.txt @@ -22,6 +22,7 @@ x BUGFIXES - Changed welcome mail for new Participant in the case of no Participation Expiry - Fixed localization for geography positions in Find/Search view - Repaired ability to view documents properly in General Ledger +- Capital Gains/Loss were reversed on auto-accounting non-presentation invoices (doesn't change outcome, but formally incorrect) x MINOR diff --git a/Site/Pages/v5/Ledgers/BalanceTransactions.aspx.cs b/Site/Pages/v5/Ledgers/BalanceTransactions.aspx.cs index 01384e25..cbba4576 100644 --- a/Site/Pages/v5/Ledgers/BalanceTransactions.aspx.cs +++ b/Site/Pages/v5/Ledgers/BalanceTransactions.aspx.cs @@ -389,7 +389,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers throw new InvalidOperationException("Need forex gain/loss accounts for this operation"); // TODO: Autocreate? } - if ((-transactionCents) < payoutCents) // the tx-negative is because it's a payout + if ((-transactionCents) > payoutCents) // the tx-negative is because it's a payout { // This is a forex loss, not a gain which is the default forexSpillAccount = authData.CurrentOrganization.FinancialAccounts.CostsCurrencyFluctuations;