...
A special filter should be available on the queryset to retrieve all contract that have the the “amount“ between 2 values following that logic (should be usable by FE):
( if not null amountDue else if not null amountRectified else AmountNotified ) the BE will look for any contract that have either of amountDue, amountRectified or AmountNotified between those two amounts
Entity ContractDetails (input) - under Contract (HistoryModel)
...