Utah lawmakers are still putting the finishing touches on an $8 billion state budget, tweaking and twisting the numbers to reach a zero balance before midnight tonight.

On Tuesday, lawmakers passed the general appropriations act that funds most state agencies, colleges and universities, in the process fending off last-minute attempts to amend the bill. Those attempts irritated budget leaders, who spent the entire day crafting compromise after compromise to get the bill to a vote.

"We have not passed a state budget . . . and it may not be wise to wait until the last moment," said Rep. Ron Bigelow, R-West Valley and co-chairman of Executive Appropriations. The budget passed overwhelmingly in both houses.

The $2.1 billion education funding bill remained stalled Tuesday in the Senate over a House amendment that would have given bonuses to part-time school employees.

The appropriations bill was made possible by a last-minute deal over a controversial cable television and satellite tax, which diverts $4.4 million in sales taxes now collected by cities to the state. And the deal set off a flurry of action on so-called "money" bills — those that would raise funds and others that would spend it.

It took some GOP arm-twisting to get the House to agree to change the current cable and satellite tax law. But after closing the caucus to air their differences, Republicans emerged agreeing to change the law so that the state reaps a 6.25 percent "excise" tax on cable television and satellite services.

While House members buckled on the cable television tax, they refused to go along with the Senate's imposition of a $32 court fine surcharge on misdemeanor violations, such as speeding tickets, in some rural areas.

The debates over SB195 and SB196 are illustrative — if sometimes confused with political spin.

GOP leaders say that SB195 — the cable and satellite broadcast tax — is actually a tax cut. That's because the end result is government actually taking about $200,000 less in overall tax. The new rate would be 6.25 percent, which would be lower for most cable subscribers, which make up 85 percent of the pool. But that rate would be higher for the satellite subscribers, who make up the remaining 15 percent.

Because cities get a portion of the sales tax, by changing the tax to an excise tax the state can then capture all of the tax revenue, in this case $4.4 million. And they also get a balanced budget.

And maybe a bit more. On Tuesday night, the Senate approved a 10 percent tax on escort services and strip clubs, which would raise another $500,000. The money was supposed to go to pay for programs for victims of sex crimes, but the Senate took that provision out. Now the money flows into the general fund where lawmakers can spend it how they want. The House must still approve that change.

Lawmakers were more reluctant to tack on stiff surcharges for traffic tickets, rejecting SB196 that would have added $32 to every ticket to pay for bailiffs and security in justice courts and juvenile courts. It also reimburses counties for the cost of inmates sentenced to jail for violating city ordinances.

Supporters say the bill is needed to correct inequities in that district courts already charge the fee when hearing traffic cases. "There is a street near Ogden where if you are driving east (on one side of the line) your speeding ticket is $80, driving west (on the other side of the line) it's $40," said Rep. Lou Shurtliff, D-Ogden.

That's because last year, lawmakers placed the $32 court surcharge on misdemeanors handled by state courts. SB196 seeks to place those same surcharges on justice courts, which are run by cities and towns.

But a number of House members said the bill didn't go through a budget subcommittee, unlike last year's state court surcharges, and had an improper hearing. Others argue SB196 is just a hidden tax hike.

Said Rep. Jim Dunnigan, R-Taylorsville: "A $50 speeding ticket already has a 35 percent state mandate surcharge. Now with this bill you'd add another $32 on top of it" in some geographic areas. "That's $49 in surcharges out of a $50 ticket. This is a horrible, terrible bill."

SB196 failed, 41-30, in the House.

But with midnight still hours away, there is always time to resurrect it. The only thing that can be counted on in the last day is that nothing is truly dead until the gavel falls.

E-mail: bbjr@desnews.com