| @@ 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'); |
|
| @@ 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'); |
|