Browse Source

[backend] Header : optimisation requête distributions passées et futures

dev
Guillaume Bourgeois 5 years ago
parent
commit
c8c9337663
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      backend/views/layouts/header.php

+ 0
- 2
backend/views/layouts/header.php View File

<?php <?php
$pastDistributionsArray = Distribution::find() $pastDistributionsArray = Distribution::find()
->with('order')
->where(['<', 'distribution.date', date('Y-m-d')]) ->where(['<', 'distribution.date', date('Y-m-d')])
->andWhere([ ->andWhere([
'distribution.id_producer' => Producer::getId(), 'distribution.id_producer' => Producer::getId(),
$pastDistributionsArray = array_reverse($pastDistributionsArray) ; $pastDistributionsArray = array_reverse($pastDistributionsArray) ;
$incomingDistributionsArray = Distribution::find() $incomingDistributionsArray = Distribution::find()
->with('order')
->where(['>=', 'distribution.date', date('Y-m-d')]) ->where(['>=', 'distribution.date', date('Y-m-d')])
->andWhere([ ->andWhere([
'distribution.id_producer' => Producer::getId(), 'distribution.id_producer' => Producer::getId(),

Loading…
Cancel
Save