"""Advances logic.""" from moneyhub import models def get_by_account_and_statement_periods( account_id: int, statement_period_ids: list[int], contract_id: int | None ) -> list[models.CombinedAdvances]: """Get advances for an account and statement period. Args: account_id (int): The id of an account statement_period_ids (list): The ids of the statement periods contract_id: Optional id of the contract Returns: list: List of advances """ return models.CombinedAdvances.get_by_account_and_statement_periods( account_id, statement_period_ids, contract_id)