@@ 246-251 (lines=6) @@ | ||
243 | } |
|
244 | ||
245 | // buy_product_name |
|
246 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
247 | $qb |
|
248 | ->leftJoin('o.OrderDetails', 'od') |
|
249 | ->andWhere('od.product_name LIKE :buy_product_name') |
|
250 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
251 | } |
|
252 | ||
253 | // Order By |
|
254 | $qb->addOrderBy('o.update_date', 'DESC'); |
|
@@ 440-445 (lines=6) @@ | ||
437 | } |
|
438 | ||
439 | // buy_product_name |
|
440 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
441 | $qb |
|
442 | ->leftJoin('o.OrderDetails', 'od') |
|
443 | ->andWhere('od.product_name LIKE :buy_product_name') |
|
444 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
445 | } |
|
446 | ||
447 | // Order By |
|
448 | $qb->orderBy('o.update_date', 'DESC'); |
@@ 292-298 (lines=7) @@ | ||
289 | } |
|
290 | ||
291 | // buy_product_namećbuy_product_code |
|
292 | if (isset($searchData['buy_product_code']) && Str::isNotBlank($searchData['buy_product_code'])) { |
|
293 | $qb |
|
294 | ->leftJoin('c.Orders', 'o') |
|
295 | ->leftJoin('o.OrderDetails', 'od') |
|
296 | ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name') |
|
297 | ->setParameter('buy_product_name', '%'.$searchData['buy_product_code'].'%'); |
|
298 | } |
|
299 | ||
300 | // Order By |
|
301 | $qb->addOrderBy('c.update_date', 'DESC'); |