Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #13037
James Cole14366605bd2a
diff --git a/resources/assets/v3/js/pages/accounts/index.js b/resources/assets/v3/js/pages/accounts/index.jsindex 66cac38852..95198be747 100644--- a/resources/assets/v3/js/pages/accounts/index.js+++ b/resources/assets/v3/js/pages/accounts/index.js@@ -74,8 +74,6 @@ let index = function () {init() {// initialize sortable table.- this.storageKey = "accounts-" + this.objectType + (this.active ? "-active" : "-inactive");- this.defaultSortColumn = "expense" === this.objectType || "revenue" === this.objectType ? "name" : this.defaultSortColumn;this.initFromLocalStorage();this.initFromQueryParams();@@ -85,6 +83,8 @@ let index = function () {// prepare some variables. Has nothing to do with sortable table.const address = window.location.href.split("?")[0].split("/");this.objectType = address[address.length - 1].substring(0, 15);+ this.storageKey = "accounts-" + this.objectType + (this.active ? "-active" : "-inactive");+ this.defaultSortColumn = "expense" === this.objectType || "revenue" === this.objectType ? "name" : this.defaultSortColumn;this.i18next = i18next;this.anonymous = window.store.get("anonymous");this.pageNavUrl = "./accounts/" + this.objectType;@@ -127,12 +127,9 @@ let index = function () {},prepareSumArrays(code) {- let keys = ["sums", "differences", "debts"];- for (let i = 0; i < keys.length; i++) {- if (Object.hasOwn(this, keys[i])) {- this[keys[i]][code] = this[keys[i]][code] || 0;- }- }+ this.sums[code] = Object.hasOwn(this.sums, code) ? this.sums[code] : 0;+ this.debts[code] = Object.hasOwn(this.debts, code) ? this.debts[code] : 0;+ this.differences[code] = Object.hasOwn(this.differences, code) ? this.differences[code] : 0;},filterAmounts(account) {// overrule some amounts, set them to zero when "this.anonymous" is true.diff --git a/resources/views/form/options.blade.php b/resources/views/form/options.blade.phpindex 7f7e79fc9f..fe7d3f6a8e 100644--- a/resources/views/form/options.blade.php+++ b/resources/views/form/options.blade.php@@ -3,7 +3,7 @@<div class="col-sm-9 offset-sm-3"><div class="form-check has-validation">{{ Html::checkbox('create_another')->class('form-check-input')->id($name . '_return_to_form') }}- <label class="form-check-label" for="{{ $name }}">+ <label class="form-check-label" for="{{ $name }}_return_to_form">{{ trans('form.returnHereExplanation') }}</label></div>@@ -14,8 +14,8 @@<div class="row mb-2" id="{{ $name }}_holder"><div class="col-sm-9 offset-sm-3"><div class="form-check has-validation">- {{ Html::checkbox('create_another')->class('form-check-input')->id($name . '_return_to_edit') }}- <label class="form-check-label" for="{{ $name }}">+ {{ Html::checkbox('return_to_edit')->class('form-check-input')->id($name . '_return_to_edit') }}+ <label class="form-check-label" for="{{ $name }}_return_to_edit">{{ trans('form.returnHereUpdateExplanation') }}</label></div>