A parent wants to pay three months at once — how is that recorded?
As a deposit into the family wallet. The money is recorded as that family's balance, visible to staff and to the parent, and is then spent when the coming invoices are paid — partly or in full, as chosen at the moment of payment.
The balance does not attach itself to invoices at random. Whoever pays chooses which invoice it closes, so money paid ahead is never quietly consumed by an invoice nobody meant.