-
Notifications
You must be signed in to change notification settings - Fork 1
Entry
Documentation > Entry
Entries compose Transactions. An individual Entry allocates some value to an Account as either one of the fundamental Sides: a debit or a credit. All together, those debits and credits will add up to zero, satisfying the fundamental double-entry accounting equality.
When utilising the Amatino API, operations involving Entries always occur as part of a Transaction request. For example, when creating a Transaction, you will specify a JSON Array of Entry objects under the entries key. You will never send or recieve an Entry object on its own to or from the Amatino API.
.side
- Side
The fundamental side of this Entry, a debit or a credit.
Example: Side.debit
A friendly description of this Entry. Suitable for a more granular description than that provided to the containing Transaction. You might also provide an empty string if the containing Transaction's description already provides sufficient information.
Example: "Portion of transaction allocating prior customer deposit to revenue"
The integer identifier of the Account to which this Entry allocates value.
Example: 42
A string describing the amount of value this Entry allocates.
Example: "100.42"
You will use the constructor
to initialise Entries for inclusion in Transactions. For example, see the constructor
in action in the Transaction.createWithGlobalUnit()
static method.
const debitEntry = new Entry(
Side.debit,
"Increase value of cash on hand",
cashOnHand, // an instance of type Account,
amount: "42.42"
)