Update inventory code