mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-21 16:38:36 -06:00
Auto commit for release 'develop' on 2024-05-18
This commit is contained in:
parent
822f609a22
commit
a39f0e1891
@ -55,8 +55,9 @@ class AccountController extends Controller
|
||||
$userGroup = $this->validateUserGroup($request);
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->repository->setUserGroup($userGroup);
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
$this->converter = app(ExchangeRateConverter::class);
|
||||
$this->default = app('amount')->getDefaultCurrency();
|
||||
$this->converter = app(ExchangeRateConverter::class);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
|
@ -64,13 +64,13 @@ class CategoryController extends Controller
|
||||
public function categories(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$queryParameters = $request->getParameters();
|
||||
$result = $this->repository->searchCategory($queryParameters['query'], $queryParameters['size']);
|
||||
$filtered = $result->map(
|
||||
$result = $this->repository->searchCategory($queryParameters['query'], $queryParameters['size']);
|
||||
$filtered = $result->map(
|
||||
static function (Category $item) {
|
||||
return [
|
||||
'id' => (string)$item->id,
|
||||
'id' => (string)$item->id,
|
||||
'title' => $item->name,
|
||||
'meta' => [],
|
||||
'meta' => [],
|
||||
];
|
||||
}
|
||||
);
|
||||
|
@ -67,8 +67,8 @@ class TransactionController extends Controller
|
||||
$result = $this->repository->searchJournalDescriptions($queryParameters['query'], $queryParameters['size']);
|
||||
|
||||
// limit and unique
|
||||
$filtered = $result->unique('description');
|
||||
$array = [];
|
||||
$filtered = $result->unique('description');
|
||||
$array = [];
|
||||
|
||||
/** @var TransactionJournal $journal */
|
||||
foreach ($filtered as $journal) {
|
||||
|
@ -73,28 +73,28 @@ class AutocompleteRequest extends FormRequest
|
||||
];
|
||||
}
|
||||
|
||||
// public function getData(): array
|
||||
// {
|
||||
//
|
||||
// return [];
|
||||
// $types = $this->convertString('types');
|
||||
// $array = [];
|
||||
// if ('' !== $types) {
|
||||
// $array = explode(',', $types);
|
||||
// }
|
||||
// $limit = $this->convertInteger('limit');
|
||||
// $limit = 0 === $limit ? 10 : $limit;
|
||||
//
|
||||
// // remove 'initial balance' and another from allowed types. its internal
|
||||
// $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
|
||||
//
|
||||
// return [
|
||||
// 'types' => $array,
|
||||
// 'query' => $this->convertString('query'),
|
||||
// 'date' => $this->getCarbonDate('date'),
|
||||
// 'limit' => $limit,
|
||||
// ];
|
||||
// }
|
||||
// public function getData(): array
|
||||
// {
|
||||
//
|
||||
// return [];
|
||||
// $types = $this->convertString('types');
|
||||
// $array = [];
|
||||
// if ('' !== $types) {
|
||||
// $array = explode(',', $types);
|
||||
// }
|
||||
// $limit = $this->convertInteger('limit');
|
||||
// $limit = 0 === $limit ? 10 : $limit;
|
||||
//
|
||||
// // remove 'initial balance' and another from allowed types. its internal
|
||||
// $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
|
||||
//
|
||||
// return [
|
||||
// 'types' => $array,
|
||||
// 'query' => $this->convertString('query'),
|
||||
// 'date' => $this->getCarbonDate('date'),
|
||||
// 'limit' => $limit,
|
||||
// ];
|
||||
// }
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
|
@ -37,9 +37,9 @@ class FixIbans extends Command
|
||||
{
|
||||
use ShowsFriendlyMessages;
|
||||
|
||||
protected $description = 'Removes spaces from IBANs';
|
||||
protected $signature = 'firefly-iii:fix-ibans';
|
||||
private int $count = 0;
|
||||
protected $description = 'Removes spaces from IBANs';
|
||||
protected $signature = 'firefly-iii:fix-ibans';
|
||||
private int $count = 0;
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
@ -60,7 +60,7 @@ class FixIbans extends Command
|
||||
{
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$iban = (string) $account->iban;
|
||||
$iban = (string) $account->iban;
|
||||
$newIban = app('steam')->filterSpaces($iban);
|
||||
if ('' !== $iban && $iban !== $newIban) {
|
||||
$account->iban = $newIban;
|
||||
@ -77,13 +77,13 @@ class FixIbans extends Command
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$userId = $account->user_id;
|
||||
$userId = $account->user_id;
|
||||
$set[$userId] ??= [];
|
||||
$iban = (string) $account->iban;
|
||||
$iban = (string) $account->iban;
|
||||
if ('' === $iban) {
|
||||
continue;
|
||||
}
|
||||
$type = $account->accountType->type;
|
||||
$type = $account->accountType->type;
|
||||
if (in_array($type, [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], true)) {
|
||||
$type = 'liabilities';
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
public function findByIbanNull(string $iban, array $types): ?Account
|
||||
{
|
||||
$iban = Steam::filterSpaces($iban);
|
||||
$iban = Steam::filterSpaces($iban);
|
||||
$query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
||||
|
||||
if (0 !== count($types)) {
|
||||
|
@ -81,7 +81,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
public function findByIbanNull(string $iban, array $types): ?Account
|
||||
{
|
||||
$iban = Steam::filterSpaces($iban);
|
||||
$iban = Steam::filterSpaces($iban);
|
||||
$query = $this->userGroup->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
||||
|
||||
if (0 !== count($types)) {
|
||||
|
@ -96,7 +96,6 @@ class UniqueIban implements ValidationRule
|
||||
$maxCounts = $this->getMaxOccurrences();
|
||||
|
||||
foreach ($maxCounts as $type => $max) {
|
||||
|
||||
// make sure to trim the value of $value so all spaces are removed.
|
||||
$value = Steam::filterSpaces($value);
|
||||
|
||||
|
@ -140,6 +140,7 @@ trait ConvertsDataTypes
|
||||
public function clearIban(?string $string): ?string
|
||||
{
|
||||
$string = $this->clearString($string);
|
||||
|
||||
return Steam::filterSpaces($string);
|
||||
}
|
||||
|
||||
|
@ -682,7 +682,7 @@ class Steam
|
||||
"\u{3000}", // ideographic space
|
||||
"\u{FEFF}", // zero width no -break space
|
||||
"\x20", // plain old normal space,
|
||||
' '
|
||||
' ',
|
||||
];
|
||||
|
||||
// clear zalgo text
|
||||
|
@ -117,7 +117,7 @@ return [
|
||||
'expression_engine' => false,
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2024-05-16',
|
||||
'version' => 'develop/2024-05-18',
|
||||
'api_version' => '2.0.14',
|
||||
'db_version' => 24,
|
||||
|
||||
|
@ -2157,7 +2157,7 @@ return [
|
||||
'logout' => 'Desconectar',
|
||||
'logout_other_sessions' => 'Sair de todas as outras sessões',
|
||||
'toggleNavigation' => 'Alternar navegação',
|
||||
'toggle_dropdown' => 'Toggle dropdown',
|
||||
'toggle_dropdown' => 'Ativar/Desativar Menu Suspenso',
|
||||
'searchPlaceholder' => 'Pesquisar...',
|
||||
'version' => 'Versão',
|
||||
'dashboard' => 'Painel de Controle',
|
||||
|
Loading…
Reference in New Issue
Block a user