Mandatory forex gain/loss accounts when presentation currency isn't bch

This commit is contained in:
Rick Falkvinge
2019-03-05 18:00:28 +01:00
parent c26ae6edd2
commit 9344a8f07e
+13
View File
@@ -594,6 +594,19 @@ namespace Swarmops.Logic.Structure
OptionalData.SetOptionalDataString (ObjectOptionalDataType.OrgCurrency, currency.Code);
// If presentation currency is something else than bitcoin cash, then we also
// need forex gain/loss accounts to account for (at least) the hotwallet
if (!currency.IsBitcoinCash)
{
this.FinancialAccounts.IncomeCurrencyFluctuations =
FinancialAccount.Create(this, "[LOC]Income_ForexGains",
FinancialAccountType.Income, null);
this.FinancialAccounts.CostsCurrencyFluctuations =
FinancialAccount.Create(this, "[LOC]Cost_ForexLosses",
FinancialAccountType.Cost, null);
}
// Set current year to first fiscal year
OptionalData.SetOptionalDataInt (ObjectOptionalDataType.OrgFirstFiscalYear, DateTime.Today.Year);