Stock-Based Compensation - Taxes (Details) - USD ($) |
3 Months Ended | 9 Months Ended | ||
|---|---|---|---|---|
Apr. 30, 2017 |
Apr. 30, 2016 |
Apr. 30, 2017 |
Apr. 30, 2016 |
|
| Stock-based awards, additional disclosure | ||||
| Deduction in income tax due to exercise of options and vesting of restricted stock (in dollars) | $ 5,520,000 | $ 3,297,000 | ||
| Income tax deductions previously recorded in income tax expense over the equity awards’ vesting period | 3,329,000 | 1,711,000 | ||
| Increase in additional paid-in capital due to excess tax benefit on stock-based compensation expense | 1,586,000 | |||
| Reduction of income tax expense | $ 797,000 | $ 2,071,000 | ||
| New Accounting Pronouncement, Early Adoption, Effect | ASU 2016-09 Share-Based Payment Accounting | ||||
| Stock-based awards, additional disclosure | ||||
| Reduction of income tax expense | $ (95,000) | $ 2,191,000 | ||