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

# Jobs

## Connections
[[_Accounting]] · [[[Model]Account]] · [[[Model]JournalEntry]] · [[[Service]JournalEntryServices]] · [[[Controller]AccountController]] · [[[Controller]JournalEntryController]] · [[[Service]IntegrationSyncServices]]

## Source
`Modules/Accounting/Jobs/`

## FillOpeningClosingBalance
**Queue**: `recalculate_opening_closing_balance`
**Dispatched by**: AccountController (store/update/destroy), ManualJournalEntryController (store/update/destroy)
**Executes**: `php artisan fill:opening-balances` — recalculates opening and closing balances for all affected accounts in the fiscal year
**Why async**: Balance recalculation can be expensive across many accounts; keeping it queued prevents UI blocking

## DeleteJournalEntry
**Purpose**: Async deletion of a [[[Model]JournalEntry]] in the background
**Uses**: `DeletingJournalEntryService` ([[[Service]JournalEntryServices]]), `RetrievingTenantBySubdomainService` ([[[Cross]CrossModuleDependencies#Tenant]])
**Traits**: `TenantConnectionOnRuntime` — re-establishes tenant DB connection inside the job

## UpdateJournalEntry
**Purpose**: Async update of a [[[Model]JournalEntry]]

## CollectSingleRecordJob
**Purpose**: Collects and aggregates multiple transaction records into single-record journal entries for a date range
**Uses**: `SingleRecordCollectorService` ([[[Service]JournalEntryServices]])

## CollectSingleRecordForSingleDayJob
**Purpose**: Same as above but scoped to a single day
