|
|
|
|
|
|
|
|
|
|
|
|
|
|
$command = $connection->createCommand(" |
|
|
$command = $connection->createCommand(" |
|
|
UPDATE `product_order` |
|
|
UPDATE `product_order` |
|
|
SET price = ROUND(price / (1 + :tax_value), 2) |
|
|
|
|
|
|
|
|
SET price = ROUND(price / (1 + :tax_value), 2), |
|
|
|
|
|
id_tax_rate = :id_tax_rate |
|
|
WHERE id_product = :id_product", |
|
|
WHERE id_product = :id_product", |
|
|
[ |
|
|
[ |
|
|
':id_product' => $product->id, |
|
|
':id_product' => $product->id, |
|
|
':tax_value' => $product->taxRate->value |
|
|
|
|
|
|
|
|
':tax_value' => $product->taxRate->value, |
|
|
|
|
|
':id_tax_rate' => $product->taxRate->id, |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
$result = $command->query(); |
|
|
$result = $command->query(); |