pub struct Transaction {Show 30 fields
pub deprecated: TransactionDeprecated,
pub account_id: i64,
pub amount: i64,
pub bills: Option<Vec<Bill>>,
pub cash_discount_amount: Option<i64>,
pub cash_discount_id: Option<i64>,
pub contra_account_id: i64,
pub contra_cost_center_id: Option<i64>,
pub cost_center_id: Option<i64>,
pub document_date: NaiveDate,
pub document_number: String,
pub donator: Option<DomainObjectPerson>,
pub donator_id: Option<i64>,
pub donator_spouse: Option<DomainObjectPerson>,
pub donator_spouse_id: Option<i64>,
pub id: i64,
pub is_immutable: bool,
pub is_synced: bool,
pub is_waiver_of_reimbursement_of_expenses: bool,
pub meta: MetaDataEntityId,
pub note: Option<String>,
pub permissions: Option<TransactionPermissions>,
pub split_transaction_id: Option<i64>,
pub storno_base_id: Option<i64>,
pub storno_transaction_id: Option<i64>,
pub tax_base_id: Option<i64>,
pub tax_rate_id: Option<i64>,
pub tax_transaction_id: Option<i64>,
pub transaction_date: NaiveDate,
pub extra: Map<String, Value>,
}Expand description
A single accounting transaction (a booking). Every transaction posts a given amount between a debit account (accountId) and a credit account (contraAccountId) within one accounting period. Equal account IDs represent a transfer from costCenterId to contraCostCenterId. Monetary values are always integers in the currency’s smallest denomination (e.g. cents). A transaction that belongs to a split transaction references its parent via splitTransactionId and cannot be edited or deleted on its own.
Fields§
§deprecated: TransactionDeprecatedCompatibility marker mapping the deprecated donor ID fields to their replacements.
account_id: i64ID of the debit account the amount is posted to.
amount: i64Stored booking amount in minor currency units. When this is the main booking of a tax split, it excludes the separate taxTransactionId amount; add both amounts to obtain the gross input amount.
bills: Option<Vec<Bill>>Receipts attached to this booking, included when include[]=bills is requested.
cash_discount_amount: Option<i64>Granted cash discount in the currency’s smallest denomination (e.g. cents). null if no cash discount applies.
cash_discount_id: Option<i64>ID of the applied cash discount, or null if none.
contra_account_id: i64ID of the credit (contra) account the amount is posted from.
contra_cost_center_id: Option<i64>ID of the target cost center for a cost center transfer. Required when accountId and contraAccountId are equal, otherwise it must be null.
cost_center_id: Option<i64>ID of the assigned cost center, or null if none. For a cost center transfer this is the source cost center.
document_date: NaiveDateDocument date of the booking. Used for accounting-period validation, date filters and accounting reports.
document_number: StringDocument number of the transaction. Auto-generated when the accounting period increments document numbers, otherwise required on creation.
donator: Option<DomainObjectPerson>Resolved donor person, or null when no person has been resolved. Without donor visibility the response contains a censored person placeholder.
donator_id: Option<i64>deprecated in the ChurchTools API
Deprecated: use donator instead.
donator_spouse: Option<DomainObjectPerson>Resolved spouse for joint donation receipts, or null. Without donor visibility the response contains a censored person placeholder.
donator_spouse_id: Option<i64>deprecated in the ChurchTools API
Deprecated: use donatorSpouse instead.
id: i64Unique ID of the transaction.
is_immutable: boolIf a transaction is immutable, none of its fields can be changed and it cannot be deleted (it has been finalized/locked).
is_synced: boolTrue, if the transaction has been created through a sync.
is_waiver_of_reimbursement_of_expenses: boolTrue, if this transaction is a waiver of reimbursement of expenses (“Aufwandsspende”).
meta: MetaDataEntityId§note: Option<String>Free-text booking note. Null when unset or hidden because the current user may view the transaction but not its donor information.
permissions: Option<TransactionPermissions>Permissions calculated for the current caller, or null when this booking was serialized without a permission collection, for example a newly generated tax child.
split_transaction_id: Option<i64>ID of the parent split transaction, or null if this is a normal standalone transaction.
storno_base_id: Option<i64>Reference to the transaction which gets stornoed by this transaction.
storno_transaction_id: Option<i64>Reference to the transaction which stornoed this transaction.
tax_base_id: Option<i64>Reference to the transaction which is the base for a tax split booking.
tax_rate_id: Option<i64>If a tax rate is set for the transaction, the corresponding tax transaction is returned in the field taxTransactionId.
tax_transaction_id: Option<i64>Reference to the transaction which is a split booking for taxes.
transaction_date: NaiveDateDate on which the transaction was created, derived from meta.createdDate. Date filters and accounting reports use documentDate.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.