From 93fe1f55584e072293f5720e2e07b49d102b94ef Mon Sep 17 00:00:00 2001 From: JC5 Date: Mon, 19 Jan 2026 07:55:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20release=20?= =?UTF-8?q?'develop'=20on=202026-01-19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PiggyBank/PiggyBankNameIsChanged.php | 4 +- .../CreatesPiggyBankEventForChangedAmount.php | 9 ++-- .../UpdatesRulesForChangedPiggyBankName.php | 3 +- .../NotifiesUserAboutFailedRuleAction.php | 21 ++++---- .../PiggyBank/ModifiesPiggyBanks.php | 50 ++++++++--------- composer.lock | 2 +- config/firefly.php | 4 +- package-lock.json | 54 +++++++++---------- resources/assets/v1/src/locales/id.json | 30 +++++------ 9 files changed, 93 insertions(+), 84 deletions(-) diff --git a/app/Events/Model/PiggyBank/PiggyBankNameIsChanged.php b/app/Events/Model/PiggyBank/PiggyBankNameIsChanged.php index 269352005d..48de5d088a 100644 --- a/app/Events/Model/PiggyBank/PiggyBankNameIsChanged.php +++ b/app/Events/Model/PiggyBank/PiggyBankNameIsChanged.php @@ -1,4 +1,6 @@ transactionGroup instanceof TransactionGroup) { $journal = $event->transactionGroup->transactionJournals()->first(); } - $date = $journal->date ?? today(config('app.timezone')); + $date = $journal->date ?? today(config('app.timezone')); // sanity check: event must not already exist for this journal and piggy bank. if (null !== $journal) { $exists = PiggyBankEvent::where('piggy_bank_id', $event->piggyBank->id) - ->where('transaction_journal_id', $journal->id) - ->exists(); + ->where('transaction_journal_id', $journal->id) + ->exists() + ; if ($exists) { Log::warning('Already have event for this journal and piggy, will not create another.'); diff --git a/app/Listeners/Model/PiggyBank/UpdatesRulesForChangedPiggyBankName.php b/app/Listeners/Model/PiggyBank/UpdatesRulesForChangedPiggyBankName.php index a4d458b9c9..e64701cbc6 100644 --- a/app/Listeners/Model/PiggyBank/UpdatesRulesForChangedPiggyBankName.php +++ b/app/Listeners/Model/PiggyBank/UpdatesRulesForChangedPiggyBankName.php @@ -1,4 +1,6 @@ ruleAction; - $rule = $ruleAction->rule; + $ruleAction = $event->ruleAction; + $rule = $ruleAction->rule; /** @var bool $preference */ - $preference = Preferences::getForUser($rule->user, 'notification_rule_action_failures', true)->data; + $preference = Preferences::getForUser($rule->user, 'notification_rule_action_failures', true)->data; if (false === $preference) { return; } Log::debug('Now in ruleActionFailedOnArray'); - $journal = $event->journal; - $error = $event->error; - $user = $ruleAction->rule->user; + $journal = $event->journal; + $error = $event->error; + $user = $ruleAction->rule->user; - $groupId = is_array($journal) ? $journal['transaction_group_id'] : $journal->transaction_group_id; - $groupTitle = is_array($journal) ? ($journal['description'] ?? '') : ($journal->description ?? ''); + $groupId = is_array($journal) ? $journal['transaction_group_id'] : $journal->transaction_group_id; + $groupTitle = is_array($journal) ? ($journal['description'] ?? '') : ($journal->description ?? ''); $mainMessage = trans('rules.main_message', ['rule' => $rule->title, 'action' => $ruleAction->action_type, 'group' => $groupId, 'error' => $error]); @@ -63,5 +65,4 @@ class NotifiesUserAboutFailedRuleAction implements ShouldQueue Log::error(sprintf('[a] Error sending notification that the rule action failed: %s', $e->getMessage())); } } - } diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php index 73ec9c33e1..2f0774cfc2 100644 --- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php +++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php @@ -72,9 +72,9 @@ trait ModifiesPiggyBanks $pivot->native_current_amount = null; // also update native_current_amount. - $userCurrency = Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup); + $userCurrency = Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup); if ($userCurrency->id !== $piggyBank->transaction_currency_id) { - $converter = new ExchangeRateConverter(); + $converter = new ExchangeRateConverter(); $converter->setIgnoreSettings(true); $pivot->native_current_amount = $converter->convert($piggyBank->transactionCurrency, $userCurrency, today(), $pivot->current_amount); } @@ -95,9 +95,9 @@ trait ModifiesPiggyBanks $pivot->native_current_amount = null; // also update native_current_amount. - $userCurrency = Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup); + $userCurrency = Amount::getPrimaryCurrencyByUserGroup($this->user->userGroup); if ($userCurrency->id !== $piggyBank->transaction_currency_id) { - $converter = new ExchangeRateConverter(); + $converter = new ExchangeRateConverter(); $converter->setIgnoreSettings(true); $pivot->native_current_amount = $converter->convert($piggyBank->transactionCurrency, $userCurrency, today(), $pivot->current_amount); } @@ -129,8 +129,8 @@ trait ModifiesPiggyBanks Log::debug(sprintf('Maximum amount: %s', $maxAmount)); } - $compare = bccomp($amount, (string)$maxAmount); - $result = $compare <= 0; + $compare = bccomp($amount, (string)$maxAmount); + $result = $compare <= 0; Log::debug(sprintf('Compare <= 0? %d, so canAddAmount is %s', $compare, var_export($result, true))); @@ -164,11 +164,11 @@ trait ModifiesPiggyBanks public function setCurrentAmount(PiggyBank $piggyBank, string $amount): PiggyBank { - $repetition = $this->getRepetition($piggyBank); + $repetition = $this->getRepetition($piggyBank); if (null === $repetition) { return $piggyBank; } - $max = $piggyBank->target_amount; + $max = $piggyBank->target_amount; if (1 === bccomp($amount, $max) && 0 !== bccomp($piggyBank->target_amount, '0')) { $amount = $max; } @@ -211,14 +211,14 @@ trait ModifiesPiggyBanks public function update(PiggyBank $piggyBank, array $data): PiggyBank { - $piggyBank = $this->updateProperties($piggyBank, $data); + $piggyBank = $this->updateProperties($piggyBank, $data); if (array_key_exists('notes', $data)) { $this->updateNote($piggyBank, (string)$data['notes']); } // update the order of the piggy bank: - $oldOrder = $piggyBank->order; - $newOrder = (int)($data['order'] ?? $oldOrder); + $oldOrder = $piggyBank->order; + $newOrder = (int)($data['order'] ?? $oldOrder); if ($oldOrder !== $newOrder) { $this->setOrder($piggyBank, $newOrder); } @@ -318,7 +318,7 @@ trait ModifiesPiggyBanks return; } - $dbNote = $piggyBank->notes()->first(); + $dbNote = $piggyBank->notes()->first(); if (null === $dbNote) { $dbNote = new Note(); $dbNote->noteable()->associate($piggyBank); @@ -329,15 +329,16 @@ trait ModifiesPiggyBanks public function setOrder(PiggyBank $piggyBank, int $newOrder): bool { - $oldOrder = $piggyBank->order; + $oldOrder = $piggyBank->order; // Log::debug(sprintf('Will move piggy bank #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); if ($newOrder > $oldOrder) { PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', $this->user->id) - ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder) - ->where('piggy_banks.id', '!=', $piggyBank->id) - ->distinct()->decrement('piggy_banks.order'); + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', $this->user->id) + ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder) + ->where('piggy_banks.id', '!=', $piggyBank->id) + ->distinct()->decrement('piggy_banks.order') + ; $piggyBank->order = $newOrder; Log::debug(sprintf('[1] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); @@ -346,11 +347,12 @@ trait ModifiesPiggyBanks return true; } PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id') - ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') - ->where('accounts.user_id', $this->user->id) - ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder) - ->where('piggy_banks.id', '!=', $piggyBank->id) - ->distinct()->increment('piggy_banks.order'); + ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id') + ->where('accounts.user_id', $this->user->id) + ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder) + ->where('piggy_banks.id', '!=', $piggyBank->id) + ->distinct()->increment('piggy_banks.order') + ; $piggyBank->order = $newOrder; Log::debug(sprintf('[2] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder)); @@ -371,7 +373,7 @@ trait ModifiesPiggyBanks } // if this account contains less than the amount, remove the current amount, update the amount and continue. $this->removeAmount($piggyBank, $account, $current); - $amount = bcsub($amount, (string)$current); + $amount = bcsub($amount, (string)$current); } } } diff --git a/composer.lock b/composer.lock index 277667b5af..99a8dcc94e 100644 --- a/composer.lock +++ b/composer.lock @@ -13087,5 +13087,5 @@ "ext-xmlwriter": "*" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/config/firefly.php b/config/firefly.php index 1c0f75f304..29ef9ec1ce 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -78,8 +78,8 @@ return [ 'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used. // see cer.php for exchange rates feature flag. ], - 'version' => 'develop/2026-01-18', - 'build_time' => 1768729886, + 'version' => 'develop/2026-01-19', + 'build_time' => 1768805645, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used. diff --git a/package-lock.json b/package-lock.json index 3884d60456..b4d9c74fb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3350,42 +3350,42 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.5.26", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.26.tgz", - "integrity": "sha512-vXyI5GMfuoBCnv5ucIT7jhHKl55Y477yxP6fc4eUswjP8FG3FFVFd41eNDArR+Uk3QKn2Z85NavjaxLxOC19/w==", + "version": "3.5.27", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.27.tgz", + "integrity": "sha512-gnSBQjZA+//qDZen+6a2EdHqJ68Z7uybrMf3SPjEGgG4dicklwDVmMC1AeIHxtLVPT7sn6sH1KOO+tS6gwOUeQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.28.5", - "@vue/shared": "3.5.26", + "@vue/shared": "3.5.27", "entities": "^7.0.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.5.26", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.26.tgz", - "integrity": "sha512-y1Tcd3eXs834QjswshSilCBnKGeQjQXB6PqFn/1nxcQw4pmG42G8lwz+FZPAZAby6gZeHSt/8LMPfZ4Rb+Bd/A==", + "version": "3.5.27", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.27.tgz", + "integrity": "sha512-oAFea8dZgCtVVVTEC7fv3T5CbZW9BxpFzGGxC79xakTr6ooeEqmRuvQydIiDAkglZEAd09LgVf1RoDnL54fu5w==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.5.26", - "@vue/shared": "3.5.26" + "@vue/compiler-core": "3.5.27", + "@vue/shared": "3.5.27" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.5.26", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.26.tgz", - "integrity": "sha512-egp69qDTSEZcf4bGOSsprUr4xI73wfrY5oRs6GSgXFTiHrWj4Y3X5Ydtip9QMqiCMCPVwLglB9GBxXtTadJ3mA==", + "version": "3.5.27", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.27.tgz", + "integrity": "sha512-sHZu9QyDPeDmN/MRoshhggVOWE5WlGFStKFwu8G52swATgSny27hJRWteKDSUUzUH+wp+bmeNbhJnEAel/auUQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.28.5", - "@vue/compiler-core": "3.5.26", - "@vue/compiler-dom": "3.5.26", - "@vue/compiler-ssr": "3.5.26", - "@vue/shared": "3.5.26", + "@vue/compiler-core": "3.5.27", + "@vue/compiler-dom": "3.5.27", + "@vue/compiler-ssr": "3.5.27", + "@vue/shared": "3.5.27", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.6", @@ -3393,14 +3393,14 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.5.26", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.26.tgz", - "integrity": "sha512-lZT9/Y0nSIRUPVvapFJEVDbEXruZh2IYHMk2zTtEgJSlP5gVOqeWXH54xDKAaFS4rTnDeDBQUYDtxKyoW9FwDw==", + "version": "3.5.27", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.27.tgz", + "integrity": "sha512-Sj7h+JHt512fV1cTxKlYhg7qxBvack+BGncSpH+8vnN+KN95iPIcqB5rsbblX40XorP+ilO7VIKlkuu3Xq2vjw==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.26", - "@vue/shared": "3.5.26" + "@vue/compiler-dom": "3.5.27", + "@vue/shared": "3.5.27" } }, "node_modules/@vue/component-compiler-utils": { @@ -3482,9 +3482,9 @@ "license": "MIT" }, "node_modules/@vue/shared": { - "version": "3.5.26", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.26.tgz", - "integrity": "sha512-7Z6/y3uFI5PRoKeorTOSXKcDj0MSasfNNltcslbFrPpcw6aXRUALq4IfJlaTRspiWIUOEZbrpM+iQGmCOiWe4A==", + "version": "3.5.27", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.27.tgz", + "integrity": "sha512-dXr/3CgqXsJkZ0n9F3I4elY8wM9jMJpP3pvRG52r6m0tu/MsAFIe6JpXVGeNMd/D9F4hQynWT8Rfuj0bdm9kFQ==", "dev": true, "license": "MIT" }, @@ -4564,9 +4564,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001764", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz", - "integrity": "sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==", + "version": "1.0.30001765", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001765.tgz", + "integrity": "sha512-LWcNtSyZrakjECqmpP4qdg0MMGdN368D7X8XvvAqOcqMv0RxnlqVKZl2V6/mBR68oYMxOZPLw/gO7DuisMHUvQ==", "dev": true, "funding": [ { diff --git a/resources/assets/v1/src/locales/id.json b/resources/assets/v1/src/locales/id.json index 1fcffc02b9..01b947f734 100644 --- a/resources/assets/v1/src/locales/id.json +++ b/resources/assets/v1/src/locales/id.json @@ -1,11 +1,11 @@ { "firefly": { - "administrations_page_title": "Financial administrations", - "administrations_index_menu": "Financial administrations", + "administrations_page_title": "Administrasi keuangan", + "administrations_index_menu": "Administrasi keuangan", "expires_at": "Expires at", - "temp_administrations_introduction": "Firefly III will soon get the ability to manage multiple financial administrations. Right now, you only have the one. You can set the title of this administration and its primary currency. This replaces the previous setting where you would set your \"default currency\". This setting is now tied to the financial administration and can be different per administration.", + "temp_administrations_introduction": "Firefly III segera akan memiliki kemampuan untuk mengelola beberapa administrasi keuangan. Saat ini, Anda hanya memiliki satu. Anda dapat mengatur judul administrasi ini serta mata uang utamanya. Pengaturan ini menggantikan pengaturan sebelumnya di mana Anda menetapkan \u201cmata uang default\u201d. Sekarang, pengaturan ini terkait langsung dengan masing-masing administrasi keuangan dan dapat berbeda untuk setiap administrasi.", "administration_currency_form_help": "It may take a long time for the page to load if you change the primary currency because transaction may need to be converted to your (new) primary currency.", - "administrations_page_edit_sub_title_js": "Edit financial administration \"{title}\"", + "administrations_page_edit_sub_title_js": "Edit administrasi keuangan \u201c{title}\u201d", "table": "Meja", "welcome_back": "Apa yang sedang dimainkan?", "flash_error": "Kesalahan!", @@ -20,7 +20,7 @@ "split": "Pisah", "single_split": "Pisah", "not_enough_currencies": "Not enough currencies", - "not_enough_currencies_enabled": "If you have just one currency enabled, there is no need to add exchange rates.", + "not_enough_currencies_enabled": "Jika Anda hanya mengaktifkan satu mata uang, tidak perlu menambahkan nilai tukar.", "transaction_stored_link": "Transaction #{ID} (\"{title}\")<\/a> has been stored.", "webhook_stored_link": "Webhook #{ID} (\"{title}\")<\/a> has been stored.", "webhook_updated_link": "Webhook #{ID}<\/a> (\"{title}\") has been updated.", @@ -31,7 +31,7 @@ "apply_rules_checkbox": "Apply rules", "fire_webhooks_checkbox": "Fire webhooks", "no_budget_pointer": "Anda tampaknya belum memiliki anggaran. Anda harus membuat beberapa di halaman-anggaran<\/a>. Anggaran dapat membantu anda melacak pengeluaran.", - "no_bill_pointer": "You seem to have no subscription yet. You should create some on the subscription<\/a>-page. Subscriptions can help you keep track of expenses.", + "no_bill_pointer": "Sepertinya Anda belum memiliki langganan. Buat beberapa di halaman Langganan<\/a>. Langganan dapat membantu Anda melacak pengeluaran.", "source_account": "Akun sumber", "hidden_fields_preferences": "You can enable more transaction options in your preferences<\/a>.", "destination_account": "Akun tujuan", @@ -50,7 +50,7 @@ "category": "Kategori", "attachments": "Lampiran", "notes": "Notes", - "external_url": "URL luar", + "external_url": "URL eksternal", "update_transaction": "Update transaction", "after_update_create_another": "After updating, return here to continue editing.", "store_as_new": "Store as a new transaction instead of updating.", @@ -59,7 +59,7 @@ "no_piggy_bank": "(tidak ada celengan)", "description": "Deskripsi", "split_transaction_title_help": "If you create a split transaction, there must be a global description for all splits of the transaction.", - "destination_account_reconciliation": "You can't edit the destination account of a reconciliation transaction.", + "destination_account_reconciliation": "Anda tidak dapat mengubah rekening tujuan pada transaksi rekonsiliasi.", "source_account_reconciliation": "Anda tidak dapat mengedit akun sumber dari transaksi rekonsiliasi.", "budget": "Anggaran", "bill": "Subscription", @@ -146,14 +146,14 @@ "response": "Tanggapan", "visit_webhook_url": "Visit webhook URL", "reset_webhook_secret": "Reset webhook secret", - "header_exchange_rates": "Exchange rates", - "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in the documentation<\/a>.", - "exchange_rates_from_to": "Between {from} and {to} (and the other way around)", - "exchange_rates_intro_rates": "Firefly III uses the following exchange rates. The inverse is automatically calculated when it is not provided. If no exchange rate exists for the date of the transaction, Firefly III will go back in time to find one. If none are present, the rate \"1\" will be used.", - "header_exchange_rates_rates": "Exchange rates", - "header_exchange_rates_table": "Table with exchange rates", + "header_exchange_rates": "Nilai tukar", + "exchange_rates_intro": "Firefly III mendukung pengunduhan dan penggunaan nilai tukar. Baca selengkapnya di dokumentasi<\/a>.", + "exchange_rates_from_to": "Antara {from} dan {to} (dan sebaliknya)", + "exchange_rates_intro_rates": "Firefly III menggunakan nilai tukar berikut. Nilai tukar terbalik akan dihitung secara otomatis jika tidak tersedia. Jika tidak ada nilai tukar untuk tanggal transaksi, Firefly III akan mencari nilai tukar sebelumnya. Jika tetap tidak ditemukan, nilai tukar \u201c1\u201d akan digunakan.", + "header_exchange_rates_rates": "Nilai tukar", + "header_exchange_rates_table": "Tabel dengan nilai tukar", "help_rate_form": "On this day, how many {to} will you get for one {from}?", - "add_new_rate": "Add a new exchange rate", + "add_new_rate": "Tambahkan nilai tukar baru", "save_new_rate": "Save new rate" }, "form": {