private function getPositionAssociatedData(array
$data, Order
$order): array
{ // Checks if the status id for the position is passed and search for the assigned status model
if ($data['statusId'
] >= 0
) { $data['status'
] =
$this->
getManager()->
find(DetailStatus::
class,
$data['statusId'
]);
} else { unset($data['status'
]);
} $shopContext =
$this->
createShopContext($order);
$data =
$this->
checkTaxRule($data,
$shopContext);
$orderPosition = null;
foreach ($order->
getDetails() as $position) { if ($position->
getId() ===
(int) $data['id'
]) { $orderPosition =
$position;
break;
} } // Only get graduated price if a new position should be added or quantity has changed
if (($orderPosition === null ||
$orderPosition->
getQuantity() !==
(int) $data['quantity'
]) &&
$this->
hasProductGraduatedPrices($data['articleNumber'
],
$order) ) {