@@ 301-307 (lines=7) @@ | ||
298 | } |
|
299 | ||
300 | // buy_product_namećbuy_product_code |
|
301 | if (isset($searchData['buy_product_code']) && Str::isNotBlank($searchData['buy_product_code'])) { |
|
302 | $qb |
|
303 | ->leftJoin('c.Orders', 'o') |
|
304 | ->leftJoin('o.OrderDetails', 'od') |
|
305 | ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name') |
|
306 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_code'] . '%'); |
|
307 | } |
|
308 | ||
309 | // Order By |
|
310 | $qb->addOrderBy('c.update_date', 'DESC'); |
@@ 243-248 (lines=6) @@ | ||
240 | } |
|
241 | ||
242 | // buy_product_name |
|
243 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
244 | $qb |
|
245 | ->leftJoin('o.OrderDetails', 'od') |
|
246 | ->andWhere('od.product_name LIKE :buy_product_name') |
|
247 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
248 | } |
|
249 | ||
250 | // Order By |
|
251 | $qb->addOrderBy('o.update_date', 'DESC'); |
|
@@ 445-450 (lines=6) @@ | ||
442 | } |
|
443 | ||
444 | // buy_product_name |
|
445 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
446 | $qb |
|
447 | ->leftJoin('o.OrderDetails', 'od') |
|
448 | ->andWhere('od.product_name LIKE :buy_product_name') |
|
449 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
450 | } |
|
451 | ||
452 | // Order By |
|
453 | $qb->orderBy('o.update_date', 'DESC'); |