mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
Fix #1297
This commit is contained in:
@@ -198,13 +198,12 @@ 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',
|
||||||
|
'account_type_id' => null,
|
||||||
'virtualBalance' => 0,
|
'virtualBalance' => 0,
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'iban' => null,
|
'iban' => null,
|
||||||
@@ -246,9 +245,7 @@ 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 = [
|
||||||
@@ -256,6 +253,7 @@ class ConvertController extends Controller
|
|||||||
'accountType' => 'revenue',
|
'accountType' => 'revenue',
|
||||||
'virtualBalance' => 0,
|
'virtualBalance' => 0,
|
||||||
'active' => true,
|
'active' => true,
|
||||||
|
'account_type_id' => null,
|
||||||
'iban' => null,
|
'iban' => null,
|
||||||
];
|
];
|
||||||
$source = $accountRepository->store($data);
|
$source = $accountRepository->store($data);
|
||||||
|
Reference in New Issue
Block a user