STOCK BASED COMPENSATION (Summary of Excess Tax Benefit (Deficiency) on Stock-based Compensation) (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
---|---|---|---|
Aug. 31, 2023 |
Aug. 31, 2022 |
Aug. 31, 2021 |
|
Share-Based Payment Arrangement [Abstract] | |||
Excess tax benefit (deficiency) on stock-based compensation (in thousands) | $ (2,787) | $ (2,259) | $ (778) |