person if such persons are treated as a single employer under subsection (a) or (b) of section 52 or subsection (m) or (o) of section 414, except that determinations under subsections (a) and (b) of section 52 shall be made without regard to section 1563(b). (e) Special rules (1) Elective application of deduction Except as otherwise provided by the Secretary, the taxpayer may elect not to take any item of income into account as domestic manufacturing gross receipts for purposes of this section. (2) Coordination with section 199 If a deduction is allowed under this section with respect to any taxpayer for any taxable year, any gross receipts of the taxpayer which are taken into account under this section for such taxable year (and any items properly allocable thereto under subsection (b) or (c)) shall not be taken into account under section 199 for such taxable year. (3) Application of section to pass-thru entities (A) Partnerships and S corporations In the case of a partnership or S corporation— (i) this section shall be applied at the partner or shareholder level, (ii) each partner or shareholder shall take into account such person’s allocable share of each item described in subparagraph (A) or (B) of subsection (c)(1) (determined without regard to whether the items described in such subparagraph (A) exceed the items described in such subparagraph (B)), and (iii) each partner or shareholder shall be treated for purposes of subsection (b) as having an amount of each item taken into account in determining qualifying domestic investment of the partnership or S corporation for the taxable year equal to such person’s allocable share of such item (as determined under regulations prescribed by the Secretary). (B) Trust and estates In the case of a trust or estate— (i) the items referred to in subparagraph (A)(ii) (as determined therein) and the qualifying domestic investment of the trust or estate for the taxable year, shall be apportioned between the beneficiaries and the fiduciary (and among the beneficiaries) under