mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-20 11:48:27 -06:00
Fix some bugs in the import tasks.
This commit is contained in:
parent
d296dbbc23
commit
4bbc3c3bd8
@ -90,7 +90,7 @@ class Import
|
|||||||
switch ($payload['data']['type']['type']) {
|
switch ($payload['data']['type']['type']) {
|
||||||
case 'beneficiary':
|
case 'beneficiary':
|
||||||
$payload['class'] = 'Account';
|
$payload['class'] = 'Account';
|
||||||
$payload['data']['account_type'] = 'Beneficiary account';
|
$payload['data']['account_type'] = 'Expense account';
|
||||||
$this->importAccount($job, $payload);
|
$this->importAccount($job, $payload);
|
||||||
break;
|
break;
|
||||||
case 'budget':
|
case 'budget':
|
||||||
@ -135,7 +135,7 @@ class Import
|
|||||||
|
|
||||||
// if Firefly tries to import a beneficiary, Firefly will "merge" already existing ones,
|
// if Firefly tries to import a beneficiary, Firefly will "merge" already existing ones,
|
||||||
// so we don't care:
|
// so we don't care:
|
||||||
if (isset($payload['data']['account_type']) && $payload['data']['account_type'] == 'Beneficiary account') {
|
if (isset($payload['data']['account_type']) && $payload['data']['account_type'] == 'Expense account') {
|
||||||
// store beneficiary
|
// store beneficiary
|
||||||
$acct = $this->_accounts->createOrFindBeneficiary($payload['data']['name']);
|
$acct = $this->_accounts->createOrFindBeneficiary($payload['data']['name']);
|
||||||
\Log::debug('Imported ' . $payload['class'] . ' "' . $payload['data']['name'] . '".');
|
\Log::debug('Imported ' . $payload['class'] . ' "' . $payload['data']['name'] . '".');
|
||||||
|
Loading…
Reference in New Issue
Block a user