| | | | | | | | |
| | Six Months Ended June 30, | |
| | 2018 | | | 2017 | |
Cash flows from operating activities: | | | | | | | | |
Net earnings | | $ | 84,224 | | | $ | 54,103 | |
Adjustments to reconcile net earnings to net cash provided by (used in) operating activities: | | | | | | | | |
Depreciation and amortization of property and equipment | | | 10,712 | | | | 12,729 | |
Amortization of intangible assets | | | 7,214 | | | | 8,433 | |
Provision for losses on accounts receivable | | | 1,336 | | | | 2,225 | |
Write-downs of inventories | | | 1,396 | | | | 1,077 | |
Write-off of property and equipment | | | 309 | | | | — | |
Non-cash stock-based compensation | | | 7,047 | | | | 6,749 | |
Deferred income taxes | | | 2,020 | | | | (25 | ) |
Changes in assets and liabilities: | | | | | | | | |
Increase in accounts receivable | | | (283,930 | ) | | | (230,762 | ) |
Decrease (increase) in inventories | | | 18,281 | | | | (54,276 | ) |
Decrease (increase) in other assets | | | 13,714 | | | | (64,875 | ) |
Increase in accounts payable | | | 450,471 | | | | 163,451 | |
Increase in deferred revenue | | | 13,733 | | | | 4,944 | |
Increase (decrease) in accrued expenses and other liabilities | | | 24,428 | | | | (3,039 | ) |
| | | | | | | | |
Net cash provided by (used in) operating activities | | | 350,955 | | | | (99,266 | ) |
| | | | | | | | |
Cash flows from investing activities: | | | | | | | | |
Purchases of property and equipment | | | (10,644 | ) | | | (10,274 | ) |
Acquisitions, net of cash and cash equivalents acquired | | | — | | | | (180,894 | ) |
| | | | | | | | |
Net cash used in investing activities | | | (10,644 | ) | | | (191,168 | ) |
| | | | | | | | |
Cash flows from financing activities: | | | | | | | | |
Borrowings on senior revolving credit facility | | | 280,184 | | | | 386,609 | |
Repayments on senior revolving credit facility | | | (397,684 | ) | | | (386,609 | ) |
Borrowings on accounts receivable securitization financing facility | | | 1,696,500 | | | | 1,802,889 | |
Repayments on accounts receivable securitization financing facility | | | (1,721,500 | ) | | | (1,718,389 | ) |
Borrowings under Term Loan A | | | — | | | | 175,000 | |
Repayments under Term Loan A | | | (6,563 | ) | | | (4,375 | ) |
Repayments under other financing agreements | | | (1,835 | ) | | | (3,957 | ) |
Payments on capital lease obligations | | | (580 | ) | | | (255 | ) |
Net (repayments) borrowings under inventory financing facility | | | (15,766 | ) | | | 25,470 | |
Payment of debt issuance costs | | | (270 | ) | | | (1,123 | ) |
Payment of payroll taxes on stock-based compensation through shares withheld | | | (2,925 | ) | | | (4,548 | ) |
Repurchases of common stock | | | (22,069 | ) | | | — | |
| | | | | | | | |
Net cash (used in) provided by financing activities | | | (192,508 | ) | | | 270,712 | |
| | | | | | | | |
Foreign currency exchange effect on cash, cash equivalents and restricted cash balances | | | (5,541 | ) | | | 11,739 | |
| | | | | | | | |
Increase (decrease) in cash, cash equivalents and restricted cash | | | 142,262 | | | | (7,983 | ) |
Cash, cash equivalents and restricted cash at beginning of period | | | 107,445 | | | | 205,946 | |
| | | | | | | | |
Cash, cash equivalents and restricted cash at end of period | | $ | 249,707 | | | $ | 197,963 | |
| | | | | | | | |