Browse Source

[Boutique] Correctif prix au kg

feature/souke
Guillaume 11 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

@@ -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 View File

@@ -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'],
]

Loading…
Cancel
Save