|
|
|
|
|
|
|
|
<?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(), |