mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 21:23:36 +00:00
🤖 Auto commit for release 'develop' on 2026-01-23
This commit is contained in:
@@ -80,8 +80,8 @@ class CreateController extends Controller
|
||||
|
||||
Preferences::mark();
|
||||
|
||||
$title = $newGroup->title ?? $newGroup->transactionJournals->first()->description;
|
||||
$link = route('transactions.show', [$newGroup->id]);
|
||||
$title = $newGroup->title ?? $newGroup->transactionJournals->first()->description;
|
||||
$link = route('transactions.show', [$newGroup->id]);
|
||||
session()->flash('success', trans('firefly.stored_journal', ['description' => $title]));
|
||||
session()->flash('success_url', $link);
|
||||
|
||||
@@ -103,19 +103,19 @@ class CreateController extends Controller
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws UrlException
|
||||
*/
|
||||
public function create(null|string $objectType): Factory|View
|
||||
public function create(?string $objectType): Factory|View
|
||||
{
|
||||
Preferences::mark();
|
||||
|
||||
$sourceId = (int) request()->get('source');
|
||||
$destinationId = (int) request()->get('destination');
|
||||
$sourceId = (int) request()->get('source');
|
||||
$destinationId = (int) request()->get('destination');
|
||||
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$cash = $accountRepository->getCashAccount();
|
||||
$preFilled = session()->has('preFilled') ? session('preFilled') : [];
|
||||
$subTitle = (string) trans(sprintf('breadcrumbs.create_%s', strtolower((string) $objectType)));
|
||||
$subTitleIcon = 'fa-plus';
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$cash = $accountRepository->getCashAccount();
|
||||
$preFilled = session()->has('preFilled') ? session('preFilled') : [];
|
||||
$subTitle = (string) trans(sprintf('breadcrumbs.create_%s', strtolower((string) $objectType)));
|
||||
$subTitleIcon = 'fa-plus';
|
||||
|
||||
/** @var null|array $optionalFields */
|
||||
$optionalFields = Preferences::get('transaction_journal_optional_fields', [])->data;
|
||||
@@ -129,23 +129,23 @@ class CreateController extends Controller
|
||||
$optionalFields = [];
|
||||
}
|
||||
// not really a fan of this, but meh.
|
||||
$optionalDateFields = [
|
||||
$optionalDateFields = [
|
||||
'interest_date' => $optionalFields['interest_date'] ?? false,
|
||||
'book_date' => $optionalFields['book_date'] ?? false,
|
||||
'process_date' => $optionalFields['process_date'] ?? false,
|
||||
'due_date' => $optionalFields['due_date'] ?? false,
|
||||
'payment_date' => $optionalFields['payment_date'] ?? false,
|
||||
'invoice_date' => $optionalFields['invoice_date'] ?? false
|
||||
'invoice_date' => $optionalFields['invoice_date'] ?? false,
|
||||
];
|
||||
$optionalFields['external_url'] ??= false;
|
||||
$optionalFields['location'] ??= false;
|
||||
$optionalFields['location'] =
|
||||
$optionalFields['location'] && true === FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
|
||||
$optionalFields['location'] ??= false;
|
||||
$optionalFields['location']
|
||||
= $optionalFields['location'] && true === FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
|
||||
|
||||
// map info:
|
||||
$longitude = config('firefly.default_location.longitude');
|
||||
$latitude = config('firefly.default_location.latitude');
|
||||
$zoomLevel = config('firefly.default_location.zoom_level');
|
||||
$longitude = config('firefly.default_location.longitude');
|
||||
$latitude = config('firefly.default_location.latitude');
|
||||
$zoomLevel = config('firefly.default_location.zoom_level');
|
||||
|
||||
session()->put('preFilled', $preFilled);
|
||||
|
||||
@@ -164,7 +164,7 @@ class CreateController extends Controller
|
||||
'allowedOpposingTypes' => $allowedOpposingTypes,
|
||||
'accountToTypes' => $accountToTypes,
|
||||
'sourceId' => $sourceId,
|
||||
'destinationId' => $destinationId
|
||||
'destinationId' => $destinationId,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user