Revenue from Contracts with Customers (Tables)
   | 
12 Months Ended | 
Dec. 31, 2018  | 
| Revenue from Contract with Customer [Abstract] | 
 
 | 
| Summary of Impact of Adoption to our Condensed Consolidated Statements of Income and Balance Sheets | 
The Company recorded a net decrease to beginning retained earnings of $4,454 on January 1, 2018 due to the cumulative impact of adopting Topic 606, as detailed below. 
 
  
 |  
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
   | 
January 1, 2018  | 
 
   | 
As Reported  | 
   | 
606 Adjustments  | 
   | 
Adjusted Balances  | 
   | 
 
Assets:  | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
 
Costs and estimated earnings in excess of billings  | 
   | 
104,852  | 
 
  | 
   | 
   | 
$  | 
(9,194  | 
)  | 
   | 
   | 
$  | 
95,658  | 
 
  | 
   | 
 
Prepaid expenses and other current assets  | 
   | 
14,037  | 
 
  | 
   | 
   | 
4,343  | 
 
  | 
   | 
   | 
18,380  | 
 
  | 
   | 
 
Deferred income taxes, net  | 
   | 
—  | 
 
  | 
   | 
   | 
1,003  | 
 
  | 
   | 
   | 
1,003  | 
 
  | 
   | 
 
Liabilities:  | 
   | 
 
  | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
 
| 
 Accrued expenses and other current liabilities 
  
 | 
   | 
23,260  | 
 
  | 
   | 
   | 
1,190  | 
 
  | 
   | 
   | 
24,450  | 
 
  | 
   | 
 
Deferred income taxes, net  | 
   | 
584  | 
 
  | 
   | 
   | 
(584  | 
)  | 
   | 
   | 
—  | 
 
  | 
   | 
 
Shareholders' Equity:  | 
   | 
 
  | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
 
Retained earnings  | 
   | 
235,844  | 
 
  | 
   | 
   | 
(4,454  | 
)  | 
   | 
   | 
231,390  | 
 
  | 
   | 
 
  
In accordance with Topic 606, the disclosure of the impact of adoption to the Company’s consolidated statements of income (loss) and balance sheets was as follows: 
  
 |  
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
   | 
   | 
Impact of changes in accounting policies  | 
 
   | 
   | 
12/31/2018  | 
 
   | 
   | 
As Reported  | 
   | 
Balances without adoption of Topic 606  | 
   | 
Effect of Change Higher/(Lower)  | 
 
Revenues  | 
   | 
$  | 
787,138  | 
 
  | 
   | 
$  | 
784,316  | 
 
  | 
   | 
$  | 
2,822  | 
 
  | 
 
Cost of revenues  | 
   | 
613,526  | 
 
  | 
   | 
610,229  | 
 
  | 
   | 
3,297  | 
 
  | 
 
Gross profit  | 
   | 
173,612  | 
 
  | 
   | 
174,087  | 
 
  | 
   | 
(475  | 
)  | 
 
Operating expenses:  | 
   | 
   | 
   | 
   | 
   | 
   | 
 
Selling, general and administrative expenses  | 
   | 
114,513  | 
 
  | 
   | 
114,513  | 
 
  | 
   | 
—  | 
 
  | 
 
Operating income  | 
   | 
59,099  | 
 
  | 
   | 
59,574  | 
 
  | 
   | 
(475  | 
)  | 
 
Other expenses, net  | 
   | 
16,709  | 
 
  | 
   | 
16,709  | 
 
  | 
   | 
—  | 
 
  | 
 
Income before provision for income taxes  | 
   | 
42,390  | 
 
  | 
   | 
42,865  | 
 
  | 
   | 
(475  | 
)  | 
 
Income tax provision  | 
   | 
4,813  | 
 
  | 
   | 
4,998  | 
 
  | 
   | 
(185  | 
)  | 
 
Net income  | 
   | 
37,577  | 
 
  | 
   | 
37,867  | 
 
  | 
   | 
(290  | 
)  | 
 
Net income attributable to redeemable non-controlling interests  | 
   | 
407  | 
 
  | 
   | 
407  | 
 
  | 
   | 
—  | 
 
  | 
 
Net income attributable to common shareholders  | 
   | 
$  | 
37,984  | 
 
  | 
   | 
$  | 
38,274  | 
 
  | 
   | 
$  | 
(290  | 
)  | 
 
Basic income per share  | 
   | 
$  | 
0.83  | 
 
  | 
   | 
$  | 
0.84  | 
 
  | 
   | 
$  | 
(0.01  | 
)  | 
 
Diluted income per share  | 
   | 
$  | 
0.81  | 
 
  | 
   | 
$  | 
0.82  | 
 
  | 
   | 
$  | 
(0.01  | 
)  | 
 
  
 |  
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
   | 
December 31, 2018  | 
 
   | 
   | 
As Reported  | 
   | 
Balances without adoption of Topic 606  | 
   | 
Effect of Change Higher/(Lower)  | 
 
Assets:  | 
   | 
   | 
   | 
   | 
   | 
   | 
 
Costs and estimated earnings in excess of billings  | 
   | 
$  | 
86,842  | 
 
  | 
   | 
$  | 
93,214  | 
 
  | 
   | 
$  | 
(6,372  | 
)  | 
 
Prepaid expenses and other current assets  | 
   | 
11,571  | 
 
  | 
   | 
10,644  | 
 
  | 
   | 
927  | 
 
  | 
 
Liabilities:  | 
   | 
 
  | 
   | 
   | 
   | 
   | 
 
| 
 Accrued expenses and other current liabilities 
  
 | 
   | 
35,947  | 
 
  | 
   | 
34,877  | 
 
  | 
   | 
1,070  | 
 
  | 
 
Deferred income taxes, net  | 
   | 
4,352  | 
 
  | 
   | 
6,123  | 
 
  | 
   | 
(1,771  | 
)  | 
 
Shareholders' Equity:  | 
   | 
 
  | 
   | 
   | 
   | 
   | 
 
Retained earnings  | 
   | 
269,806  | 
 
  | 
   | 
274,550  | 
 
  | 
   | 
(4,744  | 
)  | 
 
  
 
 | 
| Summary of Disaggregation of Revenue | 
The following table provides information about disaggregated revenue by line of business, reportable segments, and geographical region for the year ended December 31, 2018. 
 
 |  
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
   | 
US Regions  | 
   | 
U.S. Federal  | 
   | 
Canada  | 
   | 
Non-Solar DG  | 
   | 
All Other  | 
   | 
Total  | 
 
Line of Business  |  
Year ended December 31, 2018  |  
Project revenue  | 
$  | 
296,226  | 
 
  | 
   | 
$  | 
202,286  | 
 
  | 
   | 
$  | 
29,571  | 
 
  | 
   | 
$  | 
4,550  | 
 
  | 
   | 
$  | 
12,420  | 
 
  | 
   | 
$  | 
545,053  | 
 
  | 
 
O&M revenue  | 
17,814  | 
 
  | 
   | 
39,250  | 
 
  | 
   | 
37  | 
 
  | 
   | 
8,135  | 
 
  | 
   | 
—  | 
 
  | 
   | 
65,236  | 
 
  | 
 
Energy assets  | 
18,442  | 
 
  | 
   | 
4,062  | 
 
  | 
   | 
2,604  | 
 
  | 
   | 
69,599  | 
 
  | 
   | 
1,069  | 
 
  | 
   | 
95,776  | 
 
  | 
 
Other  | 
1,862  | 
 
  | 
   | 
711  | 
 
  | 
   | 
6,770  | 
 
  | 
   | 
371  | 
 
  | 
   | 
71,359  | 
 
  | 
   | 
81,073  | 
 
  | 
 
Total revenues  | 
$  | 
334,344  | 
 
  | 
   | 
$  | 
246,309  | 
 
  | 
   | 
$  | 
38,982  | 
 
  | 
   | 
$  | 
82,655  | 
 
  | 
   | 
$  | 
84,848  | 
 
  | 
   | 
$  | 
787,138  | 
 
  | 
 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
   | 
 
| 
 Geographical Regions 
  
 |  
Year ended December 31, 2018  |  
United States  | 
$  | 
334,344  | 
 
  | 
   | 
$  | 
246,309  | 
 
  | 
   | 
$  | 
2,557  | 
 
  | 
   | 
$  | 
82,655  | 
 
  | 
   | 
$  | 
68,883  | 
 
  | 
   | 
$  | 
734,748  | 
 
  | 
 
Canada  | 
—  | 
 
  | 
   | 
—  | 
 
  | 
   | 
36,425  | 
 
  | 
   | 
—  | 
 
  | 
   | 
303  | 
 
  | 
   | 
36,728  | 
 
  | 
 
Other  | 
—  | 
 
  | 
   | 
—  | 
 
  | 
   | 
—  | 
 
  | 
   | 
—  | 
 
  | 
   | 
15,662  | 
 
  | 
   | 
15,662  | 
 
  | 
 
Total revenues  | 
$  | 
334,344  | 
 
  | 
   | 
$  | 
246,309  | 
 
  | 
   | 
$  | 
38,982  | 
 
  | 
   | 
$  | 
82,655  | 
 
  | 
   | 
$  | 
84,848  | 
 
  | 
   | 
$  | 
787,138  | 
 
  | 
 
  
 
 | 
| Summary of Contract Balances | 
The following table provides information about receivables, contract assets and contract liabilities from contracts with customers: 
 |  
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 
   | 
   | 
January 1, 2018  | 
   | 
December 31, 2018  | 
   | 
 
Accounts receivable, net  | 
   | 
$  | 
85,121  | 
 
  | 
   | 
$  | 
85,985  | 
 
  | 
   | 
 
Accounts receivable retainage, net  | 
   | 
17,484  | 
 
  | 
   | 
13,516  | 
 
  | 
   | 
 
Contract Assets:  | 
   | 
   | 
   | 
   | 
   | 
 
Costs and estimated earnings in excess of billings  | 
   | 
95,658  | 
 
  | 
   | 
86,842  | 
 
  | 
   | 
 
Contract Liabilities:  | 
   | 
   | 
   | 
   | 
   | 
 
Billings in excess of cost and estimated earnings  | 
   | 
27,248  | 
 
  | 
   | 
30,706  | 
 
  | 
   | 
 
  
 
 |