This margin layer is not dependent on revenue level, but only on product and geographical mix. In the first quarter, direct gross margin was relatively similar to what we saw in the fourth quarter. We had initially anticipated a reversal of the negative impact of product mix of our Q4 2023 revenues. However, the continued adoption of our lower margin single phase battery in the United States significantly exceeded our expectations and continued to weigh on our direct gross margins in Q1, offsetting the margin benefits from less revenues derived from customers benefiting from volume pricing. As a reminder, the single phase batteries sold mainly in the United States utilize battery cells we purchased at higher prices and once those cells are consumed, our next battery generations will allow the return to our target margin on the residential battery products.
The second layer of expenses that make up our gross margin, which we define as other costs of goods sold or OCOGS, are not directly related to product volumes sold and are largely but not entirely fixed costs. In the first quarter, we lowered our non-GAAP OCOGS by roughly 21% on an absolute dollar basis, but the relatively higher decline in revenues led to these economies of scale that had a negative impact of 750 basis points on our first quarter solar gross margins. On the positive side, in OCOGS, we continue to see a steady improvement in our warranty costs and reduced accrual rates in relation to the sale of new products. This is a result of our transition to use certain automotive grade components as well as other activities that improve our install base resilience.
We’ve also seen as a result of lower revenues, significantly lower shipment costs. This quarter, we also increased our accruals for obsolete inventory by approximately $9 million. Our obsolete inventory accrual policy applied to our unnaturally high inventory level requires us to continue and evaluate risks of inventory obsolescence and to take the needed actions. It is important to note that the accrual by itself doesn’t mean that the inventory is obsolete, but rather reflects a higher probability of such obsolescence. We are diligently working on reducing and utilizing our inventory levels of both finished goods and raw materials. Gross margins for our non-solar segments was negative 47.2%, down from negative 2.2% last quarter, a result of seasonally lower sales in our non-solar storage business and low utilization of Sella 2 factory.
The first quarter typically marks the seasonally lowest quarter of our storage business, and we expect improved revenues and margins in the coming quarters. On a non-GAAP basis, operating expenses for the first quarter were $109.2 million compared to $118.3 million in the prior quarter. Our OpEx was lower than our guided range, largely due to one-time items. We continue to anticipate operating expenses to stabilize at the range of $112 million to $117 million, including the impact of our workforce reduction we implemented in the first quarter, and we will continue to push for our expenditures to go down while allowing significant resources for our technology and new product development. GAAP operating loss for the quarter was $173.7 million compared to an operating loss of $237.6 million in the previous quarter.
Non-GAAP operating loss for the quarter was $122.5 million compared to an operating loss of $107.8 million in the previous quarter. Operating loss from the solar segment was $110.4 million this quarter compared to an operating loss of $93.9 million in the previous quarter, and operating loss from our non-solar segment was $12.1 million this quarter compared to an operating loss of $13.9 million in the previous quarter. Non-GAAP financial expense for the quarter was $4.8 million compared to a non-GAAP financial income of $29.8 million in the previous quarter. Our non-GAAP tax benefit was $18.7 million this quarter, compared to a non-GAAP tax benefit of $25.5 million in the previous quarter. Our non-GAAP tax rate for the quarter was 15% and we expect it to climb back towards 20% as the business returns to profitability.
GAAP net loss for the first quarter was $157.3 million compared to a GAAP net loss of $162.4 million in the previous quarter. Our non-GAAP net loss was $108.6 million compared to a non-GAAP net loss of $52.5 million in the previous quarter. GAAP net diluted loss per share was $2.75 for the first quarter compared to $2.85 in the previous quarter. Non-GAAP net diluted loss per share was $1.90 compared to $0.92 in the previous quarter. Turning now to the balance sheet. As of March 31, 2024, cash, cash equivalents, bank deposit, restricted bank deposits and investments were approximately $950 million, which we expect to be the lowest cash point for this year. Net of debt, this amount is approximately $316 million. This quarter, cash used in operation activities was $217 million.
This cash utilization is a result of the inventory buildup and the associated vendor payments related to the inventory manufacturing. We believe that in the first quarter we completed the adjustments of our manufacturing commitments to the required level amid our current inventory position. As of March 31, our inventory level net of reserve was at $1.55 billion, compared to $1.44 billion in the prior quarter. Our average inventory days increased from 386 days in the fourth quarter to 619 days in the first quarter. The cash flow used for manufacturing was partially offset by a significant reduction in accounts receivables as we continued to make collections from customers despite lengthened payment terms. Accounts receivable net decreased this quarter to $404.4 million compared to $622.4 million last quarter.
As a result, we brought down DSO from 265 days in the fourth quarter to 220 days in the first quarter. As part of our $300 million share repurchase program authorized by our Board of Directors in the fourth quarter of 2023, this quarter we repurchased 506,000 shares of our common stock for an average gross purchase price of $65.67 per share, for a total approximately $33 million. Further shares purchases continued in April and we will continue to responsibly implement the program based on our cash flow developments and expectations. Turning to guidance for the second quarter of 2024. We are guiding revenues to be within the range of $250 million to $280 million. We expect non-GAAP gross margins to be within the range of negative 4% to 0%, including approximately 350 basis points of net IRA benefit.
We expect our non-GAAP operating expenses to be within the range of $116 to $120 million. Revenues from the Solar segment are expected to be within the range of $225 million to $255 million. Gross margin from our Solar segment is expected to be within the range of negative 3% to positive 1%, including approximately 420 basis points of net IRA benefit. I will now turn the call to the operator to open it up for questions. Operator, please.
Operator: [Operator Instructions] And we’ll move first to Andrew Percoco with Morgan Stanley. Your line is open.
Andrew Percoco: Great. Thanks so much for taking the question. I guess just to start out here on margin guidance, obviously a lot to unpack, but if I just look at the first quarter, your revenue actually was somewhat in line with your guidance, but margins missed. And my understanding is it was mostly related to mix shift, I guess a lack of reversal in mix shift that you were expecting following the fourth quarter. So can you just give us a sense for what you are expecting for the remainder of 2024 beyond just the second quarter, and whether or not you’re comfortable in your prior guidance in terms of your ability to get back to the 30% range by the end of the year? Thank you.
Zvi Lando: Sure, Andrew. And thank you for the question. So I’ll start by saying that we’re still playing the rule of small numbers, relatively. And just to explain it a little bit, in general, the amount of batteries that we planned when we guided for our gross margin was a certain level that was exceeded by approximately $15 million of additional battery sales that we did not anticipate, just given the fact that the demand for our batteries, single phase batteries in the United States is better than we expected. And the entire result is actually related to the difference of the margin of having more batteries at a very low margin compared to where we planned it. Had it been a regular quarter, at a regular business level, this would be very minimal effects, but at this revenue level, it’s relatively large.
Now, in essence, it’s a little bit of a zero sum game because all of these batteries are based on battery cells that we’ve already acquired, are already in our inventory and it’s just a question of how quickly we consume it. So by definition, if we sell a lot more of them right now, we will sell less of them next year when we’re going to basically consume all of them. So it’s just a shift of the margin. In general what we are doing. And this is already baked into the second quarter gross margin guidance, we are assuming slightly higher battery sales than we initially anticipated when we started the year. So at the beginning it’s already there. And the second thing is, of course, that given the very small revenues that we have, and we assume that they will grow towards the end of the year, we assume that any impact in that size of difference in mix will be very, very minimal.
So no change in our, I would call it stabilized margin projection.
Andrew Percoco: Understood. Okay, that’s helpful. But I guess as a follow up to that, can you maybe bridge that to cash flow expectations for the year and maybe how you’re thinking about liability management? I think you have a debt maturity next year to think about. How are you thinking about that as it relates to cash flow expectations this year and a liability management? Thank you.