add feature clear card

This commit is contained in:
2016-04-03 10:44:12 +02:00
parent ee4ae54e6f
commit 5ff974c717
12 changed files with 108 additions and 56 deletions

View File

@@ -62,22 +62,7 @@ class CustomerSearch extends Customer
];
// $dataProvider->setSort(
// [
// 'attributes' => [
// 'id',
// 'fullName' => [
// 'asc' => ['first_name' => SORT_ASC, 'last_name' => SORT_ASC],
// 'desc' => ['first_name' => SORT_DESC, 'last_name' => SORT_DESC],
// 'label' => 'Full Name',
// 'default' => SORT_ASC
// ],
// 'country_id'
// ]
// ]);
$this->load($params);
@@ -89,18 +74,7 @@ class CustomerSearch extends Customer
$query->leftJoin(Card::tableName(), " customer.id_customer_card = card.id_card" );
// $query->andFilterWhere([
// 'id_customer' => $this->id_customer,
// 'id_customer_card' => $this->id_customer_card,
// 'id_user' => $this->id_user,
// 'id_partner_card' => $this->id_partner_card,
// 'id_proposer' => $this->id_proposer,
// 'sex' => $this->sex,
// 'date_stundent_card_expire' => $this->date_stundent_card_expire,
// 'birthdate' => $this->birthdate,
// 'created_at' => $this->created_at,
// 'updated_at' => $this->updated_at,
// ]);
$query->andFilterWhere(['like', 'customer.name', $this->name])
->andFilterWhere(['like', 'customer.email', $this->email])