add inventory group

This commit is contained in:
2016-02-29 20:51:54 +01:00
parent 3926498f3e
commit b196b86746
19 changed files with 589 additions and 4 deletions

View File

@@ -132,7 +132,10 @@ class ContractForm extends Model {
if (! isset ( $this->ticketType )) {
$this->addError ( $attribute, "Bérlet típus nem található" );
}else{
$contracts = Contract::find()->andWhere(['>' ,'contract.expired_at', date('Y-m-d')])->andWhere(['not in' ,'contract.flag',[Contract::$FLAG_DELETED]])->all();
$contracts = Contract::find()
->andWhere( ['>' ,'contract.expired_at', date('Y-m-d')])
->andWhere(['not in' ,'contract.flag',[Contract::$FLAG_DELETED]])
->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");
}

View File

@@ -24,6 +24,8 @@ use common\components\Azaz;
$ticketMoneyMonthText = $azaz->toString($ticketMoneyMonth);
$customerBankName = $customer->bank_name;
$img = "<img height='20px' src='" . \Yii::getAlias("@webroot") . DIRECTORY_SEPARATOR. "images" . DIRECTORY_SEPARATOR . "alairas.jpg'>";
?>
@@ -153,7 +155,8 @@ másrészről:
</p>
<table style="width: 100%; margin-top: 30px;">
<tr>
<td style="width: 33%">
<td style="width: 33%; text-align: center;">
<?php echo $img; ?>
</td>
<td>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB