mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
commit
8807f04599
@ -94,19 +94,39 @@ class DestroyController extends Controller
|
|||||||
case 'object_groups':
|
case 'object_groups':
|
||||||
$this->destroyObjectGroups();
|
$this->destroyObjectGroups();
|
||||||
break;
|
break;
|
||||||
|
case 'not_assets_liabilities':
|
||||||
|
$this->destroyAccounts(
|
||||||
|
[
|
||||||
|
AccountType::BENEFICIARY,
|
||||||
|
AccountType::CASH,
|
||||||
|
AccountType::CREDITCARD,
|
||||||
|
AccountType::DEFAULT,
|
||||||
|
AccountType::EXPENSE,
|
||||||
|
AccountType::IMPORT,
|
||||||
|
AccountType::INITIAL_BALANCE,
|
||||||
|
AccountType::LIABILITY_CREDIT,
|
||||||
|
AccountType::RECONCILIATION,
|
||||||
|
AccountType::REVENUE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'accounts':
|
case 'accounts':
|
||||||
$this->destroyAccounts(
|
$this->destroyAccounts(
|
||||||
[
|
[
|
||||||
AccountType::ASSET,
|
AccountType::ASSET,
|
||||||
AccountType::DEFAULT,
|
|
||||||
AccountType::BENEFICIARY,
|
AccountType::BENEFICIARY,
|
||||||
AccountType::EXPENSE,
|
AccountType::CASH,
|
||||||
AccountType::REVENUE,
|
AccountType::CREDITCARD,
|
||||||
AccountType::INITIAL_BALANCE,
|
|
||||||
AccountType::DEBT,
|
AccountType::DEBT,
|
||||||
|
AccountType::DEFAULT,
|
||||||
|
AccountType::EXPENSE,
|
||||||
|
AccountType::IMPORT,
|
||||||
|
AccountType::INITIAL_BALANCE,
|
||||||
|
AccountType::LIABILITY_CREDIT,
|
||||||
AccountType::LOAN,
|
AccountType::LOAN,
|
||||||
AccountType::MORTGAGE,
|
AccountType::MORTGAGE,
|
||||||
AccountType::CREDITCARD,
|
AccountType::RECONCILIATION,
|
||||||
|
AccountType::REVENUE,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -53,7 +53,8 @@ class DestroyRequest extends FormRequest
|
|||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
$valid = 'budgets,bills,piggy_banks,rules,recurring,categories,tags,object_groups'.
|
$valid = 'budgets,bills,piggy_banks,rules,recurring,categories,tags,object_groups'.
|
||||||
',accounts,asset_accounts,expense_accounts,revenue_accounts,liabilities,transactions,withdrawals,deposits,transfers';
|
',accounts,asset_accounts,expense_accounts,revenue_accounts,liabilities,transactions,withdrawals,deposits,transfers'.
|
||||||
|
',not_assets_liabilities';
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'objects' => sprintf('required|min:1|string|in:%s', $valid),
|
'objects' => sprintf('required|min:1|string|in:%s', $valid),
|
||||||
|
@ -318,7 +318,7 @@
|
|||||||
url = '{{ route('api.v1.data.purge') }}';
|
url = '{{ route('api.v1.data.purge') }}';
|
||||||
}
|
}
|
||||||
if (link.data('type') === 'unused_accounts') {
|
if (link.data('type') === 'unused_accounts') {
|
||||||
url = deleteAPIRoute + '?objects=accounts&unused=true';
|
url = deleteAPIRoute + '?objects=not_assets_liabilities&unused=true';
|
||||||
}
|
}
|
||||||
|
|
||||||
// replace icon with loading thing
|
// replace icon with loading thing
|
||||||
|
Loading…
Reference in New Issue
Block a user