For purposes of this act, a partner's distributive share of partnership income or of any item of income, gain, loss or deduction shall be determined in accordance with his or her distributive share of such item or items as determined for federal income tax purposes: Provided, however, That where a partner's distributive share of an item of partnership income, gain, loss, deduction, or credit is determined for federal income tax purposes by special provision of the partnership agreement with respect to such item, and where the principal purpose of such provision is the avoidance or evasion of tax under this act, the partner's distributive share of such item, and any modification required with respect thereto, shall be determined as if the partnership agreement made no special provision with respect to such item.
K.S.A. 79-32,133