Guillaume Bourgeois 1 рік тому
джерело
коміт
bbc2e5c49f
2 змінених файлів з 7 додано та 6 видалено
  1. +4
    -3
      common/logic/Order/ProductOrder/Service/ProductOrderBuilder.php
  2. +3
    -3
      common/logic/Product/Product/Service/ProductSolver.php

+ 4
- 3
common/logic/Order/ProductOrder/Service/ProductOrderBuilder.php Переглянути файл

@@ -65,10 +65,11 @@ class ProductOrderBuilder extends AbstractBuilder

public function updateProductOrderInvoicePrice(ProductOrder $productOrder, array $params = []): void
{

$productOrder->invoice_price = $this->productSolver->getPrice($productOrder->product, [
'user' => isset($params['user']) ?? null,
'user_producer' => isset($params['user_producer']) ?? null,
'point_sale' => isset($params['point_sale']) ?? null,
'user' => (isset($params['user']) && $params['user']) ? $params['user'] : null,
'user_producer' => (isset($params['user_producer']) && $params['user_producer']) ? $params['user_producer'] : null,
'point_sale' => (isset($params['point_sale']) && $params['point_sale']) ? $params['point_sale'] : null,
'quantity' => $productOrder->quantity
]);
$this->saveUpdate($productOrder);

+ 3
- 3
common/logic/Product/Product/Service/ProductSolver.php Переглянути файл

@@ -23,10 +23,10 @@ class ProductSolver extends AbstractService implements SolverInterface
{
$specificPriceArray = $product->productPrice;

$user = isset($params['user']) ? $params['user'] : null;
$userProducer = isset($params['user_producer']) ? $params['user_producer'] : null;
$pointSale = isset($params['point_sale']) ? $params['point_sale'] : null;
$user = (isset($params['user']) && $params['user']) ? $params['user'] : null;
$pointSale = (isset($params['point_sale']) && $params['point_sale']) ? $params['point_sale'] : null;
$quantity = (isset($params['quantity']) && $params['quantity']) ? $params['quantity'] : 1;
//$userProducer = (isset($params['user_producer']) && $params['user_producer']) ? $params['user_producer'] : null;

if ($specificPriceArray && ($user || $pointSale)) {
$specificPriceArray = $this->productPriceSolver->filterByPriorityMatch(

Завантаження…
Відмінити
Зберегти