pub struct SplitTransactionCreate {
pub amount: i64,
pub document_date: NaiveDate,
pub document_number: Option<Option<String>>,
pub note: Option<String>,
pub split_children: Vec<SplitTransactionChildCreate>,
pub extra: Map<String, Value>,
}Expand description
Input for a grouped booking. At least one child is needed; child amounts must sum exactly to amount. All children must share one debit or one credit account, with no account used on both sides. Parent and child notes may be null. A single child is saved as an ordinary transaction and yields HTTP 204.
Fields§
§amount: i64Total gross amount in minor currency units, equal to the sum of submitted child amounts.
document_date: NaiveDateDocument date applied to all children.
document_number: Option<Option<String>>Parent number. Required unless the period generates numbers; omission or null then generates a number, including on update. Multi-child bookings receive suffixes -1, -2, and so on.
None leaves the field out, Some(None) sends null.
note: Option<String>Parent note; trimmed, with an empty result stored as null. For single-child conversion this replaces the child note.
split_children: Vec<SplitTransactionChildCreate>Complete replacement list. Existing IDs keep/update rows; omitted previous rows are deleted. Omit id to create a new child.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.