getSalespersonId()) { $salesperson = $this->salespersonRepository->get($orderItem->getSalespersonId()); return $salesperson->getName(); } return null; } public function getLabBookingAccount(Item $orderItem) { if ($orderItem->getLabId()) { try { $lab = $this->labRepository->get($orderItem->getLabId()); return $lab->getBookingAccount(); } catch (LocalizedException $e) { } } return null; } /** * @param Item $orderItem * @return string|null */ public function getCustomDiscountPercent(Item $orderItem) { if ($orderItem->getData('customer_discount_percent')) { return number_format( $orderItem->getData('customer_discount_percent')*1.0, 2, '.', '' ).'%'; } return null; } }