XML 45 R46.htm IDEA: XBRL DOCUMENT v3.19.3.a.u2
LEASES - Additional Information (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jan. 31, 2020
Jan. 31, 2019
Jan. 31, 2020
Jan. 31, 2019
Lessee, Lease, Description [Line Items]        
Weighted average remaining lease term (in years) 4 years 3 months 18 days   4 years 3 months 18 days  
Operating lease, cost $ 10,200   $ 18,900  
Operating leases, expense under topic 840   $ 8,400   $ 15,700
Impairment loss 3,000   3,002 $ 0
Right-of-use asset, impairment loss 1,800      
Impairment of leasehold 1,200      
Lease not yet commenced, undiscounted amount $ 4,900   $ 4,900  
Minimum        
Lessee, Lease, Description [Line Items]        
Weighted average remaining lease term (in years) 1 year   1 year  
Lease not yet commenced, term of contract 2 years   2 years  
Maximum        
Lessee, Lease, Description [Line Items]        
Weighted average remaining lease term (in years) 9 years   9 years  
Lease not yet commenced, term of contract 5 years   5 years