INCOME TAXES - Schedule of Components of Total Unrecognized Tax Benefits (Details) - USD ($) $ in Thousands |
Jul. 31, 2024 |
Jul. 31, 2023 |
Jul. 31, 2022 |
Jul. 31, 2021 |
|---|---|---|---|---|
| Income Tax Disclosure [Abstract] | ||||
| Unrecognized tax benefits | $ 10,434 | $ 13,712 | $ 17,998 | $ 17,025 |
| Reduction to unrecognized tax benefits which offset tax credit carryforwards | (605) | (414) | ||
| Accrued interest and penalties | 2,576 | 2,694 | ||
| Total unrecognized tax benefits | 12,405 | 15,992 | ||
| Short-term, included in “Income and other taxes” | 0 | 1,157 | ||
| Long-term | $ 12,405 | $ 14,835 |