JournalEntry
extends Model
in package
Uses
CommonResponseProperties, HasFactory, HasRevisions
Records a transaction between accounts.
Tags
Table of Contents
- $arguments : array<string|int, mixed>
- $clearing : bool
- $created_at : Carbon
- $createdBy : string
- $currency : string
- $description : string
- $domainUuid : string
- $entries : Collection
- $extra : string
- $journalEntryId : int
- $journalReferenceUuid : string
- $language : string
- $locked : bool
- $opening : bool
- $reviewed : bool
- $revision : Carbon
- $subJournalUuid : string
- $transDate : Carbon
- $updated_at : Carbon
- $updatedBy : string
- checkRevision() : mixed
- Throw a Breaker exception if the request revision doesn't match the stored value.
- checkUnlocked() : mixed
- Check that the entry is unlocked and can be modified.
- details() : HasMany
- Relationship to fetch the related JournalDetail records.
- fillFromMessage() : $this
- Store details from an Entry message into this JournalEntry.
- references() : HasManyThrough
- Relationship to fetch any related JournalReferences.
- toResponse() : array<string|int, mixed>
- Generate an array suitable for a JSON response.
Properties
$arguments
public
array<string|int, mixed>
$arguments
Translation arguments for the description.
$clearing
public
bool
$clearing
Set when this is a clearing transaction.
$created_at
public
Carbon
$created_at
Record creation timestamp.
$createdBy
public
string
$createdBy
Record creation entity.
$currency
public
string
$currency
The currency for this transaction.
$description
public
string
$description
Description of the transaction (untranslated).
$domainUuid
public
string
$domainUuid
The UUID of the transaction's domain.
$entries
public
Collection
$entries
The associated journal detail records.
$extra
public
string
$extra
Extra data for application use.
$journalEntryId
public
int
$journalEntryId
Primary key.
$journalReferenceUuid
public
string
$journalReferenceUuid
Optional reference to an associated entity.
$language
public
string
$language
The language this description is written in.
$locked
public
bool
$locked
Set when this transaction is not to be modified.
$opening
public
bool
$opening
Set if this is the opening balance entry.
$reviewed
public
bool
$reviewed
Set when the transaction has been reviewed.
$revision
public
Carbon
$revision
Revision timestamp to detect race condition on update.
$subJournalUuid
public
string
$subJournalUuid
UUID of the sub-journal (if any)
$transDate
public
Carbon
$transDate
The date/time of the transaction.
$updated_at
public
Carbon
$updated_at
Last record update timestamp.
$updatedBy
public
string
$updatedBy
Record update entity.
Methods
checkRevision()
Throw a Breaker exception if the request revision doesn't match the stored value.
public
checkRevision(string|null $revision) : mixed
Parameters
- $revision : string|null
Tags
Return values
mixed —checkUnlocked()
Check that the entry is unlocked and can be modified.
public
checkUnlocked() : mixed
Tags
Return values
mixed —details()
Relationship to fetch the related JournalDetail records.
public
details() : HasMany
Return values
HasMany —fillFromMessage()
Store details from an Entry message into this JournalEntry.
public
fillFromMessage(Entry $message) : $this
Parameters
- $message : Entry
Return values
$this —references()
Relationship to fetch any related JournalReferences.
public
references() : HasManyThrough
Return values
HasManyThrough —toResponse()
Generate an array suitable for a JSON response.
public
toResponse(int $opFlags) : array<string|int, mixed>
Parameters
- $opFlags : int