Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2026-09-14

JC53fa37ae6873c
diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.php
index 94be2ae461..df99eef909 100644
--- a/app/Api/V1/Controllers/Insight/Income/TagController.php
+++ b/app/Api/V1/Controllers/Insight/Income/TagController.php
@@ -158,10 +158,7 @@ final class TagController extends Controller
'currency_id' => (string) $foreignCurrencyId,
'currency_code' => $journal['foreign_currency_code'],
];
- $response[$foreignKey]['difference'] = bcadd(
- (string) $response[$foreignKey]['difference'],
- Steam::positive($journal['foreign_amount'])
- );
+ $response[$foreignKey]['difference'] = bcadd((string) $response[$foreignKey]['difference'], Steam::positive($journal['foreign_amount']));
$response[$foreignKey]['difference_float'] = (float) $response[$foreignKey]['difference'];
}
}
diff --git a/app/Api/V1/Controllers/Insight/Transfer/TagController.php b/app/Api/V1/Controllers/Insight/Transfer/TagController.php
index b7b85fd376..f92a7aa9f0 100644
--- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php
+++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php
@@ -155,10 +155,7 @@ final class TagController extends Controller
'currency_id' => (string) $foreignCurrencyId,
'currency_code' => $journal['foreign_currency_code'],
];
- $response[$foreignKey]['difference'] = bcadd(
- (string) $response[$foreignKey]['difference'],
- Steam::positive($journal['foreign_amount'])
- );
+ $response[$foreignKey]['difference'] = bcadd((string) $response[$foreignKey]['difference'], Steam::positive($journal['foreign_amount']));
$response[$foreignKey]['difference_float'] = (float) $response[$foreignKey]['difference']; // intentional float
}
}
diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.php
index d461374baa..2edb4f5531 100644
--- a/app/Http/Controllers/Budget/BudgetLimitController.php
+++ b/app/Http/Controllers/Budget/BudgetLimitController.php
@@ -198,13 +198,7 @@ final class BudgetLimitController extends Controller
if ($request->expectsJson()) {
$array = $limit->toArray();
// add some extra metadata:
- $spentArr = $this->opsRepository->sumExpenses(
- $limit->start_date,
- $limit->end_date,
- null,
- new Collection()->push($budget),
- $currency
- );
+ $spentArr = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, null, new Collection()->push($budget), $currency);
$array['spent'] = $spentArr[$currency->id]['sum'] ?? '0';
$array['left_formatted'] = Amount::formatAnything($limit->transactionCurrency, bcadd($array['spent'], (string) $array['amount']));
$array['amount_formatted'] = Amount::formatAnything($limit->transactionCurrency, $limit['amount']);
diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php
index d40d4432a3..215ebbd484 100644
--- a/app/Http/Controllers/Budget/IndexController.php
+++ b/app/Http/Controllers/Budget/IndexController.php
@@ -284,10 +284,7 @@ final class IndexController extends Controller
if (array_key_exists($currency->id, $spentArr) && array_key_exists('sum', $spentArr[$currency->id])) {
$array['spent'][$currency->id]['spent'] = $spentArr[$currency->id]['sum'];
- $array['spent'][$currency->id]['spent_outside'] = Steam::negative(bcsub(
- $spentInLimits[$currency->id],
- $spentArr[$currency->id]['sum']
- ));
+ $array['spent'][$currency->id]['spent_outside'] = Steam::negative(bcsub($spentInLimits[$currency->id], $spentArr[$currency->id]['sum']));
$array['spent'][$currency->id]['currency_id'] = $currency->id;
$array['spent'][$currency->id]['currency_symbol'] = $currency->symbol;
$array['spent'][$currency->id]['currency_decimal_places'] = $currency->decimal_places;
diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php
index f4b32fe5c5..ad724137dc 100644
--- a/app/Http/Controllers/Chart/BudgetController.php
+++ b/app/Http/Controllers/Chart/BudgetController.php
@@ -539,13 +539,7 @@ final class BudgetController extends Controller
}
// get spent amount in this period for this currency.
- $sum = $this->opsRepository->sumExpenses(
- $currentStart,
- $currentEnd,
- $accounts,
- new Collection()->push($budget),
- $currency
- );
+ $sum = $this->opsRepository->sumExpenses($currentStart, $currentEnd, $accounts, new Collection()->push($budget), $currency);
$amount = Steam::positive($sum[$currency->id]['sum'] ?? '0');
$chartData[0]['entries'][$title] = Steam::bcround($amount, $currency->decimal_places);
diff --git a/app/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php
index affea656a0..476da65ac3 100644
--- a/app/Jobs/CreateAutoBudgetLimits.php
+++ b/app/Jobs/CreateAutoBudgetLimits.php
@@ -132,13 +132,7 @@ class CreateAutoBudgetLimits implements ShouldQueue
// if has one, calculate expenses and use that as a base.
$repository = app(OperationsRepositoryInterface::class);
$repository->setUser($autoBudget->budget->user);
- $spent = $repository->sumExpenses(
- $previousStart,
- $previousEnd,
- null,
- new Collection()->push($autoBudget->budget),
- $autoBudget->transactionCurrency
- );
+ $spent = $repository->sumExpenses($previousStart, $previousEnd, null, new Collection()->push($autoBudget->budget), $autoBudget->transactionCurrency);
$currencyId = $autoBudget->transaction_currency_id;
$spentAmount = $spent[$currencyId]['sum'] ?? '0';
Log::debug(sprintf('Spent in previous budget period (%s-%s) is %s', $previousStart->format('Y-m-d'), $previousEnd->format('Y-m-d'), $spentAmount));
@@ -228,13 +222,7 @@ class CreateAutoBudgetLimits implements ShouldQueue
// if has one, calculate expenses and use that as a base.
$repository = app(OperationsRepositoryInterface::class);
$repository->setUser($autoBudget->budget->user);
- $spent = $repository->sumExpenses(
- $previousStart,
- $previousEnd,
- null,
- new Collection()->push($autoBudget->budget),
- $autoBudget->transactionCurrency
- );
+ $spent = $repository->sumExpenses($previousStart, $previousEnd, null, new Collection()->push($autoBudget->budget), $autoBudget->transactionCurrency);
$currencyId = $autoBudget->transaction_currency_id;
$spentAmount = $spent[$currencyId]['sum'] ?? '0';
Log::debug(sprintf('Spent in previous budget period (%s-%s) is %s', $previousStart->format('Y-m-d'), $previousEnd->format('Y-m-d'), $spentAmount));
diff --git a/app/Providers/FireflySessionProvider.php b/app/Providers/FireflySessionProvider.php
index 9bdcbf98e4..81789aa918 100644
--- a/app/Providers/FireflySessionProvider.php
+++ b/app/Providers/FireflySessionProvider.php
@@ -51,9 +51,7 @@ class FireflySessionProvider extends ServiceProvider
*/
protected function registerSessionDriver(): void
{
- $this->app->singleton(
- 'session.store',
- static fn ($app)
+ $this->app->singleton('session.store', static fn ($app)
// First, we will create the session manager which is responsible for the
// creation of the various session drivers when they are needed by the
// application instance, and will resolve them on a lazy load basis.
diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php
index a507156873..a3a940b1ba 100644
--- a/app/Support/Http/Controllers/AugumentData.php
+++ b/app/Support/Http/Controllers/AugumentData.php
@@ -222,14 +222,7 @@ trait AugumentData
$currentEnd->addMonth();
}
// primary currency amount.
- $expenses = $opsRepository->sumExpenses(
- $currentStart,
- $currentEnd,
- null,
- $budgetCollection,
- $entry->transactionCurrency,
- $this->convertToPrimary
- );
+ $expenses = $opsRepository->sumExpenses($currentStart, $currentEnd, null, $budgetCollection, $entry->transactionCurrency, $this->convertToPrimary);
$spent = $expenses[$currency->id]['sum'] ?? '0';
$entry->pc_spent = $spent;
diff --git a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php
index 2428353cb0..d0c09bf027 100644
--- a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php
+++ b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php
@@ -354,11 +354,7 @@ class RecurringEnrichment implements EnrichmentInterface
/** @var RecurrenceRepetition $repetition */
foreach ($set as $repetition) {
- $recurrence = $this->collection->filter(
- static fn (Recurrence $item): bool => (int) $item->id === (int) $repetition->recurrence_id
- )
- ->first()
- ;
+ $recurrence = $this->collection->filter(static fn (Recurrence $item): bool => (int) $item->id === (int) $repetition->recurrence_id)->first();
$fromDate = clone ($recurrence->latest_date ?? $recurrence->first_date);
$recurrenceId = (int) $repetition->recurrence_id;
$repId = (int) $repetition->id;
diff --git a/config/firefly.php b/config/firefly.php
index 3bfc8b4a70..3f67c4583e 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -78,8 +78,8 @@ return [
'running_balance_column' => (bool)env_default_when_empty(env('USE_RUNNING_BALANCE'), true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
- 'version' => 'develop/2026-09-14',
- 'build_time' => 1789355651,
+'version' => 'develop/2026-09-14',
+'build_time' => 1789404588,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.
diff --git a/resources/assets/v3/js/pages/profile/oauth.js b/resources/assets/v3/js/pages/profile/oauth.js
index 49c260ac14..c6f17bdd4c 100644
--- a/resources/assets/v3/js/pages/profile/oauth.js
+++ b/resources/assets/v3/js/pages/profile/oauth.js
@@ -213,7 +213,9 @@ let index = function () {
})
.catch((error) => {
if (typeof error.response.data === "object") {
- for (const value of Object.entries(error.response.data.errors,)) {
+ for (const value of Object.entries(
+ error.response.data.errors,
+ )) {
form.errors.push(value);
}
} else {
diff --git a/resources/assets/v3/js/pages/transactions/shared/load-transaction-links.js b/resources/assets/v3/js/pages/transactions/shared/load-transaction-links.js
index 4e0690ce05..34f51c09c5 100644
--- a/resources/assets/v3/js/pages/transactions/shared/load-transaction-links.js
+++ b/resources/assets/v3/js/pages/transactions/shared/load-transaction-links.js
@@ -14,7 +14,9 @@ export function loadTransactionLinks(index, journalId) {
if (Object.hasOwn(links, i)) {
let current = links[i];
// console.log('Get link info for link #' + current.id);
- let direction = parseInt(journalId) === parseInt(current.attributes.inward_id)
+ let direction =
+ parseInt(journalId) ===
+ parseInt(current.attributes.inward_id)
? "outward"
: "inward";
let otherJournal = parseInt(current.attributes.inward_id);
diff --git a/resources/assets/v3/js/pages/transactions/shared/process-transaction-links.js b/resources/assets/v3/js/pages/transactions/shared/process-transaction-links.js
index 5187c32987..d47c3a1489 100644
--- a/resources/assets/v3/js/pages/transactions/shared/process-transaction-links.js
+++ b/resources/assets/v3/js/pages/transactions/shared/process-transaction-links.js
@@ -40,11 +40,15 @@ export function processTransactionLinks(transactions) {
if (link.id > 0) {
// console.log('Link.id = ' + link.id + ' so we will PUT link ' + link.id + ' with inwardId = ' + inwardId + ' and outwardId = ' + outwardId);
new PutLink()
- .put({
- 'link_type_id': link.link_type_id,
- 'inward_id': inwardId,
- 'outward_id': outwardId,
- }, {id: link.id}, null)
+ .put(
+ {
+ link_type_id: link.link_type_id,
+ inward_id: inwardId,
+ outward_id: outwardId,
+ },
+ { id: link.id },
+ null,
+ )
.then(() => {
this.redirectAfterTransactionLinks(i, j);
})
diff --git a/resources/assets/v3/js/shared/draw-chart.js b/resources/assets/v3/js/shared/draw-chart.js
index 8731bbf25e..7522539749 100644
--- a/resources/assets/v3/js/shared/draw-chart.js
+++ b/resources/assets/v3/js/shared/draw-chart.js
@@ -57,7 +57,13 @@ let defaultChartOptions = {
},
};
-export function drawMultiCurrencyChart(type, url, holder, anonymous, drawTodayMarker,) {
+export function drawMultiCurrencyChart(
+ type,
+ url,
+ holder,
+ anonymous,
+ drawTodayMarker,
+) {
if ("line" === type) {
drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker);
return;
@@ -87,8 +93,7 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
let all = response.data;
let axes = {};
let data = {
- datasets: [
- ],
+ datasets: [],
labels: [],
};
@@ -105,16 +110,20 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
// there are four possible data sets for this chart
// TODO this is very much hard coded.
- let keys = ['budgeted','spent','left','overspent'];
- for(let i in keys) {
- let key = keys[i] + current.currency_code;
+ let keys = ["budgeted", "spent", "left", "overspent"];
+ for (let i in keys) {
+ let key = keys[i] + current.currency_code;
if (!Object.hasOwn(datasets, key)) {
datasets[key] = {
- label: i18next.t('firefly.' + keys[i]) + ' (' + current.currency_code + ')',
+ label:
+ i18next.t("firefly." + keys[i]) +
+ " (" +
+ current.currency_code +
+ ")",
currency_code: current.currency_code,
data: [],
yAxisID: "y" + current.currency_code,
- }
+ };
}
}
@@ -123,35 +132,41 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
// add spent and left to the dataset, if they exist.
// console.log('current', current);
- if(parseFloat(current.entries.spent) * -1 < parseFloat(current.entries.budgeted)) {
- let key = 'budgeted' + current.currency_code;
+ if (
+ parseFloat(current.entries.spent) * -1 <
+ parseFloat(current.entries.budgeted)
+ ) {
+ let key = "budgeted" + current.currency_code;
datasets[key].data.push(0);
// user has not overspent.
- key = 'spent' + current.currency_code;
+ key = "spent" + current.currency_code;
let value = parseFloat(current.entries.spent) * -1;
datasets[key].data.push(value);
- key = 'left' + current.currency_code;
+ key = "left" + current.currency_code;
value = parseFloat(current.entries.left);
datasets[key].data.push(value);
- key = 'overspent' + current.currency_code;
+ key = "overspent" + current.currency_code;
datasets[key].data.push(0);
}
- if(parseFloat(current.entries.spent) * -1 >= parseFloat(current.entries.budgeted)) {
- let key = 'budgeted' + current.currency_code;
+ if (
+ parseFloat(current.entries.spent) * -1 >=
+ parseFloat(current.entries.budgeted)
+ ) {
+ let key = "budgeted" + current.currency_code;
datasets[key].data.push(0);
// user has overspent.
- key = 'spent' + current.currency_code;
+ key = "spent" + current.currency_code;
let value = parseFloat(current.entries.spent) * -1;
datasets[key].data.push(value);
- key = 'left' + current.currency_code;
+ key = "left" + current.currency_code;
datasets[key].data.push(0);
- key = 'overspent' + current.currency_code;
+ key = "overspent" + current.currency_code;
value = parseFloat(current.entries.overspent);
datasets[key].data.push(value);
}
@@ -184,7 +199,10 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
id: axisId,
type: "linear",
stacked: true,
- position: 0 === Object.keys(axes).length % 2 ? "left" : "right",
+ position:
+ 0 === Object.keys(axes).length % 2
+ ? "left"
+ : "right",
ticks: {
callback: function (value) {
if (anonymous) {
@@ -202,7 +220,7 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
options.scales.x.stacked = true;
// options.scales.y.stacked = true;
// add the new axes.
- options.scales = {...options.scales, ...axes};
+ options.scales = { ...options.scales, ...axes };
// console.log(options);
// console.log(data);
@@ -226,7 +244,13 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
};
// safety catch in case there is no data.
- if (typeof data === "undefined" || 0 === data.length || (typeof data === "object" && typeof data.labels === "object" && 0 === data.labels.length)) {
+ if (
+ typeof data === "undefined" ||
+ 0 === data.length ||
+ (typeof data === "object" &&
+ typeof data.labels === "object" &&
+ 0 === data.labels.length)
+ ) {
let el = document.getElementById(holder).parentElement;
el.innerHTML = "";
el.classList.add("general-chart-error");
@@ -259,13 +283,11 @@ function drawMultiCurrencyStackedColumnChart(url, holder, anonymous) {
});
}
-
function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker) {
document.getElementById(holder).classList.remove("general-chart-error");
window.axios
.get(url)
.then((response) => {
-
// prep some chart variables first.
let all = response.data;
let axes = {};
@@ -282,7 +304,7 @@ function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker) {
let firstScale = ""; // used for today marker.
let drawTodayLabel = "";
let drawTodayIndex = 0;
- let labelCount ;
+ let labelCount;
// loop all collected data.
for (let i = 0; i < all.length; i++) {
@@ -304,7 +326,12 @@ function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker) {
drawTodayIndex = labelCount;
}
// add the label to the array
- data.labels.push(format(date, i18next.t("config.month_and_day_fns"),),);
+ data.labels.push(
+ format(
+ date,
+ i18next.t("config.month_and_day_fns"),
+ ),
+ );
}
}
}
@@ -333,7 +360,9 @@ function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker) {
id: axisId,
type: "linear",
position:
- 0 === Object.keys(axes).length % 2 ? "left" : "right",
+ 0 === Object.keys(axes).length % 2
+ ? "left"
+ : "right",
ticks: {
callback: function (value) {
if (anonymous) {
@@ -350,7 +379,7 @@ function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker) {
delete options.scales.y;
// options.scales.y.stacked = true;
// add the new axes.
- options.scales = {...options.scales, ...axes};
+ options.scales = { ...options.scales, ...axes };
// add a callback for the label.
options.plugins.tooltip.callbacks.label = function (tooltipItem) {
@@ -372,7 +401,13 @@ function drawMultiCurrencyLineChart(url, holder, anonymous, drawTodayMarker) {
};
// safety catch in case there is no data.
- if (typeof data === "undefined" || 0 === data.length || (typeof data === "object" && typeof data.labels === "object" && 0 === data.labels.length)) {
+ if (
+ typeof data === "undefined" ||
+ 0 === data.length ||
+ (typeof data === "object" &&
+ typeof data.labels === "object" &&
+ 0 === data.labels.length)
+ ) {
let el = document.getElementById(holder).parentElement;
el.innerHTML = "";
el.classList.add("general-chart-error");
@@ -467,7 +502,7 @@ function drawSingleCurrencyLineChart(url, holder, anonymous) {
return label + ": " + string;
};
- let options = {...defaultChartOptions};
+ let options = { ...defaultChartOptions };
options.scales.y.ticks.callback = yAxisCallback;
options.plugins.tooltip.callbacks.label = labelCallback;
diff --git a/resources/assets/v3/js/store/get-variable.js b/resources/assets/v3/js/store/get-variable.js
index 33878b4be1..5c9b81875c 100644
--- a/resources/assets/v3/js/store/get-variable.js
+++ b/resources/assets/v3/js/store/get-variable.js
@@ -28,13 +28,19 @@ export function getVariable(name, defaultValue = null) {
// to make things available quicker than if the store has to grab it through the API.
// then again, it's not that slow.
if (validCache && Object.hasOwn(window, name)) {
- console.log('Returning "' + name + '" from window with value: ', window[name]);
+ console.log(
+ 'Returning "' + name + '" from window with value: ',
+ window[name],
+ );
return Promise.resolve(window[name]);
}
// load from store2, if it's present.
const fromStore = window.store.get(name);
if (validCache && typeof fromStore !== "undefined") {
- console.log('Returning "' + name + '" from store with value: ', fromStore);
+ console.log(
+ 'Returning "' + name + '" from store with value: ',
+ fromStore,
+ );
return Promise.resolve(fromStore);
}
let getter = new Get();
@@ -43,10 +49,8 @@ export function getVariable(name, defaultValue = null) {
.getByName(name)
.then((response) => {
console.log(
- 'Returning "' +
- name +
- '" from server with value: ',
- parseResponse(name, response),
+ 'Returning "' + name + '" from server with value: ',
+ parseResponse(name, response),
);
return Promise.resolve(parseResponse(name, response));
})
@@ -61,10 +65,8 @@ export function getVariable(name, defaultValue = null) {
let poster = new Post();
return poster.post(name, defaultValue).then((response) => {
console.log(
- 'Returning "' +
- name +
- '" from POST with value: ',
- parseResponse(name, response),
+ 'Returning "' + name + '" from POST with value: ',
+ parseResponse(name, response),
);
return Promise.resolve(parseResponse(name, response));
});