Ver código fonte

[Boutique] Correctif prix au kg

feature/souke
Guillaume 10 meses atrás
pai
commit
1650077192
2 arquivos alterados com 7 adições e 1 exclusões
  1. +6
    -0
      common/logic/Product/Product/Service/ProductSolver.php
  2. +1
    -1
      producer/controllers/OrderController.php

+ 6
- 0
common/logic/Product/Product/Service/ProductSolver.php Ver arquivo

@@ -117,6 +117,12 @@ class ProductSolver extends AbstractService implements SolverInterface
return $price;
}

public function getPriceUnitReferenceWithTax(Product $product)
{
$taxRateValue = $product->taxRate ? $product->taxRate->value : 0;
return Price::getPriceWithTax($this->getPriceUnitReference($product), $taxRateValue);
}

/**
* Retourne le prix du produit avec taxe
*/

+ 1
- 1
producer/controllers/OrderController.php Ver arquivo

@@ -922,7 +922,7 @@ class OrderController extends ProducerBaseController
[
'unit_coefficient' => Product::$unitsArray[$product->unit]['coefficient'],
'prices' => $productModule->getPriceArray($product, $user, $pointSale),
'price_unit_ref' => $productModule->getSolver()->getPriceUnitReference($product),
'price_unit_ref' => $productModule->getSolver()->getPriceUnitReferenceWithTax($product),
'productDistribution' => $product['productDistribution'],
'productPointSale' => $product['productPointSale'],
]

Carregando…
Cancelar
Salvar