Consolidated Statements of Comprehensive Income - USD ($) $ in Thousands |
3 Months Ended | 9 Months Ended | ||
|---|---|---|---|---|
Apr. 30, 2017 |
Apr. 30, 2016 |
Apr. 30, 2017 |
Apr. 30, 2016 |
|
| Statement Of Income And Comprehensive Income [Abstract] | ||||
| Net (loss) income | $ (59,664) | $ 4,970 | $ (49,618) | $ 3,361 |
| Other comprehensive income (loss), net of tax: | ||||
| Foreign currency translation adjustment, net of tax | 178 | 3,551 | (2,415) | 303 |
| Unrecognized gain on pension benefits, net of tax | 58 | 26 | 167 | 76 |
| Unrealized (loss) gain on foreign currency forward contracts, net of tax | (324) | 373 | (153) | 358 |
| Total other comprehensive (loss) income, net of tax | (88) | 3,950 | (2,401) | 737 |
| Total comprehensive (loss) income | $ (59,752) | $ 8,920 | $ (52,019) | $ 4,098 |