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

# EasyEntry

## Connections
[[_Accounting]] · [[[Model]JournalEntry]] · [[[Model]Account]] · [[[Repo]Repositories]] · [[[Observer]Observers]] · [[[Controller]EasyEntryController]] · [[[Service]EasyEntryServices]] · [[[DB]DatabaseTables]]

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

## Responsibilities
- A simplified shortcut for common two-sided journal entries (money transfer, add capital, dividends, owner drawings)
- Stores just two account references (debit + credit) and an amount — delegates actual JE creation to [[[Service]JournalEntryServices]]
- `EasyEntriesTypeEnum` defines the 4 supported types

## Key Relationships

| Relation | Type | Target |
|---|---|---|
| debitAccount | belongsTo | [[[Model]Account]] (account_from) |
| creditAccount | belongsTo | [[[Model]Account]] (account_to) |
| journalEntry | belongsTo | [[[Model]JournalEntry]] |

## Easy Entry Types (`EasyEntriesTypeEnum`)
| Key | Description |
|---|---|
| money_transfer | Transfer between two cash/bank accounts |
| add_capital | Owner capital injection |
| cash_dividends | Dividend payout |
| owner_drawings | Owner withdrawal |

## Observer
`EasyEntryObserver` — handles post-save side effects

## Creation Flow
```
EasyEntryController::store
  → CreatingEasyEntryService
  → CreatingNewJournalEntryService (creates underlying [[[Model]JournalEntry]])
  → EasyEntry.journal_entry_id set
```

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