add conctract flag canceled2
This commit is contained in:
@@ -157,7 +157,7 @@ class ContractForm extends Model {
|
||||
}else{
|
||||
$contracts = Contract::find()
|
||||
->andWhere( ['>' ,'contract.expired_at', date('Y-m-d')])
|
||||
->andWhere(['not in' ,'contract.flag',[Contract::$FLAG_DELETED]])
|
||||
->andWhere(['not in' ,'contract.flag', Contract::getFlagsDoesNotProhibitNewContract() ])
|
||||
->andWhere(['contract.id_customer' => $this->customer->id_customer])->all();
|
||||
if ( count($contracts) > 0 ){
|
||||
$this->addError( $attribute , "Már van érvényes vagy lemondott szerződés az adott időszakban");
|
||||
|
||||
Reference in New Issue
Block a user