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

# JournalRecord

## Connections
[[_Accounting]] · [[[Model]JournalEntry]] · [[[Model]Account]] · [[[Repo]Repositories]] · [[[Service]JournalEntryServices]] · [[[DB]DatabaseTables]] · [[[Cross]CrossModuleDependencies]]

## Source
```
Modules/Accounting/Models/JournalRecord.php
```

## Responsibilities
- A single debit or credit line within a [[[Model]JournalEntry]]
- Stores the account, value, transaction type (debit/credit), running balance, currency, tax, and optional links to a customer or supplier
- `balance_after_transaction` is maintained at write time to support account statement queries

## Key Relationships

| Relation | Type | Target |
|---|---|---|
| journalEntry | belongsTo | [[[Model]JournalEntry]] |
| account | belongsTo | [[[Model]Account]] |
| customer | belongsTo | [[[Cross]CrossModuleDependencies#Sales]] Customer |
| supplier | belongsTo | [[[Cross]CrossModuleDependencies#Purchases]] Supplier |
| costCenter | belongsTo | [[[Cross]CrossModuleDependencies#Products]] CostCenter |
| tax | belongsTo | [[[Cross]CrossModuleDependencies#Settings]] Tax |

## Key Columns
`account_id` · `value` · `exchange_rate` · `transaction_type` (debit/credit) · `balance_after_transaction` · `currency_code` · `tax_id` · `tax_status` · `total_debit` · `total_credit`

## Traits
`FormatDateAndTimeTrait` · `SoftDeletes` · `UsesTenantConnection`

## Used By
- [[[Service]JournalEntryServices]] `UpdateRecordCustomerSupplierBalance` trait — updates Customer/Supplier running balances on create/delete
- [[[Repo]Repositories]] `JournalRecordsRepository` — used by account statement reports and reconciliation
- [[[Model]Reconciliation]] — `ReconciliationDetail` points to individual JournalRecords
