Skip to content

Firefly III: a personal finances manager

Fix #10891

James Colecb6b3d5f856e
diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php
index c484ae2cc5..7edec3b797 100644
--- a/app/Models/CurrencyExchangeRate.php
+++ b/app/Models/CurrencyExchangeRate.php
@@ -38,7 +38,7 @@ class CurrencyExchangeRate extends Model
use ReturnsIntegerUserIdTrait;
use SoftDeletes;
- protected $fillable = ['user_id', 'from_currency_id', 'to_currency_id', 'date', 'date_tz', 'rate'];
+ protected $fillable = ['user_id','user_group_id', 'from_currency_id', 'to_currency_id', 'date', 'date_tz', 'rate'];
public function fromCurrency(): BelongsTo
{
diff --git a/app/Support/Cronjobs/AutoBudgetCronjob.php b/app/Support/Cronjobs/AutoBudgetCronjob.php
index f71a4a4da1..9a2a5a0d66 100644
--- a/app/Support/Cronjobs/AutoBudgetCronjob.php
+++ b/app/Support/Cronjobs/AutoBudgetCronjob.php
@@ -40,8 +40,8 @@ class AutoBudgetCronjob extends AbstractCronjob
/** @var Configuration $config */
$config = FireflyConfig::get('last_ab_job', 0);
$lastTime = (int) $config->data;
- $diff = Carbon::now()->getTimestamp() - $lastTime;
- $diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
+ $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) {
Log::info('Auto budget cron-job has never fired before.');
}
diff --git a/app/Support/Cronjobs/BillWarningCronjob.php b/app/Support/Cronjobs/BillWarningCronjob.php
index aece4d403f..8a30bb9c0a 100644
--- a/app/Support/Cronjobs/BillWarningCronjob.php
+++ b/app/Support/Cronjobs/BillWarningCronjob.php
@@ -46,8 +46,8 @@ class BillWarningCronjob extends AbstractCronjob
/** @var Configuration $config */
$config = FireflyConfig::get('last_bw_job', 0);
$lastTime = (int) $config->data;
- $diff = Carbon::now()->getTimestamp() - $lastTime;
- $diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
+ $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) {
Log::info('The bill notification cron-job has never fired before.');
diff --git a/app/Support/Cronjobs/ExchangeRatesCronjob.php b/app/Support/Cronjobs/ExchangeRatesCronjob.php
index f7d80b8033..71c9a8e587 100644
--- a/app/Support/Cronjobs/ExchangeRatesCronjob.php
+++ b/app/Support/Cronjobs/ExchangeRatesCronjob.php
@@ -40,8 +40,8 @@ class ExchangeRatesCronjob extends AbstractCronjob
/** @var Configuration $config */
$config = FireflyConfig::get('last_cer_job', 0);
$lastTime = (int) $config->data;
- $diff = Carbon::now()->getTimestamp() - $lastTime;
- $diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
+ $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) {
Log::info('Exchange rates cron-job has never fired before.');
}
diff --git a/app/Support/Cronjobs/RecurringCronjob.php b/app/Support/Cronjobs/RecurringCronjob.php
index cc6bb7f901..c722733253 100644
--- a/app/Support/Cronjobs/RecurringCronjob.php
+++ b/app/Support/Cronjobs/RecurringCronjob.php
@@ -46,8 +46,8 @@ class RecurringCronjob extends AbstractCronjob
/** @var Configuration $config */
$config = FireflyConfig::get('last_rt_job', 0);
$lastTime = (int) $config->data;
- $diff = Carbon::now()->getTimestamp() - $lastTime;
- $diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
+ $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) {
Log::info('Recurring transactions cron-job has never fired before.');
diff --git a/app/Support/Cronjobs/WebhookCronjob.php b/app/Support/Cronjobs/WebhookCronjob.php
index dcac057140..0cd1899380 100644
--- a/app/Support/Cronjobs/WebhookCronjob.php
+++ b/app/Support/Cronjobs/WebhookCronjob.php
@@ -46,8 +46,8 @@ class WebhookCronjob extends AbstractCronjob
/** @var Configuration $config */
$config = FireflyConfig::get('last_webhook_job', 0);
$lastTime = (int) $config->data;
- $diff = Carbon::now()->getTimestamp() - $lastTime;
- $diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
+ $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
+ $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) {
Log::info('The webhook cron-job has never fired before.');