[IMP] last_contract filtered by active

Merged Santiago Apel requested to merge last_contract_id into 12.0-stage

Merge request reports