mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 07:53:16 +00:00
Last minute sanity check.
This commit is contained in:
@@ -255,18 +255,24 @@ class ImportBill
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'match' => $name,
|
'match' => $name,
|
||||||
'amount_min' => bcmul($this->amount, '0.9'),
|
'amount_min' => bcmul($this->amount, '0.9'),
|
||||||
'amount_max' => bcmul($this->amount, '1.1'),
|
'amount_max' => bcmul($this->amount, '1.1'),
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'date' => date('Y-m-d'),
|
'date' => date('Y-m-d'),
|
||||||
'repeat_freq' => 'monthly',
|
'repeat_freq' => 'monthly',
|
||||||
'skip' => '0',
|
'skip' => '0',
|
||||||
'automatch' => '0',
|
'transaction_currency_id' => 1,
|
||||||
'active' => '1',
|
'automatch' => '0',
|
||||||
|
'active' => '1',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
|
||||||
|
if (null !== $currency) {
|
||||||
|
$data['transaction_currency_id'] = $currency->id;
|
||||||
|
}
|
||||||
|
|
||||||
Log::debug('Found no bill so must create one ourselves. Assume default values.', $data);
|
Log::debug('Found no bill so must create one ourselves. Assume default values.', $data);
|
||||||
$result = $this->repository->store($data);
|
$result = $this->repository->store($data);
|
||||||
if (null !== $result) {
|
if (null !== $result) {
|
||||||
|
@@ -176,7 +176,7 @@ class MonetaryAccountBank extends BunqObject
|
|||||||
'monetary_account_profile' => $this->monetaryAccountProfile->toArray(),
|
'monetary_account_profile' => $this->monetaryAccountProfile->toArray(),
|
||||||
'setting' => $this->setting->toArray(),
|
'setting' => $this->setting->toArray(),
|
||||||
'overdraft_limit' => $this->overdraftLimit->toArray(),
|
'overdraft_limit' => $this->overdraftLimit->toArray(),
|
||||||
'avatar' => null === $this->avatar ? null : $this->avatar->toArray()->toArray(),
|
'avatar' => null === $this->avatar ? null : $this->avatar->toArray(),
|
||||||
'reason' => $this->reason,
|
'reason' => $this->reason,
|
||||||
'reason_description' => $this->reasonDescription,
|
'reason_description' => $this->reasonDescription,
|
||||||
'alias' => [],
|
'alias' => [],
|
||||||
|
Reference in New Issue
Block a user