mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Merge branch 'main' into develop
This commit is contained in:
@@ -397,6 +397,9 @@ class BudgetController extends Controller
|
||||
foreach ($journals as $journal) {
|
||||
$key = sprintf('%d-%d', $journal['destination_account_id'], $journal['currency_id']);
|
||||
$amount = $journal['amount'];
|
||||
$symbol = $journal['currency_symbol'];
|
||||
$code = $journal['currency_code'];
|
||||
$name = $journal['currency_name'];
|
||||
|
||||
// if convert to native, use the native things, unless it's the foreign amount which is in the native currency.
|
||||
if ($this->convertToNative && $journal['currency_id'] !== $this->defaultCurrency->id && $journal['foreign_currency_id'] !== $this->defaultCurrency->id) {
|
||||
|
@@ -53,7 +53,11 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
public function destroyAll(): void
|
||||
{
|
||||
Log::channel('audit')->info('Delete all piggy banks through destroyAll');
|
||||
$this->user->piggyBanks()->delete();
|
||||
|
||||
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)
|
||||
->delete();
|
||||
}
|
||||
|
||||
public function findPiggyBank(?int $piggyBankId, ?string $piggyBankName): ?PiggyBank
|
||||
|
Reference in New Issue
Block a user