Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
🤖 Auto commit for release 'develop' on 2026-09-20
JC566ad00f84eb7
diff --git a/app/Api/V1/Controllers/Insight/Income/TagController.php b/app/Api/V1/Controllers/Insight/Income/TagController.phpindex df99eef909..94be2ae461 100644--- a/app/Api/V1/Controllers/Insight/Income/TagController.php+++ b/app/Api/V1/Controllers/Insight/Income/TagController.php@@ -158,7 +158,10 @@ 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.phpindex f92a7aa9f0..b7b85fd376 100644--- a/app/Api/V1/Controllers/Insight/Transfer/TagController.php+++ b/app/Api/V1/Controllers/Insight/Transfer/TagController.php@@ -155,7 +155,10 @@ 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.phpindex 2edb4f5531..d461374baa 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -198,7 +198,13 @@ final class BudgetLimitController extends Controllerif ($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.phpindex 65429e59c1..52c6f900e3 100644--- a/app/Http/Controllers/Budget/IndexController.php+++ b/app/Http/Controllers/Budget/IndexController.php@@ -272,7 +272,10 @@ final class IndexController extends Controllerif (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.phpindex ad724137dc..f4b32fe5c5 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -539,7 +539,13 @@ 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.phpindex 476da65ac3..affea656a0 100644--- a/app/Jobs/CreateAutoBudgetLimits.php+++ b/app/Jobs/CreateAutoBudgetLimits.php@@ -132,7 +132,13 @@ 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));@@ -222,7 +228,13 @@ 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/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.phpindex a3a940b1ba..a507156873 100644--- a/app/Support/Http/Controllers/AugumentData.php+++ b/app/Support/Http/Controllers/AugumentData.php@@ -222,7 +222,14 @@ 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.phpindex d0c09bf027..2428353cb0 100644--- a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php+++ b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php@@ -354,7 +354,11 @@ 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.phpindex 10b03462dd..608ae3ca9d 100644--- a/config/firefly.php+++ b/config/firefly.php@@ -79,7 +79,7 @@ return [// see cer.php for exchange rates feature flag.],'version' => 'develop/2026-09-20',-'build_time' => 1789885080,+'build_time' => 1789924274,'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/shared/dates.js b/resources/assets/v3/js/pages/shared/dates.jsindex 2a49d47988..0a7cb2d25b 100644--- a/resources/assets/v3/js/pages/shared/dates.js+++ b/resources/assets/v3/js/pages/shared/dates.js@@ -18,10 +18,10 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.*/-import { endOfDay, startOfMonth, startOfYear, subDays } from "date-fns";+import { endOfDay, startOfMonth, startOfYear, subDays } from "date-fns";import format from "../../util/format";-import i18next from 'i18next';-import {addPeriod, subtractPeriod} from '../../support/get-viewrange.js';+import i18next from "i18next";+import { addPeriod, subtractPeriod } from "../../support/get-viewrange.js";export default () => ({range: {@@ -49,12 +49,12 @@ export default () => ({submitForm() {// console.log('submitForm', format(window.store.get('start'), 'yyyy-MM-dd'), format(window.store.get('end'), 'yyyy-MM-dd'));// save form and submit for v1.- document.getElementById("customStart").value = format(window.store.get("start"), 'yyyy-MM-dd');- document.getElementById("customEnd").value = format(window.store.get("end"), 'yyyy-MM-dd');+ document.getElementById("customStart").value = format(window.store.get("start"), "yyyy-MM-dd");+ document.getElementById("customEnd").value = format(window.store.get("end"), "yyyy-MM-dd");document.getElementById("daterange-form").submit();},language: "en_US",- viewRange: '1M',+ viewRange: "1M",i18next: null,// Mon Aug 31 2026 19:00:00 GMT-0500// 2026-08-31T19:00:00-05:00@@ -62,7 +62,7 @@ export default () => ({init() {this.i18next = i18next;- this.viewRange = window.store.get('viewRange');+ this.viewRange = window.store.get("viewRange");if (false === window.enableDates) {// console.log("Date selection is disabled on this page.");document.getElementById("date-dropdown").style.display = "none";@@ -125,7 +125,7 @@ export default () => ({// generate next rangeelement = document.getElementsByClassName("daterange-next")[0];- element.textContent = format(nextRange.start) + " - " + format(nextRange.end);+ element.textContent = format(nextRange.start) + " - " + format(nextRange.end);element.setAttribute("data-start", format(nextRange.start, this.preferredFormat, "en-US"));element.setAttribute("data-end", format(nextRange.end, this.preferredFormat, "en-US"));@@ -137,7 +137,7 @@ export default () => ({// generate the default range ("Today")element = document.getElementsByClassName("daterange-today")[0];- element.textContent = this.i18next.t('firefly.today');+ element.textContent = this.i18next.t("firefly.today");element.setAttribute("data-start", format(todayRange.start, this.preferredFormat, "en-US"));element.setAttribute("data-end", format(todayRange.end, this.preferredFormat, "en-US"));@@ -163,7 +163,7 @@ export default () => ({},getNextRange() {- return addPeriod(this.range.start, this.viewRange)+ return addPeriod(this.range.start, this.viewRange);},getPrevRange() {@@ -171,8 +171,8 @@ export default () => ({},getTodayRange() {- let start = window.store.get('defaultStart');- let end = window.store.get('defaultEnd');+ let start = window.store.get("defaultStart");+ let end = window.store.get("defaultEnd");return { start: start, end: end };},@@ -197,8 +197,8 @@ export default () => ({changeDateRange(e) {e.preventDefault();let target = e.currentTarget;- console.log('changeDateRange: start is', target.getAttribute("data-start"));- console.log('changeDateRange: end is', target.getAttribute("data-end"));+ console.log("changeDateRange: start is", target.getAttribute("data-start"));+ console.log("changeDateRange: end is", target.getAttribute("data-end"));let start = new Date(Date.parse(target.getAttribute("data-start")));let end = new Date(Date.parse(target.getAttribute("data-end")));// console.log('Start date is', start);diff --git a/resources/assets/v3/js/pages/transactions/edit.js b/resources/assets/v3/js/pages/transactions/edit.jsindex 80632805bd..555059046b 100644--- a/resources/assets/v3/js/pages/transactions/edit.js+++ b/resources/assets/v3/js/pages/transactions/edit.js@@ -21,54 +21,54 @@import "../../boot/bootstrap.js";import dates from "../../pages/shared/dates.js";import Get from "../../api/model/transaction/get.js";-import {parseDownloadedSplits} from "./shared/parse-downloaded-splits.js";-import {addAllAutocompleteToForm} from "./shared/add-autocomplete.js";-import {loadCurrencies} from "./shared/load-currencies.js";-import {loadBudgets} from "./shared/load-budgets.js";-import {loadPiggyBanks} from "./shared/load-piggy-banks.js";-import {processUploadError} from "./shared/process-upload-error.js";-import {loadSubscriptions} from "./shared/load-subscriptions.js";+import { parseDownloadedSplits } from "./shared/parse-downloaded-splits.js";+import { addAllAutocompleteToForm } from "./shared/add-autocomplete.js";+import { loadCurrencies } from "./shared/load-currencies.js";+import { loadBudgets } from "./shared/load-budgets.js";+import { loadPiggyBanks } from "./shared/load-piggy-banks.js";+import { processUploadError } from "./shared/process-upload-error.js";+import { loadSubscriptions } from "./shared/load-subscriptions.js";import i18next from "i18next";-import {defaultErrorSet} from "./shared/create-empty-split.js";-import {parseFromEntries} from "./shared/parse-from-entries.js";+import { defaultErrorSet } from "./shared/create-empty-split.js";+import { parseFromEntries } from "./shared/parse-from-entries.js";import Put from "../../api/model/transaction/put.js";-import {showMessageOrRedirectUser} from "./shared/show-message-or-redirect.js";-import {processAttachments} from "./shared/process-attachments.js";+import { showMessageOrRedirectUser } from "./shared/show-message-or-redirect.js";+import { processAttachments } from "./shared/process-attachments.js";import sidebar from "../shared/sidebar.js";-import {disableSplitInputs} from "./shared/disable-split-inputs.js";-import {parseTotalAmount} from "./shared/parse-total-amount.js";-import {keyUpFromCategory} from "./shared/keyup-from-category.js";-import {keyUpFromSource} from "./shared/keyup-from-source.js";-import {keyUpFromDestination} from "./shared/keyup-from-destination.js";-import {keyUpFromDescription} from "./shared/keyup-from-description.js";-import {changedAmount} from "./shared/changed-amount.js";-import {changedForeignAmount} from "./shared/changed-foreign-amount.js";-import {parseErrors} from "./shared/parse-errors.js";-import {addSplit} from "./shared/add-split.js";-import {clearDestinationAccount, clearSourceAccount} from "./shared/clear-fields.js";-import {detectTransactionType} from "./shared/detect-transaction-type.js";-import {determineAmountCurrency} from "./shared/determine-amount-currency.js";-import {loadCustomFields} from "./shared/load-custom-fields.js";-import {displayMap} from "./shared/display-map.js";-import {loadDefaultCoordinates} from "./shared/load-default-coordinates.js";-import {renderMap} from "./shared/render-map.js";+import { disableSplitInputs } from "./shared/disable-split-inputs.js";+import { parseTotalAmount } from "./shared/parse-total-amount.js";+import { keyUpFromCategory } from "./shared/keyup-from-category.js";+import { keyUpFromSource } from "./shared/keyup-from-source.js";+import { keyUpFromDestination } from "./shared/keyup-from-destination.js";+import { keyUpFromDescription } from "./shared/keyup-from-description.js";+import { changedAmount } from "./shared/changed-amount.js";+import { changedForeignAmount } from "./shared/changed-foreign-amount.js";+import { parseErrors } from "./shared/parse-errors.js";+import { addSplit } from "./shared/add-split.js";+import { clearDestinationAccount, clearSourceAccount } from "./shared/clear-fields.js";+import { detectTransactionType } from "./shared/detect-transaction-type.js";+import { determineAmountCurrency } from "./shared/determine-amount-currency.js";+import { loadCustomFields } from "./shared/load-custom-fields.js";+import { displayMap } from "./shared/display-map.js";+import { loadDefaultCoordinates } from "./shared/load-default-coordinates.js";+import { renderMap } from "./shared/render-map.js";import "leaflet/dist/leaflet.css";-import {onMapClick} from "./shared/on-map-click.js";-import {onMapZoom} from "./shared/on-map-zoom.js";-import {clearLocation} from "./shared/clear-location.js";-import {removeSplit} from "./shared/remove-split.js";-import {loadTransactionLinks} from "./shared/load-transaction-links.js";-import {createLinkAutocomplete} from "./shared/create-link-autocomplete.js";-import {editLink} from "./shared/edit-link.js";-import {switchLink} from "./shared/switch-link.js";-import {removeLink} from "./shared/remove-link.js";-import {saveEditedLink} from "./shared/save-edited-link.js";-import {saveNewLink} from "./shared/save-new-link.js";-import {processTransactionLinks} from "./shared/process-transaction-links.js";-import {redirectAfterTransactionLinks} from "./shared/redirect-after-transaction-links.js";-import {addTabListener} from "./shared/add-tab-listener.js";-import {autoStep} from "./shared/auto-step.js";-import {respondToTabSwitch} from "./shared/respond-to-tab-switch.js";+import { onMapClick } from "./shared/on-map-click.js";+import { onMapZoom } from "./shared/on-map-zoom.js";+import { clearLocation } from "./shared/clear-location.js";+import { removeSplit } from "./shared/remove-split.js";+import { loadTransactionLinks } from "./shared/load-transaction-links.js";+import { createLinkAutocomplete } from "./shared/create-link-autocomplete.js";+import { editLink } from "./shared/edit-link.js";+import { switchLink } from "./shared/switch-link.js";+import { removeLink } from "./shared/remove-link.js";+import { saveEditedLink } from "./shared/save-edited-link.js";+import { saveNewLink } from "./shared/save-new-link.js";+import { processTransactionLinks } from "./shared/process-transaction-links.js";+import { redirectAfterTransactionLinks } from "./shared/redirect-after-transaction-links.js";+import { addTabListener } from "./shared/add-tab-listener.js";+import { autoStep } from "./shared/auto-step.js";+import { respondToTabSwitch } from "./shared/respond-to-tab-switch.js";import Alpine from "alpinejs";import focusFirstInput from "../../shared/focus-first-input.js";@@ -281,23 +281,24 @@ let transactions = function () {this.groupProperties.totalAmount = 0;for (let i in this.entries) {if (Object.hasOwn(this.entries, i)) {- this.groupProperties.totalAmount = this.groupProperties.totalAmount + parseFloat(this.entries[i].amount);+ this.groupProperties.totalAmount =+ this.groupProperties.totalAmount + parseFloat(this.entries[i].amount);// add the tags. This is not done in Alpine itself because the combination between// the Autocomplete library and Alpine breaks for some reason.- tagSelect = document.getElementById('tags_' + i);+ tagSelect = document.getElementById("tags_" + i);if (null !== tagSelect) {- console.log('Is not null.');+ console.log("Is not null.");for (let j in this.entries[i].tags) {if (Object.hasOwn(this.entries[i].tags, j)) {- tagSelect.options.add(new Option(this.entries[i].tags[j], this.entries[i].tags[j], true, true));+ tagSelect.options.add(+ new Option(this.entries[i].tags[j], this.entries[i].tags[j], true, true),+ );}}}-}}-this.autoStep();});},@@ -392,7 +393,7 @@ let transactions = function () {// submit the transaction. Multi-stage process thing going on here!let putter = new Put();putter- .put(submission, {id: this.groupProperties.id})+ .put(submission, { id: this.groupProperties.id }).then((response) => {this.formStates.storedGroup = true;const group = response.data.data;@@ -445,7 +446,7 @@ let transactions = function () {};};-let comps = {transactions, sidebar, dates};+let comps = { transactions, sidebar, dates };function loadPage() {Object.keys(comps).forEach((comp) => {diff --git a/resources/assets/v3/js/pages/transactions/shared/show-message-or-redirect.js b/resources/assets/v3/js/pages/transactions/shared/show-message-or-redirect.jsindex 95f1fde48b..b400f467a1 100644--- a/resources/assets/v3/js/pages/transactions/shared/show-message-or-redirect.js+++ b/resources/assets/v3/js/pages/transactions/shared/show-message-or-redirect.js@@ -75,14 +75,13 @@ export function showMessageOrRedirectUser() {// find partslet parts = URL.parse(params, "https://example.com/");- let from = '';+ let from = "";let separator = "?";if ("" === parts.search) {let fromParam = urlParams.get("_from");- if(null !== fromParam) {+ if (null !== fromParam) {from = fromParam.toString();}-}if ("" !== parts.search) {let obj = new URLSearchParams(parts.search);diff --git a/resources/assets/v3/js/support/get-viewrange.js b/resources/assets/v3/js/support/get-viewrange.jsindex 49c80ab5c1..1acbe72cac 100644--- a/resources/assets/v3/js/support/get-viewrange.js+++ b/resources/assets/v3/js/support/get-viewrange.js@@ -19,17 +19,26 @@*/import {- addDays, addMonths, addQuarters, addWeeks, addYears,+ addDays,+ addMonths,+ addQuarters,+ addWeeks,+ addYears,endOfDay,endOfMonth,endOfQuarter,- endOfWeek, format,+ endOfWeek,+ format,startOfDay,startOfMonth,startOfQuarter,startOfWeek,startOfYear,- subDays, subMonths, subQuarters, subWeeks, subYears,+ subDays,+ subMonths,+ subQuarters,+ subWeeks,+ subYears,} from "date-fns";function getViewRange(viewRange, today) {@@ -216,8 +225,13 @@ function addPeriod(date, viewRange) {nextPeriodStart = endOfDay(nextPeriodStart);break;}- console.log('addPeriod (' + viewRange+ '): ' + format(date,'yyyy-MM-dd HH:mm:ss'));- console.log('To: ', format(nextPeriodStart,'yyyy-MM-dd HH:mm:ss'), ' - ', format(nextPeriodEnd,'yyyy-MM-dd HH:mm:ss'));+ console.log("addPeriod (" + viewRange + "): " + format(date, "yyyy-MM-dd HH:mm:ss"));+ console.log(+ "To: ",+ format(nextPeriodStart, "yyyy-MM-dd HH:mm:ss"),+ " - ",+ format(nextPeriodEnd, "yyyy-MM-dd HH:mm:ss"),+ );return {start: nextPeriodStart,end: nextPeriodEnd,@@ -318,8 +332,13 @@ function subtractPeriod(date, viewRange) {prevPeriodStart = endOfDay(prevPeriodStart);break;}- console.log('subtractPeriod (' + viewRange+ '): ' + format(date,'yyyy-MM-dd HH:mm:ss'));- console.log('To: ', format(prevPeriodStart,'yyyy-MM-dd HH:mm:ss'), ' - ', format(prevPeriodEnd,'yyyy-MM-dd HH:mm:ss'));+ console.log("subtractPeriod (" + viewRange + "): " + format(date, "yyyy-MM-dd HH:mm:ss"));+ console.log(+ "To: ",+ format(prevPeriodStart, "yyyy-MM-dd HH:mm:ss"),+ " - ",+ format(prevPeriodEnd, "yyyy-MM-dd HH:mm:ss"),+ );return {start: prevPeriodStart,end: prevPeriodEnd,