Kaynağa Gözat

Correctif

refactoring
Guillaume Bourgeois 1 yıl önce
ebeveyn
işleme
bbc2e5c49f
2 değiştirilmiş dosya ile 7 ekleme ve 6 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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(

Yükleniyor…
İptal
Kaydet