Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Auto commit for release 'branch-v6.2' on 2024-12-23
github-actions8f9f08b96f7d
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.phpindex 828c4ffe5f..9825e974b8 100644--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@ -114,7 +114,7 @@ class AccountController extends Controller$accountId = (int) $accountId;// loop each expense entry (each entry can be a different currency).foreach ($expenses as $currencyCode => $endAmount) {- if(3 !== strlen($currencyCode)) {+ if (3 !== strlen($currencyCode)) {continue;}// see if there is an accompanying start amount.@@ -516,7 +516,7 @@ class AccountController extends Controller$accountId = (int) $accountId;// loop each expense entry (each entry can be a different currency).foreach ($expenses as $currencyCode => $endAmount) {- if(3 !== strlen($currencyCode)) {+ if (3 !== strlen($currencyCode)) {continue;}diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.phpindex 2f807c2257..319cd37f55 100644--- a/app/Support/Http/Controllers/PeriodOverview.php+++ b/app/Support/Http/Controllers/PeriodOverview.php@@ -568,13 +568,13 @@ trait PeriodOverview}$entries[]= [- 'title' => $title,- 'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),- 'total_transactions' => count($spent) + count($earned) + count($transferred),- 'spent' => $this->groupByCurrency($spent),- 'earned' => $this->groupByCurrency($earned),- 'transferred' => $this->groupByCurrency($transferred),- ];+ 'title' => $title,+ 'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),+ 'total_transactions' => count($spent) + count($earned) + count($transferred),+ 'spent' => $this->groupByCurrency($spent),+ 'earned' => $this->groupByCurrency($earned),+ 'transferred' => $this->groupByCurrency($transferred),+ ];}return $entries;diff --git a/app/Support/Report/Budget/BudgetReportGenerator.php b/app/Support/Report/Budget/BudgetReportGenerator.phpindex 8f2809ab9e..2de00d88c0 100644--- a/app/Support/Report/Budget/BudgetReportGenerator.php+++ b/app/Support/Report/Budget/BudgetReportGenerator.php@@ -213,16 +213,16 @@ class BudgetReportGenerator// make sum information:$this->report['sums'][$currencyId]??= [- 'budgeted' => '0',- 'spent' => '0',- 'left' => '0',- 'overspent' => '0',- 'currency_id' => $currencyId,- 'currency_code' => $limitCurrency->code,- 'currency_name' => $limitCurrency->name,- 'currency_symbol' => $limitCurrency->symbol,- 'currency_decimal_places' => $limitCurrency->decimal_places,- ];+ 'budgeted' => '0',+ 'spent' => '0',+ 'left' => '0',+ 'overspent' => '0',+ 'currency_id' => $currencyId,+ 'currency_code' => $limitCurrency->code,+ 'currency_name' => $limitCurrency->name,+ 'currency_symbol' => $limitCurrency->symbol,+ 'currency_decimal_places' => $limitCurrency->decimal_places,+ ];$this->report['sums'][$currencyId]['budgeted'] = bcadd($this->report['sums'][$currencyId]['budgeted'], $limit->amount);$this->report['sums'][$currencyId]['spent'] = bcadd($this->report['sums'][$currencyId]['spent'], $spent);$this->report['sums'][$currencyId]['left'] = bcadd($this->report['sums'][$currencyId]['left'], bcadd($limit->amount, $spent));diff --git a/app/Support/Steam.php b/app/Support/Steam.phpindex 3ea5ef0add..ca846170c1 100644--- a/app/Support/Steam.php+++ b/app/Support/Steam.php@@ -275,10 +275,10 @@ class Steam->get(['transactions.amount'])->toArray();$return['balance'] = $this->sumTransactions($array, 'amount');- //Log::debug(sprintf('balance is %s', $return['balance']));+ // Log::debug(sprintf('balance is %s', $return['balance']));// add virtual balance:$return['balance'] = bcadd('' === (string) $account->virtual_balance ? '0' : $account->virtual_balance, $return['balance']);- //Log::debug(sprintf('balance is %s (with virtual balance)', $return['balance']));+ // Log::debug(sprintf('balance is %s (with virtual balance)', $return['balance']));// then, native balance (if necessary(if ($native->id !== $currency->id) {@@ -288,19 +288,20 @@ class Steam->get(['transactions.native_amount'])->toArray();$return['native_balance'] = $this->sumTransactions($array, 'native_amount');-// Log::debug(sprintf('native_balance is %s', $return['native_balance']));+ // Log::debug(sprintf('native_balance is %s', $return['native_balance']));$return['native_balance'] = bcadd('' === (string) $account->native_virtual_balance ? '0' : $account->native_virtual_balance, $return['balance']);-// Log::debug(sprintf('native_balance is %s (with virtual balance)', $return['native_balance']));+ // Log::debug(sprintf('native_balance is %s (with virtual balance)', $return['native_balance']));}// balance(s) in other currencies.- $array = $account->transactions()- ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')- ->leftJoin('transaction_currencies', 'transaction_currencies.id', '=', 'transactions.transaction_currency_id')- ->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))- ->get(['transaction_currencies.code', 'transactions.amount'])->toArray();- $others = $this->groupAndSumTransactions($array, 'code', 'amount');-// Log::debug('All others are (joined)', $others);+ $array = $account->transactions()+ ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')+ ->leftJoin('transaction_currencies', 'transaction_currencies.id', '=', 'transactions.transaction_currency_id')+ ->where('transaction_journals.date', '<=', $date->format('Y-m-d H:i:s'))+ ->get(['transaction_currencies.code', 'transactions.amount'])->toArray()+ ;+ $others = $this->groupAndSumTransactions($array, 'code', 'amount');+ // Log::debug('All others are (joined)', $others);return array_merge($return, $others);}@@ -350,7 +351,7 @@ class Steam/** @var Transaction $entry */foreach ($set as $entry) {- $date = new Carbon($entry->max_date, config('app.timezone'));+ $date = new Carbon($entry->max_date, config('app.timezone'));$date->setTimezone(config('app.timezone'));$list[(int)$entry->account_id] = $date;}diff --git a/resources/assets/v1/src/locales/de.json b/resources/assets/v1/src/locales/de.jsonindex 9b912b5c4b..c3f474a9b9 100644--- a/resources/assets/v1/src/locales/de.json+++ b/resources/assets/v1/src/locales/de.json@@ -130,15 +130,15 @@"response": "Antwort","visit_webhook_url": "Webhook-URL besuchen","reset_webhook_secret": "Webhook Secret zur\u00fccksetzen",- "header_exchange_rates": "Wechselkurse",- "exchange_rates_intro": "Firefly III unterst\u00fctzt das Herunterladen und Verwenden von Wechselkursen. Lesen Sie mehr dar\u00fcber in <a href=\u201ehttps:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\u201c>der Dokumentation<\/a>.",- "exchange_rates_from_to": "Zwischen {from} und {to} (und umgekehrt)",+ "header_exchange_rates": "Exchange rates",+ "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",+ "exchange_rates_from_to": "Between {from} and {to} (and the other way around)","exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",- "header_exchange_rates_rates": "Wechselkurse",- "header_exchange_rates_table": "Tabelle mit Wechselkursen",- "help_rate_form": "An diesem Tag, wie viele {to} werden Sie f\u00fcr einen {from} bekommen?",- "add_new_rate": "Neuen Wechselkurs hinzuf\u00fcgen",- "save_new_rate": "Neuen Kurs speichern"+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL",@@ -158,7 +158,7 @@"webhook_delivery": "Zustellung","from_currency_to_currency": "{from} → {to}","to_currency_from_currency": "{to} → {from}",- "rate": "Kurs"+ "rate": "Rate"},"list": {"active": "Aktiv?",diff --git a/resources/assets/v1/src/locales/fr.json b/resources/assets/v1/src/locales/fr.jsonindex d9a7fd5ff6..a40b853885 100644--- a/resources/assets/v1/src/locales/fr.json+++ b/resources/assets/v1/src/locales/fr.json@@ -130,12 +130,12 @@"response": "R\u00e9ponse","visit_webhook_url": "Visiter l'URL du webhook","reset_webhook_secret": "R\u00e9initialiser le secret du webhook",- "header_exchange_rates": "Taux de change",- "exchange_rates_intro": "Firefly III prend en charge le chargement et l'utilisation des taux de change. En savoir plus \u00e0 ce sujet dans <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">la documentation<\/a>.",- "exchange_rates_from_to": "Entre {from} et {to} (et l'inverse)",+ "header_exchange_rates": "Exchange rates",+ "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",+ "exchange_rates_from_to": "Between {from} and {to} (and the other way around)","exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",- "header_exchange_rates_rates": "Taux de change",- "header_exchange_rates_table": "Table avec taux de change",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates","help_rate_form": "On this day, how many {to} will you get for one {from}?","add_new_rate": "Add a new exchange rate","save_new_rate": "Save new rate"diff --git a/resources/assets/v1/src/locales/pl.json b/resources/assets/v1/src/locales/pl.jsonindex de9bef8f11..600f9dea74 100644--- a/resources/assets/v1/src/locales/pl.json+++ b/resources/assets/v1/src/locales/pl.json@@ -130,15 +130,15 @@"response": "Odpowied\u017a","visit_webhook_url": "Odwied\u017a adres URL webhooka","reset_webhook_secret": "Resetuj sekret webhooka",- "header_exchange_rates": "Kursy wymiany",- "exchange_rates_intro": "Firefly III obs\u0142uguje pobieranie i korzystanie z kurs\u00f3w wymiany walut. Wi\u0119cej informacji na ten temat w <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">dokumentacji<\/a>.",- "exchange_rates_from_to": "Pomi\u0119dzy {from} i {to} (i odwrotnie)",- "exchange_rates_intro_rates": "Firefly III bla bla bla kurs wymiany. Odwrotno\u015b\u0107 jest obliczana automatycznie, je\u015bli nie zosta\u0142a podana. Zostanie u\u017cyty ostatni znaleziony kurs.",- "header_exchange_rates_rates": "Kursy wymiany",- "header_exchange_rates_table": "Tabela z kursami wymiany walut",- "help_rate_form": "W tym dniu, ile {to} otrzymasz za jeden {from}?",- "add_new_rate": "Dodaj nowy kurs wymiany",- "save_new_rate": "Zapisz nowy kurs"+ "header_exchange_rates": "Exchange rates",+ "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",+ "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL",@@ -158,7 +158,7 @@"webhook_delivery": "Dor\u0119czenie","from_currency_to_currency": "{from} → {to}","to_currency_from_currency": "{to} → {from}",- "rate": "Kurs"+ "rate": "Rate"},"list": {"active": "Jest aktywny?",