add changes procurement

This commit is contained in:
2015-09-25 18:43:23 +02:00
parent 5c9db98110
commit fe61803670
5 changed files with 42 additions and 28 deletions

View File

@@ -26,7 +26,7 @@ class ProcurementSearch extends Procurement
{
return [
[[ 'id_warehouse', 'id_user', 'id_product', ], 'integer'],
[[ 'date_start', ], 'date' , 'timestampAttribute' => 'timestampStart' ],
[[ 'date_start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
[[ 'date_end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
];
}
@@ -63,6 +63,14 @@ class ProcurementSearch extends Procurement
return $dataProvider;
}
if ( empty($this->date_start) ){
$this->timestampStart = '';
}
if ( empty($this->date_end) ){
$this->timestampEnd = '';
}
$query->andFilterWhere([
'id_warehouse' => $this->id_warehouse,
'id_user' => $this->id_user,