Преглед на файлове

[Administration] Factures : correctif initialisation prix facturé lors de la création d'une facture sur base de commandes

feature/rotating_product
Guillaume Bourgeois преди 5 месеца
родител
ревизия
fb6fb0a8d5
променени са 2 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. +7
    -0
      backend/controllers/DocumentController.php
  2. +0
    -1
      domain/Order/Order/OrderBuilder.php

+ 7
- 0
backend/controllers/DocumentController.php Целия файл

@@ -153,6 +153,13 @@ class DocumentController extends BackendController
foreach ($model->ordersOnCreate as $key => $idOrder) {
$order = $orderModule->findOneOrderById($idOrder);
$orderModule->updateOrderInvoice($order, $model);
$orderModule->getBuilder()->updateOrderInvoicePrices($order,
[
'user' => $model->user,
'user_producer' => $this->getUserProducerModule()->getRepository()
->findOneUserProducer($model->user),
'point_sale' => $order->pointSale
]);
}
}
}

+ 0
- 1
domain/Order/Order/OrderBuilder.php Целия файл

@@ -449,7 +449,6 @@ class OrderBuilder extends AbstractBuilder
{
if ($this->orderSolver->isOrderFromProducer($order)) {
$this->updateOrderDeliveryNote($order, $deliveryNote);

$order = $this->orderRepository->findOneOrderById($order->id);
$user = $this->userRepository->findOneUserById($deliveryNote->id_user);
$userProducer = $this->userProducerRepository->findOneUserProducer($user);

Loading…
Отказ
Запис