CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
6 Months Ended
Jan. 31, 2016
Jan. 31, 2015
Cash flows from operating activities    
Net income $ 29,643,000 $ 22,324,000
Adjustments to reconcile net income to net cash provided by operating activities:    
Depreciation 5,693,000 4,853,000
Amortization 6,391,000 6,188,000
Stock-based compensation expense 3,595,000 3,001,000
Amortization of debt issuance costs 201,000 200,000
Loss on disposal of fixed assets 111,000 37,000
Fair value adjustments to acquisition related liabilities (571,000) 274,000
Deferred income taxes 688,000 676,000
Excess tax benefits from stock-based compensation (1,541,000) (2,463,000)
Changes in assets and liabilities, net of assets acquired and liabilities assumed:    
Accounts receivable (3,021,000) 319,000
Inventories (4,251,000) (3,115,000)
Prepaid expenses and other current assets (5,034,000) (3,822,000)
Accounts payable and other current liabilities (1,681,000) (9,737,000)
Income taxes (1,952,000) 103,000
Net cash provided by operating activities 28,271,000 18,838,000
Cash flows from investing activities    
Capital expenditures (7,635,000) (5,272,000)
Proceeds from disposal of fixed assets 35,000 34,000
Acquisitions of businesses, net of cash acquired (81,104,000) (33,359,000)
Other, net 212,000 746,000
Net cash used in investing activities (88,492,000) (37,851,000)
Cash flows from financing activities    
Borrowings under revolving credit facility 83,000,000 37,000,000
Repayments under revolving credit facility (28,000,000) (22,000,000)
Proceeds from exercises of stock options   323,000
Dividends paid (2,502,000) (2,076,000)
Excess tax benefits from stock-based compensation 1,541,000 2,463,000
Purchases of treasury stock (3,432,000) (3,424,000)
Net cash provided by financing activities 50,607,000 12,286,000
Effect of exchange rate changes on cash and cash equivalents (502,000) (962,000)
Decrease in cash and cash equivalents (10,116,000) (7,689,000)
Cash and cash equivalents at beginning of period 31,720,000 31,781,000
Cash and cash equivalents at end of period $ 21,604,000 $ 24,092,000