Przeglądaj źródła

[backend] Cron : correction génération PDF

dev
Guillaume 4 lat temu
rodzic
commit
fd46f4cc3d
1 zmienionych plików z 8 dodań i 3 usunięć
  1. +8
    -3
      backend/controllers/DistributionController.php

+ 8
- 3
backend/controllers/DistributionController.php Wyświetl plik

@@ -412,20 +412,25 @@ class DistributionController extends BackendController

$ordersArray = Order::searchAll([
'distribution.date' => $date,
'distribution.id_producer' => $idProducer
],
[
'orderby' => 'user.lastname ASC, user.name ASC, comment_point_sale ASC',
'conditions' => 'date_delete IS NULL'
]);

$distribution = Distribution::searchOne([], [
$distribution = Distribution::searchOne([
'id_producer' => $idProducer
], [
'conditions' => 'date LIKE :date',
'params' => [':date' => $date]
]);

if ($distribution) {
$selectedProductsArray = ProductDistribution::searchByDistribution($distribution->id);
$pointsSaleArray = PointSale::searchAll();
$pointsSaleArray = PointSale::searchAll([
'point_sale.id_producer' => $idProducer
]);

foreach ($pointsSaleArray as $pointSale) {
$pointSale->initOrders($ordersArray);
@@ -437,7 +442,7 @@ class DistributionController extends BackendController
$q->where(['id_distribution' => $distribution->id]);
}])
->where([
'id_producer' => GlobalParam::getCurrentProducerId(),
'id_producer' => $idProducer,
])
->orderBy('order ASC')
->all();

Ładowanie…
Anuluj
Zapisz