pub struct TransactionUpdate {Show 17 fields
pub account_id: i64,
pub amount: i64,
pub cash_discount_amount: Option<Option<i64>>,
pub cash_discount_id: Option<Option<i64>>,
pub contra_account_id: i64,
pub contra_cost_center_id: Option<Option<i64>>,
pub cost_center_id: Option<Option<i64>>,
pub document_date: NaiveDate,
pub donator_id: Option<Option<i64>>,
pub donator_spouse_id: Option<Option<i64>>,
pub is_waiver_of_reimbursement_of_expenses: Option<bool>,
pub note: String,
pub tax_rate_id: Option<Option<i64>>,
pub document_number: String,
pub ignore_donation_constraint: Option<bool>,
pub is_immutable: Option<bool>,
pub extra: Map<String, Value>,
}Expand description
Replaces required booking fields. Omitted cost center, donor/spouse and tax rate are cleared; waiver defaults to false. Cash-discount fields are retained when cashDiscountId is omitted or null. Existing immutable bookings, generated tax bookings, cancellations and split children cannot be updated through the ordinary endpoint.
Fields§
§account_id: i64ID of the debit account the amount is posted to.
amount: i64Gross booking amount in integer minor currency units. With taxRateId, tax is calculated from this amount and split into a separate booking; the returned main booking contains the remaining net amount.
cash_discount_amount: Option<Option<i64>>Cash discount in the smallest currency unit. Used only together with cashDiscountId.
None leaves the field out, Some(None) sends null.
cash_discount_id: Option<Option<i64>>Cash-discount definition from the same accounting period. When supplied, cashDiscountAmount must also be non-null.
None leaves the field out, Some(None) sends null.
contra_account_id: i64ID of the credit (contra) account the amount is posted from. Equal to accountId only for a cost center transfer.
contra_cost_center_id: Option<Option<i64>>ID of the target cost center for a cost center transfer. Required when accountId and contraAccountId are equal, otherwise it must be omitted or null.
None leaves the field out, Some(None) sends null.
cost_center_id: Option<Option<i64>>Cost center from the same accounting period. Omission or null clears the assignment on update. Required as the source cost center for a cost center transfer.
None leaves the field out, Some(None) sends null.
document_date: NaiveDateDate printed on the underlying document/receipt.
donator_id: Option<Option<i64>>Donor person ID. Normally required when only the credit account is a donation account. Donor assignments are retained only when exactly one side is a donation account.
None leaves the field out, Some(None) sends null.
donator_spouse_id: Option<Option<i64>>Spouse for joint donation receipts. Requires a different donor person and an existing spouse relationship; inconsistent assignments return 422.
None leaves the field out, Some(None) sends null.
is_waiver_of_reimbursement_of_expenses: Option<bool>Whether this is a donation through waived reimbursement of expenses. Defaults to false, including on update.
note: StringFree-text note describing the booking.
tax_rate_id: Option<Option<i64>>Tax rate from the same accounting period. Generates or updates a separate tax booking. On update, omission or null removes the existing tax booking.
None leaves the field out, Some(None) sends null.
document_number: StringReplacement document number; never generated automatically on update.
ignore_donation_constraint: Option<bool>Skip the normal donation-account/donor constraint. Spouse-consistency checks still apply when assignments change.
is_immutable: Option<bool>Finalize this booking and its tax booking. This cannot unlock an already immutable booking.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.