/** * @param \Generated\Shared\Transfer\ItemTransfer $orderItem * * @return \Generated\Shared\Transfer\RefundItemTransfer */ protected function createRefundItem(ItemTransfer $orderItem) { $refundItem = new RefundItemTransfer(); $refundItem->setFkSalesOrderItem($orderItem->getIdSalesOrderItem()); $refundItem->setQuantity($orderItem->getQuantity()); $refundItem->setGrossPrice($orderItem->getUnitGrossPrice()); $refundItem->setDiscountAmount($orderItem->getSumTotalDiscountAmount()); $refundItem->setName($orderItem->getName()); $refundItem->setGroupKey($orderItem->getGroupKey()); $refundItem->setTaxRate($orderItem->getTaxRate()); $refundItem->setTaxAmount($orderItem->getSumTaxAmount()); return $refundItem; }