(a) the amount that the corporation would be deemed to have paid to the Minister under section 1029.8.21.23 for its taxation year in which the particular fiscal period ends, in respect of the qualified expenditure, ifi. the aggregate determined under subparagraph b of the second paragraph of section 1029.8.21.17 were reduced, for the particular fiscal period, by the product obtained by multiplying any amount of such assistance so repaid at or before the end of the fiscal period of repayment by the reciprocal of the agreed proportion in respect of the corporation for the fiscal period of repayment, and
ii. except for the purposes of section 1029.8.21.25, the agreed proportion in respect of the corporation for the particular fiscal period were the same as that for the fiscal period of repayment; exceeds
(b) the aggregate ofi. the amount that the corporation would be deemed to have paid to the Minister under section 1029.8.21.23 for its taxation year in which the particular fiscal period ends, in respect of the qualified expenditure, if, except for the purposes of section 1029.8.21.25, the agreed proportion in respect of the corporation for the particular fiscal period were the same as that for the fiscal period of repayment, and
ii. any amount that the corporation would be deemed to have paid to the Minister under this section for a taxation year preceding the taxation year in which the fiscal period of repayment ends, in respect of an amount of that assistance repaid by the corporation, if, except for the purposes of section 1029.8.21.25, the agreed proportion in respect of the corporation for the particular fiscal period were the same as that for the fiscal period of repayment.