|
|
|
|
|
|
|
|
|
|
|
|
|
|
$quantity = 0; |
|
|
$quantity = 0; |
|
|
$invoicePrice = null; |
|
|
$invoicePrice = null; |
|
|
foreach ($order->productOrder as $productOrder) { |
|
|
|
|
|
if ($productOrder->id_product == $product['id']) { |
|
|
|
|
|
if ($productOrder->invoice_price) { |
|
|
|
|
|
$invoicePrice = number_format($productOrder->invoice_price, 2); |
|
|
|
|
|
} else { |
|
|
|
|
|
$invoicePrice = number_format($productOrder->price, 3); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$quantity = $productOrder->quantity; |
|
|
|
|
|
|
|
|
if(isset($order->productOrder)) { |
|
|
|
|
|
foreach ($order->productOrder as $productOrder) { |
|
|
|
|
|
if ($productOrder->id_product == $product['id']) { |
|
|
|
|
|
if ($productOrder->invoice_price) { |
|
|
|
|
|
$invoicePrice = number_format($productOrder->invoice_price, 2); |
|
|
|
|
|
} else { |
|
|
|
|
|
$invoicePrice = number_format($productOrder->price, 3); |
|
|
|
|
|
} |
|
|
|
|
|
$quantity = $productOrder->quantity; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|