mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-11 17:39:41 +00:00
Merge branch 'develop' of https://github.com/firefly-iii/firefly-iii into develop
* 'develop' of https://github.com/firefly-iii/firefly-iii: New translation strings. Update JournalRepository.php Update Amount.php Update ImportStorage.php Fix #854 Enable mod_ssl by default
This commit is contained in:
@@ -36,6 +36,10 @@ class Amount implements ConverterInterface
|
||||
*/
|
||||
public function convert($value): string
|
||||
{
|
||||
if(is_null($value)) {
|
||||
return '0';
|
||||
}
|
||||
$value = strval($value);
|
||||
Log::debug(sprintf('Start with amount "%s"', $value));
|
||||
$len = strlen($value);
|
||||
$decimalPosition = $len - 3;
|
||||
|
||||
@@ -39,11 +39,11 @@ class ImportStorage
|
||||
/** @var string */
|
||||
private $dateFormat = 'Ymd'; // yes, hard coded
|
||||
/** @var ImportJob */
|
||||
private $job;
|
||||
protected $job;
|
||||
/** @var Collection */
|
||||
private $objects;
|
||||
/** @var Collection */
|
||||
private $rules;
|
||||
protected $rules;
|
||||
|
||||
/** @var array */
|
||||
private $transfers = [];
|
||||
|
||||
@@ -35,6 +35,11 @@ use Illuminate\Database\Query\JoinClause;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Trait ImportSupport
|
||||
*
|
||||
* @package FireflyIII\Import\Storage
|
||||
*/
|
||||
trait ImportSupport
|
||||
{
|
||||
/** @var int */
|
||||
|
||||
@@ -196,7 +196,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
$journal->save();
|
||||
|
||||
// store stuff:
|
||||
$this->storeCategoryWithJournal($journal, $data['category']);
|
||||
$this->storeCategoryWithJournal($journal, strval($data['category']));
|
||||
$this->storeBudgetWithJournal($journal, $data['budget_id']);
|
||||
|
||||
// store two transactions:
|
||||
@@ -271,7 +271,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
$journal->categories()->detach();
|
||||
$journal->budgets()->detach();
|
||||
|
||||
$this->storeCategoryWithJournal($journal, $data['category']);
|
||||
$this->storeCategoryWithJournal($journal, strval($data['category']));
|
||||
$this->storeBudgetWithJournal($journal, $data['budget_id']);
|
||||
|
||||
// negative because source loses money.
|
||||
|
||||
Reference in New Issue
Block a user