[verb た-form] + ことにする [verb ない-form → なかった] + ことにする [verb た-form] + ことになる [verb ない-form → なかった] + ことになる
たことにする means "act as if something happened", whether it did or not. The verb is in the た-form; with the past negative, なかったことにする, it is "pretend it never happened". It is a choice: someone decides to treat the facts that way.
たことになる is not a choice. It says what something counts as or amounts to – in other people's eyes, on paper, or by simple arithmetic. That can be contrary to the facts, or it can simply follow from them.
With ている, as in the second example, たことになっている is the official version: what the records or the agreed story say.
The split is the same as with ことにする and ことになる after the dictionary form: する is someone's decision, なる is how things come out.
When someone else makes the choice for you, it is the passive たことにされる.