diff --git a/src/Service/ShipmentService.php b/src/Service/ShipmentService.php index fdcac7b..8eab008 100644 --- a/src/Service/ShipmentService.php +++ b/src/Service/ShipmentService.php @@ -221,15 +221,15 @@ public function createShipmentFromOrder(Order $order) private function createNonDistributedShipment(Order $order, $idProduct, $isTestMode) { $products = $order->getProducts(); - $parcelPrice = $order->getTotalPaid(); + $goodsPrice = $order->total_paid; $parcelWeight = 0; foreach ($products as $product) { $parcelWeight += $product['weight'] * $product['product_quantity']; } - $parcelPrice = $this->calculateParcelPriceWithOrderDiscount($order, $parcelPrice); - $shipment = $this->createShipment($order, $idProduct, $isTestMode, 1, $parcelWeight, $parcelPrice); + $goodsPrice = $this->calculateParcelPriceWithOrderDiscount($order, $goodsPrice); + $shipment = $this->createShipment($order, $idProduct, $isTestMode, 1, $parcelWeight, $goodsPrice); if (!$shipment->id) { return false;