Section 49. Upon the termination of any service of the armed forces of the commonwealth under an order of the commander-in-chief, the adjutant general or a designated representative shall certify to the state treasurer the expense of said service, and the state treasurer shall thereupon assess said expense in the manner provided for by section twenty of chapter fifty-nine.