From 88ff717522a288bdfefeba9ed715b54b701f689a Mon Sep 17 00:00:00 2001 From: "sosuke.iwabuchi" Date: Mon, 2 Oct 2023 11:45:15 +0900 Subject: [PATCH] =?UTF-8?q?=E6=A4=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HelloTechno/ReceiptIssuingOrderRepository.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/Repositories/Custom/HelloTechno/ReceiptIssuingOrderRepository.php b/app/Repositories/Custom/HelloTechno/ReceiptIssuingOrderRepository.php index abf54c7..9d92aff 100644 --- a/app/Repositories/Custom/HelloTechno/ReceiptIssuingOrderRepository.php +++ b/app/Repositories/Custom/HelloTechno/ReceiptIssuingOrderRepository.php @@ -121,6 +121,10 @@ class ReceiptIssuingOrderRepository extends BaseRepository // 運営会社 $this->where($table, $condition, $this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_CODE])); + $customerCode = data_get($condition, static::CONDITION_CUSTOMER_CODE); + if ($customerCode) { + $table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_CODE]), $customerCode); + } $customerName = data_get($condition, static::CONDITION_CUSTOMER_NAME); if ($customerName) { $table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_NAME]), 'like', "%{$customerName}%"); @@ -128,9 +132,13 @@ class ReceiptIssuingOrderRepository extends BaseRepository // 駐車場 $this->where($table, $condition, $this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_MANAGEMENT_CODE])); - $parkihngName = data_get($condition, static::CONDITION_PARKING_NAME); - if ($parkihngName) { - $table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_NAME]), 'like', "%{$parkihngName}%"); + $parkingManagementCode = data_get($condition, static::CONDITION_PARKING_NAME); + if ($parkingManagementCode) { + $table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_MANAGEMENT_CODE]), $parkingManagementCode); + } + $parkingName = data_get($condition, static::CONDITION_PARKING_NAME); + if ($parkingName) { + $table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_NAME]), 'like', "%{$parkingName}%"); }