Browse Source

[Boutique] Correctif prix au kg

feature/souke
Guillaume 10 months ago
parent
commit
1650077192
2 changed files with 7 additions and 1 deletions
  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 View File

return $price; 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 * Retourne le prix du produit avec taxe
*/ */

+ 1
- 1
producer/controllers/OrderController.php View File

[ [
'unit_coefficient' => Product::$unitsArray[$product->unit]['coefficient'], 'unit_coefficient' => Product::$unitsArray[$product->unit]['coefficient'],
'prices' => $productModule->getPriceArray($product, $user, $pointSale), 'prices' => $productModule->getPriceArray($product, $user, $pointSale),
'price_unit_ref' => $productModule->getSolver()->getPriceUnitReference($product),
'price_unit_ref' => $productModule->getSolver()->getPriceUnitReferenceWithTax($product),
'productDistribution' => $product['productDistribution'], 'productDistribution' => $product['productDistribution'],
'productPointSale' => $product['productPointSale'], 'productPointSale' => $product['productPointSale'],
] ]

Loading…
Cancel
Save