Przeglądaj źródła

Les commandes annulées ne doivent pas être présentes dans le report PDF

refactoring
Guillaume Bourgeois 6 lat temu
rodzic
commit
d5487ba7bd
1 zmienionych plików z 19 dodań i 0 usunięć
  1. +19
    -0
      common/models/Commande.php

+ 19
- 0
common/models/Commande.php Wyświetl plik

@@ -471,6 +471,25 @@ class Commande extends \yii\db\ActiveRecord

if (isset($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']))
$commandes = $commandes->andWhere(['commande.type' => $params['type']]);

Ładowanie…
Anuluj
Zapisz