Merge branch 'develop' into feature/credit_calc

# Conflicts:
#	app/Factory/TransactionJournalMetaFactory.php
#	app/Repositories/Account/AccountRepository.php
#	app/Transformers/AccountTransformer.php
#	config/firefly.php
#	frontend/src/components/accounts/Create.vue
This commit is contained in:
James Cole
2021-04-27 06:54:38 +02:00
259 changed files with 3163 additions and 2520 deletions

View File

@@ -221,16 +221,15 @@ class ExpandedForm
/** @var Eloquent $entry */
foreach ($set as $entry) {
$entryId = (int)$entry->id; // @phpstan-ignore-line
$current = $entry->toArray();
$title = null;
foreach ($fields as $field) {
if (property_exists($entry, $field) && null === $title) {
$title = $entry->$field; // @phpstan-ignore-line
if (array_key_exists($field, $current) && null === $title) {
$title = $current[$field]; // @phpstan-ignore-line
}
}
$selectList[$entryId] = $title;
}
return $selectList;
}

View File

@@ -153,7 +153,7 @@ class Preferences
*/
public function getForUser(User $user, string $name, $default = null): ?Preference
{
$preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']);
$preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id','user_id', 'name', 'data', 'updated_at', 'created_at']);
if (null !== $preference && null === $preference->data) {
try {
$preference->delete();

View File

@@ -476,6 +476,12 @@ class OperatorQuerySearch implements SearchInterface
//
// bill
//
case 'has_no_bill':
$this->collector->withoutBill();
break;
case 'has_any_bill':
$this->collector->withBill();
break;
case 'bill_is':
$result = $this->billRepository->searchBill($value, 25);
if ($result->count() > 0) {