San Francisco’s switch to a gross receipts tax — which would tax a portion of biotech companies’ nonprofit grants as well as funding from R&D partnerships — threatens to undo much of the city’s work over the past decade to establish itself as a biotech hub.

The gross receipts tax, approved by voters in November 2012, is part of a sweeping overhaul of the city’s tax and fee structure for businesses. The tax took effect Jan. 1 but is phased in through 2018 as the old payroll tax is phased out.

The tax liability of small businesses with $1 million or less of gross receipts as well as nonprofits are exempt, while there is a limit on taxes paid by ventures in the growing mid-Market enclave of high-tech and social media companies.