Documentation

JournalEntry extends Model
in package
Uses CommonResponseProperties, HasFactory, HasRevisions

Records a transaction between accounts.

Tags
mixin

Builder

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
__get()  : HigherOrderCollectionProxy|mixed|string|null
The revision Hash is computationally expensive, only calculated when required.
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.
clearRevisionCache()  : void
details()  : HasMany
Relationship to fetch the related JournalDetail records.
fillFromMessage()  : $this
Store details from an Entry message into this JournalEntry.
getRevisionHash()  : mixed
references()  : HasManyThrough
Relationship to fetch any related JournalReferences.
refresh()  : mixed
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.

$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

__get()

The revision Hash is computationally expensive, only calculated when required.

public __get( $key) : HigherOrderCollectionProxy|mixed|string|null
Parameters
$key :
Tags
throws
Exception
Return values
HigherOrderCollectionProxy|mixed|string|null

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
throws
Breaker
Return values
mixed

checkUnlocked()

Check that the entry is unlocked and can be modified.

public checkUnlocked() : mixed
Tags
throws
Breaker
Return values
mixed

clearRevisionCache()

public clearRevisionCache() : void
Return values
void

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

getRevisionHash()

public getRevisionHash() : mixed
Return values
mixed

references()

Relationship to fetch any related JournalReferences.

public references() : HasManyThrough
Return values
HasManyThrough

refresh()

public refresh() : mixed
Return values
mixed

toResponse()

Generate an array suitable for a JSON response.

public toResponse(int $opFlags) : array<string|int, mixed>
Parameters
$opFlags : int
Tags
throws
Exception
Return values
array<string|int, mixed>

Search results