mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Auto commit for release 'develop' on 2024-12-28
This commit is contained in:
parent
f2166b97b8
commit
6c655634bc
@ -61,6 +61,7 @@ class CorrectsNativeAmounts extends Command
|
||||
{
|
||||
if (!config('cer.enabled')) {
|
||||
$this->friendlyInfo('This command will not run because currency exchange rates are disabled.');
|
||||
|
||||
return 0;
|
||||
}
|
||||
Log::debug('Will update all native amounts. This may take some time.');
|
||||
|
@ -71,6 +71,7 @@ class UpgradesTransferCurrencies extends Command
|
||||
if ($this->count > 0) {
|
||||
$this->friendlyInfo(sprintf('Verified currency information of %d transfer(s).', $this->count));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -290,7 +291,8 @@ class UpgradesTransferCurrencies extends Command
|
||||
if (null === $this->sourceTransaction->transaction_currency_id && null !== $this->sourceCurrency) {
|
||||
$this->sourceTransaction
|
||||
->transaction_currency_id
|
||||
= $this->sourceCurrency->id;
|
||||
= $this->sourceCurrency->id
|
||||
;
|
||||
$message = sprintf(
|
||||
'Transaction #%d has no currency setting, now set to %s.',
|
||||
$this->sourceTransaction->id,
|
||||
@ -335,7 +337,8 @@ class UpgradesTransferCurrencies extends Command
|
||||
if (null === $this->destinationTransaction->transaction_currency_id && null !== $this->destinationCurrency) {
|
||||
$this->destinationTransaction
|
||||
->transaction_currency_id
|
||||
= $this->destinationCurrency->id;
|
||||
= $this->destinationCurrency->id
|
||||
;
|
||||
$message = sprintf(
|
||||
'Transaction #%d has no currency setting, now set to %s.',
|
||||
$this->destinationTransaction->id,
|
||||
|
@ -68,9 +68,7 @@ class Handler extends ExceptionHandler
|
||||
/**
|
||||
* Register the exception handling callbacks for the application.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
}
|
||||
public function register(): void {}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response. It's complex but lucky for us, we never use it because
|
||||
|
@ -90,7 +90,7 @@ class EditController extends Controller
|
||||
$latitude = null !== $location ? $location->latitude : config('firefly.default_location.latitude');
|
||||
$longitude = null !== $location ? $location->longitude : config('firefly.default_location.longitude');
|
||||
$zoomLevel = null !== $location ? $location->zoom_level : config('firefly.default_location.zoom_level');
|
||||
$canEditCurrency = $account->piggyBanks()->count() === 0;
|
||||
$canEditCurrency = 0 === $account->piggyBanks()->count();
|
||||
$hasLocation = null !== $location;
|
||||
$locations = [
|
||||
'location' => [
|
||||
|
@ -154,7 +154,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
$journals = $collector->getExtractedJournals();
|
||||
$array = [];
|
||||
// default currency information for native stuff.
|
||||
$convertToNative = Amount::convertToNative($this->user);;
|
||||
$convertToNative = Amount::convertToNative($this->user);
|
||||
$default = Amount::getDefaultCurrency();
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
|
@ -331,7 +331,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
$collector->setUser($this->user)->setRange($start, $end)->setTypes([TransactionTypeEnum::WITHDRAWAL->value]);
|
||||
|
||||
// default currency information for native stuff.
|
||||
$convertToNative = Amount::convertToNative($this->user);;
|
||||
$convertToNative = Amount::convertToNative($this->user);
|
||||
$default = Amount::getDefaultCurrency();
|
||||
if (null !== $accounts && $accounts->count() > 0) {
|
||||
$collector->setAccounts($accounts);
|
||||
@ -411,7 +411,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
}
|
||||
$collector->setCategories($categories);
|
||||
$journals = $collector->getExtractedJournals();
|
||||
$convertToNative = Amount::convertToNative($this->user);;
|
||||
$convertToNative = Amount::convertToNative($this->user);
|
||||
$default = Amount::getDefaultCurrency();
|
||||
$array = [];
|
||||
|
||||
|
@ -30,6 +30,7 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use FireflyIII\Support\Facades\Preferences;
|
||||
|
||||
/**
|
||||
* Class Amount.
|
||||
@ -70,9 +71,10 @@ class Amount
|
||||
public function convertToNative(?User $user = null): bool
|
||||
{
|
||||
if (null === $user) {
|
||||
return \FireflyIII\Support\Facades\Preferences::get('convert_to_native', false)->data && config('cer.enabled');
|
||||
return Preferences::get('convert_to_native', false)->data && config('cer.enabled');
|
||||
}
|
||||
return \FireflyIII\Support\Facades\Preferences::getForUser($user, 'convert_to_native', false)->data && config('cer.enabled');
|
||||
|
||||
return Preferences::getForUser($user, 'convert_to_native', false)->data && config('cer.enabled');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,7 @@ use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\Amount;
|
||||
|
||||
/**
|
||||
* Class Steam.
|
||||
@ -310,8 +311,8 @@ class Steam
|
||||
public function finalAccountBalance(Account $account, Carbon $date): array
|
||||
{
|
||||
Log::debug(sprintf('Now in finalAccountBalance(#%d, "%s", "%s")', $account->id, $account->name, $date->format('Y-m-d H:i:s')));
|
||||
$native = \FireflyIII\Support\Facades\Amount::getDefaultCurrencyByUserGroup($account->user->userGroup);
|
||||
$convertToNative = \FireflyIII\Support\Facades\Amount::convertToNative($account->user);
|
||||
$native = Amount::getDefaultCurrencyByUserGroup($account->user->userGroup);
|
||||
$convertToNative = Amount::convertToNative($account->user);
|
||||
$accountCurrency = $this->getAccountCurrency($account);
|
||||
$hasCurrency = null !== $accountCurrency;
|
||||
$currency = $hasCurrency ? $accountCurrency : $native;
|
||||
|
18
changelog.md
18
changelog.md
@ -10,17 +10,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Multi-currency support. If you set `ENABLE_EXCHANGE_RATES=true` and optionally `ENABLE_EXTERNAL_RATES=true` Firefly III will try to calculate all foreign currencies back to your native currency. This is a work in progress, not all fields and all places will support this yet. Please check out the [documentation](https://docs.firefly-iii.org/explanation/financial-concepts/exchange-rates/).
|
||||
- Notifications support Nfty, Pushover, Slack and Discord.
|
||||
- Many new security related notifications.
|
||||
- #5523
|
||||
- #8531
|
||||
- #8307
|
||||
- #7945
|
||||
- #6760
|
||||
- #6557
|
||||
- [Issue 5523](https://github.com/firefly-iii/firefly-iii/issues/5523) (Add comment on a budget for a given month) reported by @n-serrette
|
||||
- [Issue 8531](https://github.com/firefly-iii/firefly-iii/issues/8531) (Add `notes` to transaction audit report) reported by @clouserw
|
||||
- [Issue 8307](https://github.com/firefly-iii/firefly-iii/issues/8307) (Notification support for Ntfy (and other push notification tools)) reported by @ragnarkarlsson
|
||||
- [Issue 7945](https://github.com/firefly-iii/firefly-iii/issues/7945) ("Rules" that only trigger manually) reported by @SekoiaTree
|
||||
- [Issue 6760](https://github.com/firefly-iii/firefly-iii/issues/6760) (Add a new trigger for automated rules) reported by @Gsyltc
|
||||
- [Issue 6557](https://github.com/firefly-iii/firefly-iii/issues/6557) (Piggy Banks - Draw Funds from Multiple Accounts) reported by @BugPhobic
|
||||
|
||||
### Changed
|
||||
|
||||
- Firefly III requires PHP 8.4.
|
||||
- #9501
|
||||
- [Issue 9501](https://github.com/firefly-iii/firefly-iii/issues/9501) (PHP8.4 support) reported by @JC5
|
||||
- Docker container no longer runs under root.
|
||||
- "Bills" are now called "subscriptions" to better reflect their purpose.
|
||||
|
||||
@ -31,8 +31,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Fixed
|
||||
|
||||
- #9532
|
||||
- #7288
|
||||
- [Issue 9532](https://github.com/firefly-iii/firefly-iii/issues/9532) (ReportSum Integrity Check fails due to empty foreign_amount) reported by @SircasticFox
|
||||
- [Issue 7288](https://github.com/firefly-iii/firefly-iii/issues/7288) (currentMonthStart/currentMonthEnd not working for no-budget view) reported by @bradsk88
|
||||
|
||||
### API
|
||||
|
||||
|
@ -81,7 +81,7 @@ return [
|
||||
'running_balance_column' => env('USE_RUNNING_BALANCE', false),
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2024-12-27',
|
||||
'version' => 'develop/2024-12-28',
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 25,
|
||||
|
||||
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
@ -19,7 +20,7 @@ return new class () extends Migration {
|
||||
$table->dropForeign('piggy_banks_account_id_foreign');
|
||||
});
|
||||
} catch (RuntimeException $e) {
|
||||
\Illuminate\Support\Facades\Log::error('Could not drop foreign key "piggy_banks_account_id_foreign". Probably not an issue.');
|
||||
Log::error('Could not drop foreign key "piggy_banks_account_id_foreign". Probably not an issue.');
|
||||
}
|
||||
Schema::table('piggy_banks', static function (Blueprint $table): void {
|
||||
// 2. make column nullable.
|
||||
|
Loading…
Reference in New Issue
Block a user