Yes - and no you do not cut off the accounting.
The S-corporation continues as if nothing happened and allocates the income/expenses to the selling shareholder based on his/her average shareholding on each day of the year.
basically 7/12's of the income and expenses
unless all shareholders elect to allocate up to 07/31.
See page 21 of the IRS 1120s instructions here - www.irs.gov/pub/irs-pdf/i1120s.pdf
basically there are two options
1 - the default method is to allocate based on 07/12s of ownership
2 - if the other shareholders agree you can allocate all income/expense items up to 07/31. Then after 07/31 the selling shareholder would not get any income/expense items
excellent, glad I could help.
let me know if you have any further questions on it.