| @@ 133-143 (lines=11) @@ | ||
| 130 | } |
|
| 131 | ||
| 132 | // birth |
|
| 133 | if (!empty($searchData['birth_start']) && $searchData['birth_start']) { |
|
| 134 | if (!$joinedCustomer) { |
|
| 135 | $qb->leftJoin('o.Customer', 'c'); |
|
| 136 | $joinedCustomer = true; |
|
| 137 | } |
|
| 138 | ||
| 139 | $date = $searchData['birth_start']; |
|
| 140 | $qb |
|
| 141 | ->andWhere('c.birth >= :birth_start') |
|
| 142 | ->setParameter('birth_start', $date); |
|
| 143 | } |
|
| 144 | if (!empty($searchData['birth_end']) && $searchData['birth_end']) { |
|
| 145 | if (!$joinedCustomer) { |
|
| 146 | $qb->leftJoin('o.Customer', 'c'); |
|
| @@ 144-156 (lines=13) @@ | ||
| 141 | ->andWhere('c.birth >= :birth_start') |
|
| 142 | ->setParameter('birth_start', $date); |
|
| 143 | } |
|
| 144 | if (!empty($searchData['birth_end']) && $searchData['birth_end']) { |
|
| 145 | if (!$joinedCustomer) { |
|
| 146 | $qb->leftJoin('o.Customer', 'c'); |
|
| 147 | $joinedCustomer = true; |
|
| 148 | } |
|
| 149 | ||
| 150 | $date = clone $searchData['birth_end']; |
|
| 151 | $date = $date |
|
| 152 | ->modify('+1 days'); |
|
| 153 | $qb |
|
| 154 | ->andWhere('c.birth < :birth_end') |
|
| 155 | ->setParameter('birth_end', $date); |
|
| 156 | } |
|
| 157 | ||
| 158 | // sex |
|
| 159 | if (!empty($searchData['sex']) && count($searchData['sex']) > 0) { |
|