Sainsbury has suffered a further setback after many of its London stores ran out of fresh food this week due to a technical error.

The supermarket group said fewer than 20 stores were affected but seven of its Local convenience stores had been out of fruit, vegetables and other fresh foods since Tuesday, when they reopened after the new-year holiday.

The stock shortages were apparently caused by a fault in the company’s forecasting software.

In October last year chief executive Justin King said that the group would be forced to spend £200m to upgrade the supermarket’s IT system and supply chain, but Sainsbury has since written off about £120m of its supply chain investment.