Current report filing

NOTES PAYABLE (Details 1)

v3.19.2
NOTES PAYABLE (Details 1)
$ / shares in Units, $ in Thousands
6 Months Ended 12 Months Ended
Jun. 30, 2019
USD ($)
Equity_Instrument
$ / shares
Dec. 31, 2018
USD ($)
Equity_Instrument
$ / shares
Principal Outstanding $ 52,427 $ 55,172
Discount Amount 11,594 16,933
Carrying Amount $ 40,833 $ 38,239
Shares Underlying Notes | Equity_Instrument 6,274 6,499
Convertible notes payable, Current $ 13,867 $ 11,253
Convertible notes payable, Non Current $ 450 5,485
Minimum [Member]    
Conversion Price | $ / shares $ 3.05  
Maximum [Member]    
Conversion Price | $ / shares $ 10.00  
2011 Convertible notes payable [Member]    
Interest rate 10.00%  
Term of Notes 5 years  
Conversion Price | $ / shares $ 3.05  
Principal Outstanding   300
Carrying Amount   $ 300
Shares Underlying Notes | Equity_Instrument   98
2014 Convertible notes payable [Member]    
Interest rate 10.00%  
Principal Outstanding $ 538 $ 519
Carrying Amount $ 538 $ 519
Shares Underlying Notes | Equity_Instrument 192 184
2014 Convertible notes payable [Member] | Minimum [Member]    
Term of Notes Due on demand  
Conversion Price | $ / shares $ 3.05  
2014 Convertible notes payable [Member] | Maximum [Member]    
Term of Notes 2 years  
Conversion Price | $ / shares $ 3.60  
2016 Convertible Notes Payable [Member]    
Interest rate 10.00%  
Term of Notes 1 year  
Conversion Price | $ / shares $ 4.50  
Principal Outstanding $ 62 $ 61
Carrying Amount $ 62 $ 61
Shares Underlying Notes | Equity_Instrument 17 17
2017 Convertible notes payable [Member]    
Interest rate 10.00%  
Principal Outstanding $ 1,568 $ 2,820
Discount Amount 8 349
Carrying Amount $ 1,560 $ 2,471
Shares Underlying Notes | Equity_Instrument 516 899
2017 Convertible notes payable [Member] | Minimum [Member]    
Term of Notes Due on demand  
Conversion Price | $ / shares $ 3.50  
2017 Convertible notes payable [Member] | Maximum [Member]    
Term of Notes 1 year  
Conversion Price | $ / shares $ 4.50  
2018 Convertible Notes Payable [Member]    
Interest rate 10.00%  
Principal Outstanding $ 9,860 $ 19,556
Discount Amount 1,363 6,169
Carrying Amount $ 8,497 $ 13,387
Shares Underlying Notes | Equity_Instrument 1,656 3,664
2018 Convertible Notes Payable [Member] | Minimum [Member]    
Interest rate 6.00%  
Term of Notes 9 months  
Term of Notes Due on demand  
Conversion Price | $ / shares $ 3.60 $ 3.50
2018 Convertible Notes Payable [Member] | Maximum [Member]    
Interest rate 10.00%  
Term of Notes 2 years  
Conversion Price | $ / shares $ 10.00  
2019 Convertible Notes Payable [Member]    
Interest rate 10.00%  
Principal Outstanding $ 8,210  
Discount Amount 4,550  
Carrying Amount $ 3,660  
Shares Underlying Notes | Equity_Instrument 2,193  
2019 Convertible Notes Payable [Member] | Minimum [Member]    
Term of Notes Due on demand  
Conversion Price | $ / shares $ 3.50  
2019 Convertible Notes Payable [Member] | Maximum [Member]    
Term of Notes 1 year  
Conversion Price | $ / shares $ 7.60  
Convertible Notes Payable [Member]    
Principal Outstanding $ 20,238 $ 23,256
Discount Amount 5,921 6,518
Carrying Amount $ 14,317 $ 16,738
Shares Underlying Notes | Equity_Instrument 4,574 4,862
Principal Outstanding, Current $ 20,092 $ 16,604
Principal Outstanding, Non Current 146 6,652
Discount Amount Current 5,814 5,351
Discount Amount Non Current 107 1,167
Convertible notes payable, Current 14,278 11,253
Convertible notes payable, Non Current $ 39 $ 5,485
Shares Underlying Notes Current | Equity_Instrument 4,532 3,981
Shares Underlying Notes Non Current | Equity_Instrument 42 881
2012 Convertible notes payable - related party [Member]    
Interest rate 10.00%  
Term of Notes Due on demand  
Conversion Price | $ / shares $ 3.30  
Principal Outstanding $ 200 $ 200
Carrying Amount $ 200 $ 200
Shares Underlying Notes | Equity_Instrument 64 74
2015 Convertible notes payable - related party [Member]    
Interest rate 10.00%  
Term of Notes 2 years  
Conversion Price | $ / shares $ 4.50  
Principal Outstanding $ 200 $ 200
Carrying Amount $ 200 $ 200
Shares Underlying Notes | Equity_Instrument 61 58
2017 Convertible notes payable - related party [Member]    
Interest rate 10.00%  
Term of Notes 2 years  
Conversion Price | $ / shares $ 10.00  
Principal Outstanding $ 5,000 $ 5,000
Discount Amount 123 311
Carrying Amount $ 4,877 $ 4,689
Shares Underlying Notes | Equity_Instrument 557 533
2018 Convertible notes payable - related party [Member]    
Interest rate 10.00%  
Term of Notes 2 years  
Conversion Price | $ / shares $ 10.00  
Principal Outstanding $ 9,400 $ 9,400
Discount Amount 497 871
Carrying Amount $ 8,903 $ 8,529
Shares Underlying Notes | Equity_Instrument 1,018 972
Convertible notes payable - related party [Member]    
Principal Outstanding $ 14,800 $ 14,800
Discount Amount 620 1,182
Carrying Amount $ 14,180 $ 13,618
Shares Underlying Notes | Equity_Instrument 1,700 1,637
Principal Outstanding, Current $ 14,800 $ 5,400
Principal Outstanding, Non Current   9,400
Discount Amount Current 620 311
Discount Amount Non Current   871
Convertible notes payable, Current $ 14,180 5,089
Convertible notes payable, Non Current   $ 8,529
Shares Underlying Notes Current | Equity_Instrument 1,700 665
Shares Underlying Notes Non Current | Equity_Instrument   972