updateSplitTransactions updates the metadata of split transactions to maintain their relationships. It sets the parent transaction ID and creates linked references for each split transaction. Parameters: - transactions []*model.Transaction: The split transactions to update. - parentID string: The I
(transactions []*model.Transaction, parentID, originalRef string)
| 2077 | // - parentID string: The ID of the parent transaction. |
| 2078 | // - originalRef string: The original reference to base the new references on. |
| 2079 | func updateSplitTransactions(transactions []*model.Transaction, parentID, originalRef string) { |
| 2080 | for i, txn := range transactions { |
| 2081 | txn.ParentTransaction = parentID |
| 2082 | txn.Reference = fmt.Sprintf("%s_%d", originalRef, i+1) |
| 2083 | } |
| 2084 | } |
| 2085 | |
| 2086 | // enqueueTransactions enqueues the original transaction or its split transactions into the provided queue. |
| 2087 | // It starts by determining which transactions to enqueue, then iterates through them and enqueues each one. |
no outgoing calls
no test coverage detected