If, at the time any amount is distributable or payable by the commonwealth to any city or town, there is due to the commonwealth any sum from such city or town, for any service or cause whatsoever, such sum so due to the commonwealth shall be deducted by the state treasurer from the amount so distributable or payable to the city or town, and shall be applied to the payment of the sum so due to the commonwealth.
Mass. Gen. Laws ch. 58, § 20A