INCOME TAX (Details 3) - USD ($)
$ in Thousands
Jun. 30, 2018
Jun. 30, 2017
Deferred tax assets, current    
Allowance for doubtful accounts   $ 9,172
Inventory provision   179
Provision for contract loss   694
Long-term assets   13
Deferred revenue   3,220
Deferred subsidies   1,654
Warranty liabilities   829
Recognition of intangible assets   (2)
Accrued payroll   998
Net operating loss carry forward   9,801
Valuation allowance   (10,160)
Total deferred tax assets, current   16,398
Deferred tax liabilities, current    
Costs and estimated earnings in excess of billings   (10,071)
Recognition of intangible assets   0
PRC dividend withholding tax   (2,949)
Others   2
Total deferred tax liabilities, current   (13,018)
Net deferred tax assets, current $ 0 7,730
Net deferred tax liabilities, current 0 (4,350)
Deferred tax assets, non-current    
Long-term assets   112
Deferred subsidies   333
Net operating loss carryforward   1,573
Warranty liabilities   332
Others   192
Total deferred tax assets, non-current   2,542
Deferred tax liabilities, non-current    
Share of net gains of equity investees   (2,520)
Property, plant and equipment   (38)
Intangible assets and other non-current assets   (5,552)
Total deferred tax liabilities, non-current   (8,110)
Net deferred tax assets-non-current 8,318 1,121
Net deferred tax liabilities-non-current (9,366) $ (6,689)
Deferred tax assets    
Allowance for doubtful accounts 9,600  
Costs and estimated earnings in excess of billings (8,544)  
Deferred revenue 3,562  
Deferred subsidies 1,809  
Warranty liabilities 882  
Accrued payroll 1,029  
Net operating loss carry forward 12,739  
Long-term assets 296  
Warranty liabilities 324  
Share of net gains(loss) of equity investees (2,038)  
Inventory provision 713  
Provision for contract loss 70  
Recognition of intangible assets 11  
Others 387  
Long-term assets 0  
Valuation allowance (12,522)  
Total deferred tax assets-non-current 8,318  
Deferred tax liabilities    
Withholding tax on capital repayment (3,019)  
Intangible assets and other non-current assets (6,327)  
Property, plant and equipment (20)  
Total deferred tax assets, non-current $ (9,366)