View Source SoftBank.Entry (soft_bank v1.2.3)
Entries are the recording of account debits and credits and can be considered as consituting a traditional accounting Journal.
Summary
Functions
Accepts an SoftBank.Entry
and Ecto.Repo
and returns true/false based on whether
the associated amounts for that entry sum to zero.
Creates a changeset for SoftBank.Entry
, validating a required :description
and :date
,
casting an provided "debit" and "credit" SoftBank.Amount
s, and validating that
those amounts balance.
Accepts and returns a changeset, appending an error if "credit" and "debit" amounts are not equivalent
Types
Functions
Accepts an SoftBank.Entry
and Ecto.Repo
and returns true/false based on whether
the associated amounts for that entry sum to zero.
Creates a changeset for SoftBank.Entry
, validating a required :description
and :date
,
casting an provided "debit" and "credit" SoftBank.Amount
s, and validating that
those amounts balance.
validate_debits_and_credits_balance(changeset, default_currency \\ :USD)
View SourceAccepts and returns a changeset, appending an error if "credit" and "debit" amounts are not equivalent