Derivatives (Details) - Foreign currency forward contracts - Designated as hedging instrument - Fair value hedge instruments
3 Months Ended 6 Months Ended
Jan. 31, 2016
USD ($)
contract
Jan. 31, 2015
USD ($)
Jan. 31, 2016
USD ($)
contract
Jan. 31, 2015
USD ($)
Derivatives        
Term of contracts     1 month  
Number of contracts | contract 5   5  
Aggregate value of contracts $ 12,783,000   $ 12,783,000  
Term of renewed contracts     1 month  
Net currency conversion gains (losses), net of tax $ (214,000) $ 15,000 $ (306,000) $ (49,000)