Basis of Preparation and Summary of Significant Accounting Policies | BASIS OF PREPARATION AND SUMMARY OF SIGNIFICANT ACCOUNTING POLICIES Business Oclaro, Inc., a Delaware corporation, is sometimes referred to in this Annual Report on Form 10-K as “Oclaro,” “we,” “us,” or “our.” During our fiscal year 2018, we were one of the leading providers of optical components and modules for the long-haul, metro and data center markets. Leveraging more than three decades of laser technology innovation and photonics integration, we provide differentiated solutions for optical networks and high-speed interconnects driving the next wave of streaming video, cloud computing, application virtualization and other bandwidth-intensive and high-speed applications. Basis of Preparation The consolidated financial statements include the accounts of Oclaro and our subsidiaries. All significant intercompany accounts and transactions have been eliminated in consolidation. The consolidated financial statements have been prepared in accordance with accounting principles generally accepted in the United States of America ("GAAP"). Merger On March 11, 2018, Lumentum Holdings Inc., a Delaware corporation (“Lumentum”), Oclaro, Prota Merger Sub, Inc., a Delaware corporation and a wholly owned subsidiary of Lumentum (“Merger Sub”), and Prota Merger, LLC, a Delaware limited liability company and a wholly owned subsidiary of Lumentum (“Merger Sub LLC”), entered into an Agreement and Plan of Merger (the “Merger Agreement”). Pursuant to the terms of the Merger Agreement, the acquisition of Oclaro will be accomplished through a merger of Merger Sub with and into Oclaro (the “First Step Merger”) with Oclaro surviving the First Step Merger. As soon as reasonably practicable following the First Step Merger, Oclaro will merge with and into Merger Sub LLC with Merger Sub LLC continuing as the surviving entity and a wholly owned subsidiary of Lumentum (the “Second Step Merger,” and taken together with the First Step Merger, the “Merger”). Pursuant to the terms of the Merger Agreement, and subject to the terms and conditions set forth therein, at the effective time of the First Step Merger (the “Effective Time”), each share of the common stock of Oclaro (the “Oclaro Common Stock”) issued and outstanding immediately prior to the Effective Time (other than (x) shares of Oclaro Common Stock owned by Lumentum, Oclaro, or any direct or indirect wholly owned subsidiary of Lumentum or Oclaro or (y) shares of Oclaro Common Stock owned by stockholders who have properly exercised and perfected appraisal rights under Delaware law, in each case immediately prior to the Effective Time, will be cancelled and extinguished and automatically converted into the right to receive the following consideration (collectively, the “Merger Consideration”): (A) $5.60 in cash, without interest (the “Cash Consideration”), plus (B) 0.0636 of a validly issued, fully paid and nonassessable share of the common stock of Lumentum, par value $0.001 per share (“Lumentum Common Stock”) (such ratio, the “Exchange Ratio”). With regard to the Merger Consideration, if the aggregate number of shares of Lumentum Common Stock to be issued in connection with the Merger (including all Lumentum Common Stock which may be issued in the future pursuant to the conversion of Oclaro Options, Oclaro Restricted Stock Units, or Oclaro Restricted Stock (as defined below) would exceed 19.9 percent of the Lumentum Common Stock issued and outstanding immediately prior to the Effective Time (the “Stock Threshold”), (A) the Exchange Ratio will be reduced to the minimum extent necessary (rounded down to the nearest one thousandth) such that the aggregate number of shares of Lumentum Common Stock to be issued in connection with the Merger (including all shares of Lumentum Common Stock which may be issued after the Effective Time pursuant to company compensatory awards) does not exceed the Stock Threshold and (B) the Cash Consideration for all purposes will be increased on a per share basis by an amount equal to $68.975 , multiplied by the difference between the initial Exchange Ratio and the Exchange Ratio. Each Oclaro restricted stock unit award (an “Oclaro RSU”) that does not become vested at the closing will be converted into a Lumentum restricted stock unit award (a “Lumentum RSU”) with the same terms and conditions, including vesting, that were applicable to such Oclaro RSU, except that the number of Lumentum shares subject to the Lumentum RSU will equal the product of (i) the number of Oclaro shares subject to such Oclaro RSU (with any performance milestones deemed achieved based on the maximum level of achievement) multiplied by (ii) the sum of (A) the Exchange Ratio plus (B) the quotient obtained by dividing the Cash Consideration by Lumentum’s average closing price of the 10 trading days ending on the third trading day prior to the closing (such sum, the “Equity Award Exchange Ratio”), rounded down to the nearest whole share. Each Oclaro stock option (an “Oclaro Option”), whether vested or unvested, will be converted into a Lumentum stock option (a “Lumentum Option”) with the same terms and conditions, including vesting, that were applicable to such Oclaro Option, except that (i) the number of shares subject to the Lumentum Option will equal the product of (A) the number of Oclaro shares subject to such Oclaro Option multiplied by (B) the Equity Award Exchange Ratio, rounded down to the nearest whole share and (ii) the exercise price of the Lumentum Option will equal (A) the exercise price per share of the Oclaro Option divided by (B) the Equity Award Exchange Ratio, rounded up to the nearest whole cent. Notwithstanding the foregoing, any Oclaro Option that is held by an individual who is not an Oclaro employee as of immediately prior to the closing will be canceled and converted into the Merger Consideration for each net option share covered by such Oclaro Option, subject to applicable withholding taxes. In addition, each Oclaro restricted stock award (“Oclaro Restricted Stock Award”) and Oclaro RSU that becomes vested as of immediately prior to the closing (including each Oclaro Restricted Stock Award held by a non-employee director) will be converted into the right to receive the Merger Consideration in respect of each Oclaro share underlying such award, subject to applicable withholding taxes. Each Oclaro stock appreciation right (“Oclaro SAR”) will be canceled and converted into the right to receive a cash amount equal to the product of (i) the number of Oclaro shares subject to the Oclaro SAR multiplied by (ii) the positive difference of (A) the cash equivalent value of the Merger Consideration less (B) the strike price of the Oclaro SAR, subject to applicable withholding taxes. If Lumentum determines that the treatment of Oclaro equity awards described above would violate, in respect of the holder thereof, the applicable laws of a non-U.S. jurisdiction, Lumentum may treat such Oclaro equity award in a different manner so long as such treatment is no less favorable to the holder of such Oclaro equity award. The Boards of Directors of Lumentum and Oclaro have unanimously approved the Merger and the Merger Agreement. The transaction is subject to customary closing conditions, including the absence of certain legal impediments, the expiration or termination of the required waiting periods under the Hart-Scott-Rodino Antitrust Improvements Act of 1976, as amended (the "HSR Act") and under applicable anti-trust laws in China, the effectiveness of a registration statement on Form S-4 registering the shares of Lumentum common stock to be issued in connection with the Merger, and approval of the Merger Agreement by the holders of a majority of the outstanding shares of Oclaro Common Stock. The transaction is not subject to any financing condition. On April 4, 2018, the U.S. Federal Trade Commission granted early termination of the waiting period under the HSR Act. On July 10, 2018, Oclaro's stockholders approved the Merger Agreement. The Merger Agreement contains customary representations, warranties and covenants of Lumentum, Oclaro, Merger Sub and Merger Sub LLC, including, (i) covenants by Oclaro concerning the conduct of its business in the ordinary course consistent with past practice during the interim period between the execution of the Merger Agreement and the consummation of the Merger, (ii) covenants by Lumentum concerning the conduct of its business in the ordinary course consistent with past practice during the interim period between the execution of the Merger Agreement and the consummation of the Merger, (iii) a covenant by Oclaro that, subject to certain exceptions, the Board of Directors of Oclaro will recommend to its shareholders adoption of the Merger Agreement, and (iv) a covenant that Oclaro will not solicit, initiate, or knowingly encourage, facilitate or induce the making of inquiry, offer or proposal that would reasonably be expected to lead to any Acquisition Proposal (as defined in the Merger Agreement). Further, the Merger Agreement prohibits us from paying dividends. The Merger Agreement contains certain termination rights for both Lumentum and Oclaro and further provides that upon termination of the Merger Agreement under specified circumstances (including termination by Oclaro to accept a superior proposal), Oclaro may be required to pay Lumentum a termination fee of $63 million . The Merger Agreement further provides that upon termination of the Merger Agreement under specified circumstances relating to failure to obtain regulatory approvals, Lumentum may be required to pay Oclaro a termination fee of $80 million . During the year ended June 30, 2018, we recorded acquisition-related costs of $4.3 million in restructuring, acquisition and related (income) expense, net, within our consolidated statements of operations. Termination of Denial Order and Reinstitution of ZTE's Export Privileges On April 16, 2018, the U.S. Department of Commerce ("DOC") changed and reactivated its previously suspended denial order and suspended the export privileges of Zhongxing Telecommunications Equipment Corporation ("ZTE Corporation") and its subsidiary, ZTE Kangxun Telecommunications Ltd. ("ZTE Kangxun") (collectively, "ZTE") after determining that ZTE made false statements to the DOC related to senior employee disciplinary actions ("Denial Order"). On July 13, 2018, following approval of a settlement agreement between the DOC and ZTE and ZTE's payment of certain amounts to the DOC, the Denial Order was terminated and ZTE was removed from the DOC's Denied Persons List. During the pendency of the Denial Order, ZTE was prohibited from participating in any way in any transaction subject to the Export Administration Regulations ("EAR") and U.S. companies were restricted from exporting or re-exporting to or on behalf of ZTE any item subject to the EAR or engaging in any transaction to service any item subject to the EAR that has been or will be exported from the U.S. and which was owned, possessed or controlled by ZTE. During the pendency of the Denial Order, we ceased shipment of products to ZTE, which has been one of our significant customers. As of June 30, 2018, we have an accounts receivable balance of $0.5 million with ZTE, which we believe to be collectible. During the year ended June 30, 2018, we recorded a $3.1 million charge to write-down on-hand inventory that was designated for future products to be sold to ZTE, that we may no longer be able to use or re-allocate to other customers. Use of Estimates The preparation of financial statements in conformity with GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities, disclosure of contingent assets and liabilities at the date of the financial statements, and the reported amounts of revenue and expenses during the reported periods. Examples of significant estimates and assumptions made by management involve the valuation allowances for deferred tax assets, the fair value of stock-based compensation, the fair value of pension liabilities, estimates for allowances for doubtful accounts and valuation of excess and obsolete inventories. These judgments can be subjective and complex and consequently actual results could differ materially from those estimates and assumptions. Fiscal Years We operate on a 52/53 week year ending on the Saturday closest to June 30 . Our fiscal years ended June 30, 2018 , July 1, 2017 and July 2, 2016 had 52 weeks, 52 weeks and 53 weeks, respectively. Reclassifications For presentation purposes, we have reclassified certain prior period amounts to conform to the current period financial statement presentation, including an adjustment relating to an immaterial error of approximately $8.2 million in fiscal year 2017 and $1.8 million in fiscal year 2016, increasing cash flows from operations associated with changes in accounts payable and increasing cash flows used in investing activities associated with purchases of property and equipment, in our consolidated statement of cash flows for the fiscal years ended July 1, 2017 and July 2, 2016, respectively. We determined that the adjustments did not have a material impact to our prior period consolidated financial statements. The following tables summarize the effect of the reclassification on certain key items of our previously issued consolidated statements of cash flows for the fiscal years ended July 1, 2017 and July 2, 2016: Year Ended July 1, 2017 As Previously Reported As Restated Change Increase (Decrease) (Thousands) % Selected Cash Flow Amounts Changes in operating assets and liabilities: accounts payable 9,643 17,819 8,176 84.8 Net cash provided by operating activities 87,378 95,554 8,176 9.4 Purchases of property and equipment (61,893 ) (70,069 ) (8,176 ) 13.2 Net cash used in investing activities (99,078 ) (107,254 ) (8,176 ) 8.3 Net increase (decrease) in cash and cash equivalents 123,341 123,341 — — Year Ended July 2, 2016 As Previously Reported As Restated Change Increase (Decrease) (Thousands) % Selected Cash Flow Amounts Changes in operating assets and liabilities: accounts payable 9,455 11,293 1,838 19.4 Net cash provided by operating activities 6,267 8,105 1,838 29.3 Purchases of property and equipment (27,750 ) (29,588 ) (1,838 ) 6.6 Net cash used in investing activities (25,332 ) (27,170 ) (1,838 ) 7.3 Net increase (decrease) in cash and cash equivalents (15,911 ) (15,911 ) — — None of these reclassifications affect our consolidated revenues, net income, cash and cash equivalents or stockholders’ equity as previously reported. Functional Currency Effective October 1, 2017, the functional currency for our worldwide operations is the U.S. dollar. Prior to October 1, 2017, the functional currency for each of our foreign subsidiaries was the respective local currency for that subsidiary. The change in our functional currency is a result of significant changes in economic facts and circumstances, including (i) a re-organization of our operating environment, which includes consolidating and integrating our sales, supply chain and manufacturing organizations; (ii) a transition to centrally negotiating worldwide supplier contracts and capital expenditures in U.S. dollars; and (iii) a shift to recording all intercompany transactions in U.S. dollars. Translation adjustments reported prior to October 1, 2017, will remain as a component of accumulated other comprehensive income in our consolidated balance sheet. The translated values for any non-monetary assets and liabilities as of October 1, 2017 become the new accounting basis for those assets. Effective October 1, 2017, monetary assets and liabilities denominated in currencies other than the U.S. dollar functional currency are re-measured each reporting period into U.S. dollars, with the resulting exchange gains and losses reported in gain (loss) on foreign currency transactions, net within our consolidated statement of operations. U.S. Tax Reform On December 22, 2017, the Tax Cuts and Jobs Act ("TCJA"), was signed into law. Among other things, the TCJA permanently lowers the U.S. corporate federal income tax rate to 21 percent from the existing maximum rate of 35 percent , effective for tax years including or commencing January 1, 2018. Since we operate on a 52/53 week year ending on the Saturday closest to June 30, the lower corporate income tax rate will be phased in, resulting in a U.S. statutory federal rate of approximately 28 percent for our fiscal year ending June 30, 2018, and 21 percent for subsequent fiscal years. U.S. GAAP requires companies to re-value their deferred tax assets and deferred tax liabilities for changes in tax rates as of the date of enactment, with the resulting tax effects accounted for in the reporting period of enactment. We have concluded this will cause our net deferred taxes to be re-measured at the new lower tax rate. Before valuation allowance, the rate change impact to our net deferred tax assets is a reduction of $35.0 million . We maintain a full valuation allowance on our U.S. net deferred tax assets. Deferred tax asset re-measurement (tax expense) will be offset by a net decrease in valuation allowance, resulting in no impact on our income tax for the period ending June 30, 2018. Additionally, the TCJA introduces new international tax provisions that will be effective for our fiscal year 2019, including (i) a new provision designed to currently tax the global low-taxed income of our foreign subsidiaries known as GILTI; (ii) limitations on the deductibility of certain base eroding payments to foreign entities; and (iii) limitations on the use of foreign tax credits to reduce U.S. income tax liability. While each of these provisions may have an impact on our tax expense for fiscal year 2019 and future periods, we expect the tax on low-taxed income of foreign subsidiaries to have the most significant impact. Due to the complexity of the provision for the TCJA and the lack of the current guidance, under the guidance of Staff Accounting Bulletin 118, the accounting is incomplete and we have not estimated the GILTI impact on deferred taxes. Additionally, state and local authorities are reviewing federal conformity matters related to GILTI. Provisional amounts or adjustments to provisional amounts identified in the measurement period would be included as an adjustment to tax expense or benefit from continuing operations in the period the amounts are determined. We have determined a reasonable estimate for the tax reform effects other than the impact of GILTI on our recognition of deferred tax assets, and reported the estimates as a provisional amount in our financial statements for which the accounting under ASC Topic 740 is completed. We will finalize the impact of the GILTI in fiscal year 2019. Cash and Cash Equivalents We consider all liquid investment securities with an original maturity date of three months or less to be cash equivalents. Any realized gains and losses on liquid investment securities are included in other income (expense), net in our consolidated statements of operations. The following table provides details regarding our cash and cash equivalents at the dates indicated: June 30, 2018 July 1, 2017 (Thousands) Cash and cash equivalents: Cash-in-bank $ 88,297 $ 79,259 Money market funds 153,392 99,037 Commercial paper 3,999 22,981 Corporate bonds — 2,012 U.S. agency securities — 15,981 $ 245,688 $ 219,270 As of June 30, 2018 , $53.7 million of the $245.7 million of our cash and cash equivalents was held by our foreign subsidiaries. If these funds are needed for our operations in the United States, we could be required to accrue and pay additional taxes to repatriate these funds. Restricted Cash As of June 30, 2018 , we had restricted cash of $0.2 million , which is recorded in other non-current assets, consisting of collateral to secure certain deposits for value-added taxes in foreign jurisdictions. As of July 1, 2017 , we had restricted cash of $1.1 million , including $0.4 million in other non-current assets, consisting of collateral for the performance of our obligations under certain facility lease agreements, collateral to secure certain of our credit card accounts and deposits for value-added taxes in foreign jurisdictions. Short-Term Investments We classify short-term investments, which consist primarily of securities purchased with original maturities at date of purchase of more than three months and less than one year, as “available for sale securities.” These short-term investments are reported at market value, with the aggregate unrealized holding gains and losses reported as a component of accumulated other comprehensive income in stockholders’ equity. All realized gains and losses and unrealized losses resulting from declines in fair value that are other than temporary and not involving credit losses are recorded in the consolidated statements of operations in the period they occur. The following table provides details regarding our short-term investments at the dates indicated: June 30, 2018 July 1, 2017 (Thousands) Short-term investments: Commercial paper $ 41,401 $ 23,459 Corporate bonds 4,100 10,094 U.S. Treasury securities 31,939 4,006 $ 77,440 $ 37,559 Concentration of Credit Risks We place our cash and cash equivalents with and in the custody of financial institutions, which at times, are in excess of amounts insured. Management monitors the ongoing creditworthiness of these institutions. To date, we have not experienced significant losses on these investments. As of June 30, 2018 , $53.7 million of the $245.7 million of our cash and cash equivalents was held by our foreign subsidiaries. Our trade accounts receivable are concentrated with companies in the telecom industry. At June 30, 2018 , two customers accounted for a total of 36 percent of our net accounts receivable, with each individually accounting for more than 10 percent of our net accounts receivable. At July 1, 2017 , one customer accounted for a total of 20 percent of our net accounts receivable. Allowance for Doubtful Accounts We perform ongoing credit evaluations of our customers and record specific allowances for doubtful accounts when a customer is unable to meet its financial obligations, as in the case of bankruptcy filings or deteriorated financial position. Estimates are used in determining allowances for customers based on factors such as current trends, the length of time the receivables are past due and historical collection experience. We write off a receivable account when all rights, remedies and recourses against the account and its principals are exhausted and record a benefit when previously reserved accounts are collected. In fiscal years 2016, 2017 and 2018, we did not record any additional provisions as allowances for doubtful accounts. Inventories Inventories, consisting of raw materials, work-in-process and finished goods are stated at the lower of cost (first in, first out basis) or market. We plan production based on orders received and a forecast demand. These production estimates are dependent on assessment of current and expected orders from our customers, including consideration that orders are subject to cancellation with limited advance notice prior to shipment. We assess the valuation of our inventory, including significant inventories held by contract manufacturers on our behalf, on a quarterly basis. Products may be unsalable because they are technically obsolete due to substitute products, specification changes or excess inventory relative to customer forecasts. We adjust the carrying value of inventory using methods that take these factors into account. If we find that the cost basis of our inventory is greater than the current market value, we write the inventory down to the estimated selling price, less the estimated costs to complete and sell the product. As a result of the Denial Order, during the year ended June 30, 2018, we recorded a $3.1 million charge related to the write-down of on-hand inventory that was designated for future products to be sold to ZTE, which we may no longer be able to use or re-allocate to other customers. The following table provides details regarding our inventories at the dates indicated: June 30, 2018 July 1, 2017 (Thousands) Inventories: Raw materials $ 30,488 $ 32,421 Work-in-process 54,503 40,171 Finished goods 21,687 28,476 $ 106,678 $ 101,068 Capitalized Software Costs We capitalize certain development costs incurred in connection with our internal use software once an application has reached the development stage and until the software is substantially complete and ready for its intended use. These costs can include external direct costs of materials and services consumed in the project and internal costs, such as the payroll and benefits expenses attributable to those employees directly associated with the development of the software. Related maintenance and training costs are expensed as incurred. Capitalized software costs are included in property and equipment. During fiscal year 2017, we began the implementation of a new enterprise resource planning ("ERP") system. We capitalized certain costs incurred in connection with the development of this ERP system, totaling $14.4 million . We capitalized $5.0 million and $9.4 million of internal use software costs during the fiscal years ended June 30, 2018 and July 1, 2017, respectively. During the second quarter of fiscal 2018, we began using the ERP software for its intended use, and began recording depreciation expense. Property and Equipment Property and equipment are stated at cost. Depreciation is computed using the straight-line method based upon the estimated useful lives of the assets, which generally range from three to seven years . Leasehold improvements are amortized using the straight-line method over the estimated useful lives or the term of the related lease, whichever is shorter. When assets are retired or otherwise disposed of, the assets and related accumulated depreciation are removed from the accounts. Gains or losses resulting from asset dispositions are included in (gain) loss on disposal of property and equipment in the accompanying consolidated statements of operations. Repair and maintenance costs are expensed as incurred. The following table provides details regarding our property and equipment, net at the dates indicated: June 30, 2018 July 1, 2017 (Thousands) Property and equipment, net: Buildings and improvements $ 12,086 $ 10,222 Plant and machinery 137,301 99,779 Fixtures, fittings and equipment 3,526 3,225 Computer software and equipment 22,721 15,901 175,634 129,127 Less: accumulated depreciation (38,196 ) (14,794 ) $ 137,438 $ 114,333 During the year ended June 30, 2018 , we incurred a $1.4 million loss on the disposal of property and equipment related to certain legacy data communication products. Property and equipment includes assets under capital leases of $3.2 million and $3.7 million at June 30, 2018 and July 1, 2017 , respectively. Amortization associated with assets under capital leases is recorded in depreciation expense. Depreciation expense was $29.5 million , $20.8 million and $15.8 million for the fiscal years ended June 30, 2018 , July 1, 2017 and July 2, 2016 , respectively. Other Intangible Assets We review our other intangible assets for impairment whenever events or changes in circumstances indicate that the carrying amount of these assets may not be recoverable. The values assigned to other intangible assets are based on estimates and judgments regarding expectations for the success and life cycle of products and technologies acquired. Our other intangible assets with definite lives are amortized over their estimated useful lives. Impairment of Long-Lived Assets We review property and equipment and certain identifiable intangibles for impairment whenever events or changes in circumstances indicate that the carrying amount of an asset may not be recoverable. Recoverability of these assets is measured by comparing their carrying amounts to market prices or the future undiscounted cash flows the assets are expected to generate. If property and equipment or certain identifiable intangibles are considered to be impaired, the impairment to be recognized would equal the amount by which the carrying value of the asset exceeds its fair value based on market prices or future discounted cash flows. Derivative Financial Instruments Our operating results are subject to fluctuations based upon changes in the exchange rates between the currencies in which we collect revenues and pay expenses. A majority of our revenues are denominated in U.S. dollars, while a portion of our expenses are denominated in United Kingdom (U.K.) pounds sterling, Japanese yen, Chinese yuan and euros, in which we pay expenses in connection with operating our facilities in the United Kingdom, Japan, China and Italy. Historically, we have entered into foreign currency forward exchange contracts in an effort to mitigate a portion of our exposure to exchange rate fluctuations between the U.S. dollar and both the U.K. pound sterling and the Japanese yen. We recognize all derivatives, such as foreign currency forward exchange contracts, on our consolidated balance sheets at fair value regardless of the purpose for holding the instrument. If the derivative is a hedge, depending on the nature of the hedge, changes in the fair value of the derivative will either be offset against the change in fair value of the hedged assets, liabilities or firm commitments through operating results or recognized in accumulated other comprehensive income until the hedged item is recognized in operating results in our consolidated statements of operations. During the year ended June 30, 2018 , we entered into foreign currency forward exchange contracts, which expired in the same fiscal quarters in which they were opened. In connection with these hedges, during the fiscal years ended June 30, 2018 and July 1, 2017 , we recorded net losses on foreign currency transactions of $0.7 million and $0.5 million , respectively, within our consolidated statement of operations. At June 30, 2018 and July 1, 2017 , we had no outstanding foreign currency forward exchange contracts. Accrued Expenses and Other Liabilities The following table provides details for our accrued expenses and other liabilities at the dates indicated: June 30, 2018 July 1, 2017 (Thousands) Accrued expenses and other liabilities: Trade payables $ 392 $ 7,805 Compensation and benefits related accruals 14,167 13,837 Warranty accrual 3,879 4,124 Purchase commitments in excess of future demand, current 6,321 4,009 Other accruals 16,927 12,724 $ 41,686 $ 42,499 Warranty We generally provide a warranty for our products ranging from 12 months to 36 months from the date of sale, although warranties for certain of our products may be longer. We accrue for the estimated costs to provide warranty services at the time revenue is recognized. Our estimate of costs to service our warranty obligations is based on historical experience and expectation of future conditions. To the extent we experience increased warranty claim activity or increased costs associated with servicing those claims, our warranty costs would increase, resulting in a decrease in gross profit. Revenue Recognition Our revenue consists primarily of sales of products to customers. We recognize product revenue when (i) persuasive evidence of an arrangement exists, (ii) the product has been shipped and title has transferred, (iii) collectability is reasonably assured, (iv) the fees are fixed or determinable and (v) there are no uncertainties with respect to customer acceptance. Research and Development Costs Research and development costs are expensed as incurred. Advertising Costs Advertising costs are expensed as incurred. Our advertising costs for the fiscal years ended June 30, 2018 , July 1, 2017 and July 2, 2016 were not significant. Stock-Based Compensation We use grant date fair value to value restricted stock awards, restricted stock units and performance shares. We used the Black-Scholes option pricing model to value the fair value of stock options and stock appreciation rights when we last granted stock options in fiscal year 2015. We record stock-based compensation expense for time-based awards using the straight-line method over the requisite service period. Pursuant to our adoption of Accounting Standards Update ("ASC") No. 2016-09, Compensation: Improvements to Employee Share-Based Payment Accounting , in the first quarter of fiscal year 2018, we transitioned from estimating fo |