|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Retourne le prix du produit avec taxe |
|
|
* Retourne le prix du produit avec taxe |
|
|
*/ |
|
|
*/ |
|
|
public function getPriceWithTax(ProductOrder $productOrder): float |
|
|
|
|
|
|
|
|
public function getPriceWithTax(ProductOrder $productOrder) |
|
|
{ |
|
|
{ |
|
|
return Price::getPriceWithTax($productOrder->price, $productOrder->taxRate->value); |
|
|
return Price::getPriceWithTax($productOrder->price, $productOrder->taxRate->value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function getPriceByTypeTotal(ProductOrder $productOrder, string $typeTotal = Order::AMOUNT_TOTAL): float |
|
|
|
|
|
|
|
|
public function getPriceByTypeTotal(ProductOrder $productOrder, string $typeTotal = Order::AMOUNT_TOTAL) |
|
|
{ |
|
|
{ |
|
|
if ($typeTotal == Order::INVOICE_AMOUNT_TOTAL && $productOrder->invoice_price) { |
|
|
if ($typeTotal == Order::INVOICE_AMOUNT_TOTAL && $productOrder->invoice_price) { |
|
|
return $productOrder->invoice_price; |
|
|
return $productOrder->invoice_price; |