A member entitled to be paid under this section shall be deemed, for purposes of this section, to have accrued pay and allowances for each day of leave required to be taken under
section 876a of this title that is charged as excess leave (except any day of accrued leave for which the member has been paid under
section 706(b)(1) of this title and which has been charged as excess leave). If the pay grade of the member was reduced to a lower grade as a result of the court-martial sentence (including any reduction in pay grade under
section 858a of this title) and such reduction has not been set aside, disapproved, or otherwise vacated, pay and allowances to be paid under this section shall be deemed to have accrued in such lower grade. Otherwise, such pay and allowances shall be deemed to have accrued in the pay grade held by the member on the day before the day on which his court-martial sentence was approved by the convening authority.