mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-17 03:14:22 +00:00
Compare commits
7 Commits
release-17
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8814fb0806 | ||
|
|
7481c8d4c0 | ||
|
|
1e618fbf6d | ||
|
|
8b322dc903 | ||
|
|
812b0e6940 | ||
|
|
9070856b9c | ||
|
|
84082d38f2 |
@@ -28,6 +28,7 @@ use FireflyIII\Enums\WebhookTrigger;
|
||||
use FireflyIII\Events\DestroyedTransactionGroup;
|
||||
use FireflyIII\Events\RequestedSendWebhookMessages;
|
||||
use FireflyIII\Generator\Webhook\MessageGeneratorInterface;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -61,6 +62,9 @@ class DestroyedGroupEventHandler
|
||||
|
||||
private function updateRunningBalance(DestroyedTransactionGroup $event): void
|
||||
{
|
||||
if (false === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
|
||||
return;
|
||||
}
|
||||
Log::debug(__METHOD__);
|
||||
$group = $event->transactionGroup;
|
||||
foreach ($group->transactionJournals as $journal) {
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\PeriodStatistic\PeriodStatisticRepositoryInterface;
|
||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use FireflyIII\TransactionRules\Engine\RuleEngineInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -217,6 +218,9 @@ class UpdatedGroupEventHandler
|
||||
|
||||
private function updateRunningBalance(UpdatedTransactionGroup $event): void
|
||||
{
|
||||
if (false === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
|
||||
return;
|
||||
}
|
||||
Log::debug(__METHOD__);
|
||||
$group = $event->transactionGroup;
|
||||
foreach ($group->transactionJournals as $journal) {
|
||||
|
||||
@@ -113,7 +113,9 @@ class DebugController extends Controller
|
||||
|
||||
// also do some recalculations.
|
||||
Artisan::call('correction:recalculates-liabilities');
|
||||
AccountBalanceCalculator::recalculateAll(false);
|
||||
if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
|
||||
AccountBalanceCalculator::recalculateAll(false);
|
||||
}
|
||||
|
||||
try {
|
||||
Artisan::call('twig:clean');
|
||||
|
||||
@@ -45,11 +45,11 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
Schema::defaultStringLength(191);
|
||||
// Passport::$clientUuids = false;
|
||||
Response::macro('api', function (array $value) {
|
||||
Response::macro('api', function (array $value) {
|
||||
$headers = [
|
||||
'Cache-Control' => 'no-store',
|
||||
];
|
||||
$uuid = (string) request()->header('X-Trace-Id');
|
||||
$uuid = (string)request()->header('X-Trace-Id');
|
||||
if ('' !== trim($uuid) && (1 === preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)))) {
|
||||
$headers['X-Trace-Id'] = $uuid;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
});
|
||||
|
||||
// blade extension
|
||||
Blade::directive('activeXRoutePartial', function (string $route): string {
|
||||
Blade::directive('activeXRoutePartial', function (string $route): string {
|
||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
||||
if (str_contains($name, $route)) {
|
||||
return 'menu-open';
|
||||
@@ -69,7 +69,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
return '';
|
||||
});
|
||||
Blade::if('partialroute', function (string $route, string $firstParam = ''): bool {
|
||||
Blade::if('partialroute', function (string $route, string $firstParam = ''): bool {
|
||||
$name = Route::getCurrentRoute()->getName() ?? '';
|
||||
if ('' === $firstParam && str_contains($name, $route)) {
|
||||
return true;
|
||||
|
||||
@@ -514,7 +514,7 @@ class BillRepository implements BillRepositoryInterface, UserGroupInterface
|
||||
{
|
||||
$query = sprintf('%%%s%%', $query);
|
||||
|
||||
return $this->user->bills()->whereLike('name', $query)->take($limit)->get();
|
||||
return $this->user->bills()->orderBy('name','ASC')->whereLike('name', $query)->take($limit)->get();
|
||||
}
|
||||
|
||||
public function setObjectGroup(Bill $bill, string $objectGroupTitle): Bill
|
||||
|
||||
@@ -331,7 +331,7 @@ class CategoryRepository implements CategoryRepositoryInterface, UserGroupInterf
|
||||
|
||||
public function searchCategory(string $query, int $limit): Collection
|
||||
{
|
||||
$search = $this->user->categories();
|
||||
$search = $this->user->categories()->orderBy('name', 'ASC');
|
||||
if ('' !== $query) {
|
||||
$search->whereLike('name', sprintf('%%%s%%', $query));
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
|
||||
public function searchCurrency(string $search, int $limit): Collection
|
||||
{
|
||||
$query = TransactionCurrency::where('enabled', true);
|
||||
$query = TransactionCurrency::where('enabled', true)->orderBy('code', 'ASC');
|
||||
if ('' !== $search) {
|
||||
$query->whereLike('name', sprintf('%%%s%%', $search));
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
{
|
||||
$query = $this->user->transactionJournals()
|
||||
->orderBy('date', 'DESC')
|
||||
->orderBy('description', 'ASC')
|
||||
;
|
||||
if ('' !== $search) {
|
||||
$query->whereLike('description', sprintf('%%%s%%', $search));
|
||||
|
||||
@@ -431,7 +431,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface, UserGroupInte
|
||||
'objectGroups',
|
||||
]
|
||||
)
|
||||
->orderBy('piggy_banks.order', 'ASC')->distinct()
|
||||
->orderBy('piggy_banks.order', 'ASC')->orderBy('piggy_banks.name', 'ASC')->distinct()
|
||||
;
|
||||
if ('' !== $query) {
|
||||
$search->whereLike('piggy_banks.name', sprintf('%%%s%%', $query));
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Models\AccountBalance;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -64,6 +65,9 @@ class AccountBalanceCalculator
|
||||
|
||||
public static function recalculateForJournal(TransactionJournal $transactionJournal): void
|
||||
{
|
||||
if (false === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
|
||||
return;
|
||||
}
|
||||
Log::debug(__METHOD__);
|
||||
$object = new self();
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Validation;
|
||||
|
||||
use ErrorException;
|
||||
use FireflyIII\Support\Facades\Preferences;
|
||||
use Config;
|
||||
use FireflyIII\Enums\AccountTypeEnum;
|
||||
@@ -210,7 +211,12 @@ class FireflyValidator extends Validator
|
||||
$value = strtoupper($value);
|
||||
|
||||
// replace characters outside of ASCI range.
|
||||
$value = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $value);
|
||||
try {
|
||||
$value = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $value);
|
||||
} catch(ErrorException $e) {
|
||||
Log::error(sprintf('Could not convert IBAN "%s" to safe characters. Future steps may fail.', $value));
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
$search = [' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
||||
$replace = ['', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35'];
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ return [
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2026-01-14',
|
||||
'build_time' => 1768366713,
|
||||
'build_time' => 1768367341,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 28, // field is no longer used.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user