Fixed bug where you couldn't reparent an account to root level

This commit is contained in:
Rick Falkvinge
2015-02-24 00:57:26 +01:00
parent e1b08f6aac
commit 6a8a5ff35c
+1 -1
View File
@@ -243,7 +243,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
}
FinancialAccount newParent = null; // to cover the root account case (reparenting to root)
if (parentAccountId != 0)
if (parentAccountId > 0) // the group parent IDs are -1 ... -4
{
newParent = FinancialAccount.FromIdentity (parentAccountId);
if (newParent.OrganizationId != authData.CurrentOrganization.Identity)