= $contract ? 'Only a contract with an end date can be renewed - a draft is made active first.' : 'That contract is gone - it may have been deleted.' ?>
= date('Y-m-d', strtotime('-1 day')) ? $end : date('Y-m-d', strtotime('-1 day'));
// Carried on from its last day, on the day of the month it started; from today, a term from today
$new_end = contractNextEnd($from, $contract['contract_term_months'], $from === $end ? contractAnchorDay($contract) : 0); ?>