PARSIPPANY, NJ. — The early February implementation of a new enterprise resource planning (ERP) system created unforeseen temporary operational, manufacturing and supply chain challenges at J&J Snack Foods Corp. in the second quarter, dragging down performance in the company’s Foodservice and Retail business units during the period and leading to a sharp year-over-year decline in earnings at the company.

Net income at J&J Snack Foods in the second quarter ended March 26 totaled $3.27 million, equal to 17¢ per share on the common stock, down 46% from $6.06 million, or 32¢ per share, in the same period a year ago. Net sales increased 10% to $281.51 million from $256.18 million.

Despite the hit to financials — estimated at approximately $20 million in sales and $4.5 million in operating profit — from the implementation of the new ERP system, Daniel Fachner, president and chief executive officer, said during a May 3 conference call with analysts that it was “the largest and most necessary change required to strengthen our supply chain.”

“Having a robust ERP platform provides a more seamless integrated process from raw materials through production, warehousing, inventory management and electronic order fulfillment,” Mr. Fachner said. “It is also vital to supporting many of the key initiatives we have discussed over the past several quarters, focused on increasing operational efficiencies, expanding capacity, accelerating our growth and improving margins. We are confident that this system will strengthen our operating infrastructure and deliver meaningful benefits to our customers and shareholders today and for many years to come.”

He said the company’s business accelerated in April and J&J Snack does not expect any further material impact from the system implementation going forward.

Strengthening its supply chain is important for J&J Snack, Mr. Fachner said, noting that the cost of key product ingredients such as flour, eggs, dairy, oils, chocolates and meats increased by more than 10% compared with costs three months ago. To offset the ingredient costs, he said the company has implemented two price increases totaling 9% to 10%, with a third round of price hikes planned for the fourth quarter.

“Many of our partners and customers require a 60-day notice before a price increase can be implemented,” he said. “And the same time, we are aggressively implementing numerous cost reduction initiatives across procurement, R&D, production and distribution to drive additional efficiencies and cost savings.”

Foodservice operating income at J&J Snack Foods plummeted to $536 million in the second quarter, down from $6.06 million a year ago. Sales, meanwhile, increased 4.1% to $176.34 million from $169.32 million. Within the foodservice division, sales of bakery products were $83.97 million, up 1.3% from $82.91 million in the same quarter a year ago, while sales of churros rose more than 18% to $17.45 million. Sales of soft pretzels increased 18% to $43.26 million. Sales of handhelds were narrowly higher, increasing to $20.51 million from $19.99 million.

Mr. Fachner said foodservice results were led by strong growth in pretzels and churro products, while novelties were dragged down by the ERP delays.

In the retail supermarket segment in the second quarter, operating income was $1.09 million, down 83% from $6.36 million in the previous year’s second quarter. Sales decreased 7% to $40.76 million from $43.91 million. Within the retail supermarket segment, sales of soft pretzels were virtually flat, falling to $15.75 million from $15.79 million. Sales of frozen novelties decreased 2.5% to $18.92 million, while sales of biscuits fell 12.5% to $5.69 million, and sales of handheld items dropped 52% to $1.07 million.

In the frozen beverages segment, J&J Snack posted operating income of $2.46 million, which compared with a loss of $5.19 million in the same period a year ago. Sales soared 50% to $64.42 million from $42.95 million.

Companywide, net earnings for the six-month period ended March 26 were $14.36 million, or 75¢ per share, up 83% from $7.84 million, or 41¢ per share, in the same time of the previous year. Six-month net sales increased 21% to $600 million from $497.18 million.