Add virtual accounts (potential bugs)
This commit is contained in:
@@ -168,6 +168,7 @@ wxLanguage User::GetLanguage()
|
||||
void User::LinkOrUnlinkOperation(Operation& op)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
Account account, account2;
|
||||
|
||||
// Not Linked
|
||||
if (!op.transfert.Length())
|
||||
@@ -177,6 +178,7 @@ void User::LinkOrUnlinkOperation(Operation& op)
|
||||
if (it->id != op.id && it->transfert == op.id)
|
||||
{
|
||||
it->transfert = wxT("");
|
||||
it->_virtual = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -188,11 +190,16 @@ void User::LinkOrUnlinkOperation(Operation& op)
|
||||
{
|
||||
if (it->id != op.id && it->id == op.transfert)
|
||||
{
|
||||
account = GetAccount(it->account);
|
||||
account2 = GetAccount(op.account);
|
||||
it->transfert = op.id;
|
||||
it->_virtual = account._virtual || account2._virtual;
|
||||
op._virtual = account._virtual || account2._virtual;
|
||||
return;
|
||||
}
|
||||
}
|
||||
op.transfert = wxT("");
|
||||
op._virtual = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user