add contract to detsta processor

This commit is contained in:
2016-01-25 09:17:09 +01:00
parent df14401b28
commit 0c3ff2c0f3
9 changed files with 79 additions and 30 deletions

View File

@@ -114,7 +114,7 @@ class ReceptionForm extends Model
$query = Contract::find();
$query->andWhere(['id_customer' => $this->customer->id_customer ]);
$query->andWhere([ '>=' ,'expired_at' , new Expression("now()") ]);
$query->andWhere(["not in" , 'flag' , [Contract::$FLAG_DELETED, Contract::$FLAG_CANCELED]]);
$query->andWhere(["not in" , 'flag' , [Contract::$FLAG_DELETED ]]);
$this->contract = $query->one();
}