Fixed a minor rare auto-accounting error

This commit is contained in:
Rick Falkvinge
2018-04-01 12:42:50 +02:00
parent 763b6ee322
commit c05ebf414f
2 changed files with 2 additions and 1 deletions
@@ -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
@@ -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;