@@ 302-308 (lines=7) @@ | ||
299 | } |
|
300 | ||
301 | // buy_product_namećbuy_product_code |
|
302 | if (isset($searchData['buy_product_code']) && Str::isNotBlank($searchData['buy_product_code'])) { |
|
303 | $qb |
|
304 | ->leftJoin('c.Orders', 'o') |
|
305 | ->leftJoin('o.OrderDetails', 'od') |
|
306 | ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name') |
|
307 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_code'] . '%'); |
|
308 | } |
|
309 | ||
310 | // Order By |
|
311 | $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'); |
|
@@ 433-438 (lines=6) @@ | ||
430 | } |
|
431 | ||
432 | // buy_product_name |
|
433 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
|
434 | $qb |
|
435 | ->leftJoin('o.OrderDetails', 'od') |
|
436 | ->andWhere('od.product_name LIKE :buy_product_name') |
|
437 | ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
438 | } |
|
439 | ||
440 | ||
441 | // Order By |