This article was originally published by Marijuana Venture on September 17, 2015.

With Tax Day 2015 fading into the rearview, a constitutional fight is looming between the IRS and the cannabis industry that could determine the long-term viability of legal marijuana businesses.

That constitutional tussle became virtually inevitable earlier this year, when the IRS issued a ruling that has become infamous among growers and dispensaries. The ruling mapped out a bold new attack plan for the IRS in response to some decisions in the Tax Court that were friendly to cannabis businesses, including one in which the court allowed 75% of the deductions claimed by the taxpayer.

Basically, the IRS has taken the position that, even though the Constitution requires that the government allow all taxpayers deductions for their cost of goods sold (COGS), cannabis businesses alone are subject to a different set of old, outdated rules governing COGS deductions. In our view, this violates the U.S. Constitution.

For example, under the old COGS rules that the IRS wants to resurrect for cannabis businesses, a dispensary would only be able to deduct the payments to the grower, as well as certain transportation costs; under the new rules, a dispensary would be able to deduct these costs, but also indirect costs attributable to purchasing, handling (or processing), and storing the marijuana, including labor, materials and supplies, off-site warehousing costs, utilities, insurance and certain taxes. It is not hyperbole to say that the value of these additional deductions could mean the difference between a profitable business and an unprofitable one.

We are aware that even before the ruling was issued, the IRS was applying this new reasoning in audits of cannabis businesses. Any affected taxpayers should consult their tax advisor as to whether the constitutional argument can and should be made to the IRS audit examiner or appeals officer. Given the IRS policy as expressed in the ruling, such an argument is likely to have little traction at the audit level, but may persuade the appeals officer into a settlement favorable to the taxpayer. Unlike the audit examiner, the appeals officer is required to consider the possibility that the IRS could lose in court.

Most of the time, however, an IRS appeals officer will not be persuaded by constitutional challenges, and such a case could ultimately be heard by a court. And what would happen in such a case? While the argument that the ruling is unconstitutional is not a slam dunk by any means, the arguments advanced by the IRS in the ruling are susceptible to attack and, in our view, taxpayers have the better of the argument.

In some respects, the constitutional issue is only one battle in a larger war. Even if the issue were to be resolved in the taxpayer’s favor, the next issue would be which indirect costs are “attributable to” purchasing, handling and storing activities (and are thus included in COGS deductions) and which are attributable to selling activities (and are thus not included).

Here, the taxpayer and his or her advisors need to have a system in place (before the audit) for allocating costs among the company’s purchasing, handling/processing, storage and selling functions. Just as importantly, the taxpayer needs to keep pristine records of these allocations and their bases (e.g., employee-time spent, square-footage employed for each function). Even then, there will be issues. For example, can a portion of the Washington State excise tax on marijuana sales be allocated to non-sales functions (and thus be partially included in COGS deductions), even though it is imposed on the sale? It can be anticipated that the IRS will take a hard line on this and similar issues, even if taxpayers ultimately prevail on the constitutional issue.

These issues are not likely to go away any time soon. Even if Congress moves to bring federal marijuana laws into line with states where it is legal, it would most likely only do so for medical marijuana, leaving federal taxes on recreational marijuana businesses out in the cold. With so much at stake for the cannabis industry, and with a period of uncertainty ahead, the time for consulting an advisor is before a problem arises.

*Matt Kaden is a former associate at Boies, Schiller & Flexner LLP.