|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($params['date'])) |
|
|
if (isset($params['date'])) |
|
|
$commandes = $commandes->andWhere(['production.date' => $params['date']]); |
|
|
$commandes = $commandes->andWhere(['production.date' => $params['date']]); |
|
|
|
|
|
|
|
|
|
|
|
if (isset($params['date_delete'])) { |
|
|
|
|
|
if($params['date_delete'] == 'NULL') { |
|
|
|
|
|
$commandes = $commandes->andWhere('commande.date_delete IS NULL'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
$commandes = $commandes->andWhere(['commande.date_delete' => $params['date_delete']]); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (isset($params['date_update'])) { |
|
|
|
|
|
if($params['date_update'] == 'NULL') { |
|
|
|
|
|
$commandes = $commandes->andWhere('commande.date_update IS NULL'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
$commandes = $commandes->andWhere(['commande.date_update' => $params['date_update']]); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($params['type'])) |
|
|
if (isset($params['type'])) |
|
|
$commandes = $commandes->andWhere(['commande.type' => $params['type']]); |
|
|
$commandes = $commandes->andWhere(['commande.type' => $params['type']]); |