SoftBank.Entry (soft_bank v0.1.3) View Source
Entries are the recording of account debits and credits and can be considered as consituting a traditional accounting Journal.
Link to this section 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.Amounts, and validating that
those amounts balance.
Accepts and returns a changeset, appending an error if "credit" and "debit" amounts are not equivalent
Link to this section Types
Specs
Link to this section Functions
Specs
balanced?(Ecto.Repo.t(), t()) :: Boolean.t()
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.Amounts, and validating that
those amounts balance.
Accepts and returns a changeset, appending an error if "credit" and "debit" amounts are not equivalent