---
tags: [accounting, command]
module: Accounting
---

# Commands

## Connections
[[_Accounting]] · [[[Model]Account]] · [[[Model]Asset]] · [[[Job]Jobs]] · [[[Service]AssetServices]]

## Source
`Modules/Accounting/Console/`

## DepreciateAssetsCommand
`php artisan accounting:depreciate-assets`
- Calls `DepreciateAssetsAutomaticallyService` ([[[Service]AssetServices]])
- Iterates all active depreciable [[[Model]Asset]] records and creates depreciation [[[Model]JournalEntry]] entries for the current period
- Intended to run on a scheduled basis (monthly/yearly)

## FillOpeningClosingBalancesFiscalYearsCommand
`php artisan fill:opening-balances`
- Recalculates opening/closing debit and credit balances for all accounts across all fiscal years
- Also triggered async via [[[Job]Jobs#FillOpeningClosingBalance]]
- Heavy operation — designed for batch/queue context

## AddInventoryAccountCommand
`php artisan accounting:add-inventory-account`
- Creates the default inventory [[[Model]Account]] for the tenant if it doesn't exist
- Used during tenant onboarding / module activation

## UpdateLockedAccountsCommand
`php artisan accounting:update-locked-accounts`
- Syncs the `status` field on [[[Model]Account]] records based on current lock rules
- Maintenance command for data consistency
