mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge branch 'develop' of github.com:JC5/firefly-iii into develop
This commit is contained in:
commit
9f1ea0807b
@ -36,6 +36,10 @@ class Amount implements ConverterInterface
|
|||||||
*/
|
*/
|
||||||
public function convert($value): string
|
public function convert($value): string
|
||||||
{
|
{
|
||||||
|
if(is_null($value)) {
|
||||||
|
return '0';
|
||||||
|
}
|
||||||
|
$value = strval($value);
|
||||||
Log::debug(sprintf('Start with amount "%s"', $value));
|
Log::debug(sprintf('Start with amount "%s"', $value));
|
||||||
$len = strlen($value);
|
$len = strlen($value);
|
||||||
$decimalPosition = $len - 3;
|
$decimalPosition = $len - 3;
|
||||||
|
@ -39,7 +39,7 @@ class ImportStorage
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
private $dateFormat = 'Ymd'; // yes, hard coded
|
private $dateFormat = 'Ymd'; // yes, hard coded
|
||||||
/** @var ImportJob */
|
/** @var ImportJob */
|
||||||
private $job;
|
protected $job;
|
||||||
/** @var Collection */
|
/** @var Collection */
|
||||||
private $objects;
|
private $objects;
|
||||||
/** @var Collection */
|
/** @var Collection */
|
||||||
|
@ -196,7 +196,7 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
$journal->save();
|
$journal->save();
|
||||||
|
|
||||||
// store stuff:
|
// store stuff:
|
||||||
$this->storeCategoryWithJournal($journal, $data['category']);
|
$this->storeCategoryWithJournal($journal, strval($data['category']));
|
||||||
$this->storeBudgetWithJournal($journal, $data['budget_id']);
|
$this->storeBudgetWithJournal($journal, $data['budget_id']);
|
||||||
|
|
||||||
// store two transactions:
|
// store two transactions:
|
||||||
@ -271,7 +271,7 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
$journal->categories()->detach();
|
$journal->categories()->detach();
|
||||||
$journal->budgets()->detach();
|
$journal->budgets()->detach();
|
||||||
|
|
||||||
$this->storeCategoryWithJournal($journal, $data['category']);
|
$this->storeCategoryWithJournal($journal, strval($data['category']));
|
||||||
$this->storeBudgetWithJournal($journal, $data['budget_id']);
|
$this->storeBudgetWithJournal($journal, $data['budget_id']);
|
||||||
|
|
||||||
// negative because source loses money.
|
// negative because source loses money.
|
||||||
|
Loading…
Reference in New Issue
Block a user