When the petition has been filed with the Tax Court and when the amount which should have been assessed has been determined by a decision of the Tax Court which has become final, then any unpaid portion, the collection of which has been stayed by bond as provided in section
6863
(b) shall be collected as part of the tax upon notice and demand from the Secretary, and any remaining portion of the assessment shall be abated. If the amount already collected exceeds the amount determined as the amount which should have been assessed, such excess shall be credited or refunded to the taxpayer as provided in section
6402, without the filing of claim therefor. If the amount determined as the amount which should have been assessed is greater than the amount actually assessed, then the difference shall be assessed and shall be collected as part of the tax upon notice and demand from the Secretary.