(a) the amount that the corporation would be deemed to have paid to the Minister under section 1029.8.21.23 for the particular year, in respect of the qualified expenditure, ifi. any amount of such assistance so repaid at or before the end of the fiscal period of repayment reduced, for the particular fiscal period, the aggregate determined under subparagraph b of the second paragraph of section 1029.8.21.17, and
ii. 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 the particular year, in respect of the qualified expenditure, if 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 partnership, if the agreed proportion in respect of the corporation for the particular fiscal period were the same as that for the fiscal period of repayment.