mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Fix #1297
This commit is contained in:
@@ -198,16 +198,15 @@ class ConvertController extends Controller
|
|||||||
// three and five
|
// three and five
|
||||||
if ('' === $data['destination_account_expense'] || null === $data['destination_account_expense']) {
|
if ('' === $data['destination_account_expense'] || null === $data['destination_account_expense']) {
|
||||||
// destination is a cash account.
|
// destination is a cash account.
|
||||||
$destination = $accountRepository->getCashAccount();
|
return $accountRepository->getCashAccount();
|
||||||
|
|
||||||
return $destination;
|
|
||||||
}
|
}
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $data['destination_account_expense'],
|
'name' => $data['destination_account_expense'],
|
||||||
'accountType' => 'expense',
|
'accountType' => 'expense',
|
||||||
'virtualBalance' => 0,
|
'account_type_id' => null,
|
||||||
'active' => true,
|
'virtualBalance' => 0,
|
||||||
'iban' => null,
|
'active' => true,
|
||||||
|
'iban' => null,
|
||||||
];
|
];
|
||||||
$destination = $accountRepository->store($data);
|
$destination = $accountRepository->store($data);
|
||||||
break;
|
break;
|
||||||
@@ -246,17 +245,16 @@ class ConvertController extends Controller
|
|||||||
|
|
||||||
if ('' === $data['source_account_revenue'] || null === $data['source_account_revenue']) {
|
if ('' === $data['source_account_revenue'] || null === $data['source_account_revenue']) {
|
||||||
// destination is a cash account.
|
// destination is a cash account.
|
||||||
$destination = $accountRepository->getCashAccount();
|
return $accountRepository->getCashAccount();
|
||||||
|
|
||||||
return $destination;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $data['source_account_revenue'],
|
'name' => $data['source_account_revenue'],
|
||||||
'accountType' => 'revenue',
|
'accountType' => 'revenue',
|
||||||
'virtualBalance' => 0,
|
'virtualBalance' => 0,
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'iban' => null,
|
'account_type_id' => null,
|
||||||
|
'iban' => null,
|
||||||
];
|
];
|
||||||
$source = $accountRepository->store($data);
|
$source = $accountRepository->store($data);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user