@@ -329,8 +329,10 @@ class Distribution extends ActiveRecordCommon | |||
if($ordersArray) { | |||
foreach($ordersArray as $order) { | |||
foreach($order->productOrder as $productOrder) { | |||
$productOrder->price = $product->price ; | |||
$productOrder->save() ; | |||
if($order->productOrder->id_product == $product->id) { | |||
$productOrder->price = $product->price ; | |||
$productOrder->save() ; | |||
} | |||
} | |||
} | |||
} |