From ff9b5adfda6593559cae65e93fa5282f7fb18e3a Mon Sep 17 00:00:00 2001 From: think-kijima Date: Thu, 18 Feb 2021 19:57:32 +0900 Subject: [PATCH 1/9] =?UTF-8?q?Redmine-#5226:=20[=E3=81=8B=E3=82=93?= =?UTF-8?q?=E3=81=96=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84?= =?UTF-8?q?=E3=81=8C=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 予約が営業時間外となるかどうかを確認するためのファンクションを追加した --- app/controllers/components/misc_function.php | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/app/controllers/components/misc_function.php b/app/controllers/components/misc_function.php index b1ac041f3..e92f51a87 100644 --- a/app/controllers/components/misc_function.php +++ b/app/controllers/components/misc_function.php @@ -2047,6 +2047,63 @@ function GetDailyKanzashiCustomersLimitFromOldTable(&$controller, $dbname, $stor return $result; } + /** + * かんざし時間別予約可能数更新可能可否 + * + * @param controller $controller + * @param string $dbname + * @param int $kanzashisalonposid + * @param storeHolidayInformation $store_holiday 店舗休日のオブジェクト + * @param _kanzashiCustomersLimit $customers_limits かんざし時間別予約可能数のオブジェクト配列 + * @return return_updateKanzashiCustomersLimit かんざし時間別予約可能数更新結果 + */ + function CanUpdateKanzashiCustomersLimit(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) + { + $controller->StoreHoliday->set_company_database($dbname, $controller->StoreHoliday); + $result = array('error_dates' => array(), 'updated' => false); + $daily_times = array(); + + foreach ($customers_limits as $customers_limit) { + $date = $customers_limit['ymd']; + $daily_times[$date]["start_time"][] = substr($customers_limit['begin_time'], 0, 8); + $daily_times[$date]["end_time"][] = substr($customers_limit['end_time'], 0, 8); + } + + $date_queries = array(); + + foreach ($daily_times as $date => $daily_time) { + $day = date('j', strtotime($date)); + $is_holiday = var_export($store_holiday["day{$day}"] !== "", true); + $start_time = min($daily_time['start_time']); + $end_time = max($daily_time['end_time']); + $date_queries[] = "date = '{$date}' AND ({$is_holiday} OR start_time < '{$start_time}' OR end_time > '{$end_time}')"; + } + + $date_query = implode(' OR ', $date_queries); + + $query = " + SELECT DISTINCT kr.date + FROM kanzashi_reservation kr + JOIN sipssbeauty_kanzashi.salon s + ON + s.pos_id = {$kanzashisalonposid} AND + s.kanzashi_id = kr.salon_id + WHERE + deletedate IS NULL AND + ({$date_query}) + ORDER BY + kr.date + "; + + $records = $controller->StoreHoliday->query($query); + + foreach ($records as $record) { + $result['error_dates'][] = $record['kr']['date']; + } + + return $result; + } + /** * Get the available Facilities * From 05bc22d68a3f80ad05bb3b55edb4c04638f03700 Mon Sep 17 00:00:00 2001 From: think-kijima Date: Thu, 18 Feb 2021 20:02:11 +0900 Subject: [PATCH 2/9] =?UTF-8?q?Redmine-#5226:=20[=E3=81=8B=E3=82=93?= =?UTF-8?q?=E3=81=96=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84?= =?UTF-8?q?=E3=81=8C=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - UpdateKanzashiCustomersLimit APIの戻り値を変更した --- app/controllers/servers_controller.php | 51 +++++++++++++++++++------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index 436c29baf..1e669a8ff 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -1054,7 +1054,7 @@ class ServersController extends WebServicesController 'store_holiday' => 'tns:storeHolidayInformation', 'customers_limits' => 'tns:_kanzashiCustomersLimit' ), - 'output' => array('return' => 'xsd:boolean') + 'output' => array('return' => 'tns:return_updateKanzashiCustomersLimit') ), 'wsPushKanzashiStylist' => array( 'doc' => 'かんざしスタイリストPUSH', @@ -2405,6 +2405,17 @@ class ServersController extends WebServicesController 'store_holiday' => 'tns:storeHolidayInformation', 'customers_limits' => 'tns:_kanzashiCustomersLimit' ) + ), + + // かんざし時間別予約可能数更新結果 + '_dates' => array( + 'array' => 'xsd:date' + ), + 'return_updateKanzashiCustomersLimit' => array( + 'struct' => array( + 'error_dates' => 'tns:_dates', + 'updated' => 'xsd:boolean' + ) ) ); @@ -11315,23 +11326,34 @@ function wsGetMonthlyKanzashiSalonHours($sessionid, $kanzashisalonposid, $storec * @param int $storecode 店舗コード * @param storeHolidayInformation $store_holiday 店舗休日のオブジェクト * @param _kanzashiCustomersLimit $customers_limits かんざし時間別予約可能数のオブジェクト配列 + * @return return_updateKanzashiCustomersLimit かんざし時間別予約可能数更新結果 */ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $kanzashisalonposid, $storecode, $store_holiday, $customers_limits) { - if ($kanzashisalonposid) { - $store_holiday['kanzashisalonposid'] = $kanzashisalonposid; - } - if ($store_holiday['year'] && $store_holiday['month'] && $store_holiday['STORECODE']) { - $this->wsAddUpdateDeleteStoreHoliday($sessionid, $store_holiday, $ismainsalon); - } else { - $store_info = $this->YoyakuSession->Check($this); + $result = array('error_dates' => array(), 'updated' => false); + $storeinfo = $this->YoyakuSession->Check($this); - if (!$store_info) { - $this->_soap_server->fault(1, '', INVALID_SESSION); - return; + if (!$storeinfo) { + $this->_soap_server->fault(1, '', INVALID_SESSION); + return $result; + } + + if ($store_holiday['year'] && $store_holiday['month'] && $store_holiday['STORECODE']) { + $result = $this->MiscFunction->CanUpdateKanzashiCustomersLimit($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); + + if ($result['error_dates']) { + return $result; } - $this->StoreHoliday->set_company_database($store_info['dbname'], $this->StoreHoliday); + if ($kanzashisalonposid) { + $store_holiday['kanzashisalonposid'] = $kanzashisalonposid; + } + + if (!$this->wsAddUpdateDeleteStoreHoliday($sessionid, $store_holiday, $ismainsalon)) { + return $result; + } + } else { + $this->StoreHoliday->set_company_database($storeinfo['dbname'], $this->StoreHoliday); } $delete_values = array(); @@ -11392,12 +11414,13 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $kanzashisalon } $source->commit(); unset($source, $sqlstatements); - return true; + $result['updated'] = true; } catch (Exception $ex) { $source->rollback(); unset($source, $sqlstatements); - return false; } + + return $result; } /** From b01932a42b373334b15cc8dcdfafa3bcd33d60a7 Mon Sep 17 00:00:00 2001 From: think-kijima Date: Wed, 24 Feb 2021 20:34:36 +0900 Subject: [PATCH 3/9] =?UTF-8?q?Redmine-#5226:=20[=E3=81=8B=E3=82=93?= =?UTF-8?q?=E3=81=96=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84?= =?UTF-8?q?=E3=81=8C=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - トランザクション処理のコードを整理した --- app/controllers/servers_controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index 1e669a8ff..c4306c656 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -11405,19 +11405,19 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $kanzashisalon } $source = $this->StoreHoliday->getDataSource(); + $source->begin(); + try { - $source->begin(); foreach ($sqlstatements as $sqlstatement) { - if ($this->StoreHoliday->query($sqlstatement) === false) { + if (!$this->StoreHoliday->query($sqlstatement)) { throw new Exception(); } } + $source->commit(); - unset($source, $sqlstatements); $result['updated'] = true; } catch (Exception $ex) { $source->rollback(); - unset($source, $sqlstatements); } return $result; From da58ad8981cbcb28642a54a3a83dda735cd6fc6c Mon Sep 17 00:00:00 2001 From: think-kijima Date: Thu, 25 Feb 2021 12:39:09 +0900 Subject: [PATCH 4/9] =?UTF-8?q?Redmine-#5226:=20[=E3=81=8B=E3=82=93?= =?UTF-8?q?=E3=81=96=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84?= =?UTF-8?q?=E3=81=8C=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - クエリ結果が正常にも関わらず、if結果がfalseとなってしまう不具合を修正した --- app/controllers/servers_controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index c4306c656..19955b6df 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -11409,7 +11409,7 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $kanzashisalon try { foreach ($sqlstatements as $sqlstatement) { - if (!$this->StoreHoliday->query($sqlstatement)) { + if ($this->StoreHoliday->query($sqlstatement) === false) { throw new Exception(); } } From 2bd9933d830a1d1a6c754a1eb8295ffbc467d56a Mon Sep 17 00:00:00 2001 From: think-kijima Date: Mon, 12 Apr 2021 14:58:03 +0900 Subject: [PATCH 5/9] =?UTF-8?q?Redmine-#5226:=20[=E3=81=8B=E3=82=93?= =?UTF-8?q?=E3=81=96=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84?= =?UTF-8?q?=E3=81=8C=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - メソッド名をより適したものに変更した - 戻り値からupdatedを削除し、error_datesを返却するように変更した --- app/controllers/components/misc_function.php | 10 +++++----- app/controllers/servers_controller.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/components/misc_function.php b/app/controllers/components/misc_function.php index e92f51a87..4b2502c1f 100644 --- a/app/controllers/components/misc_function.php +++ b/app/controllers/components/misc_function.php @@ -2048,19 +2048,18 @@ function GetDailyKanzashiCustomersLimitFromOldTable(&$controller, $dbname, $stor } /** - * かんざし時間別予約可能数更新可能可否 + * かんざし時間別予約可能数更新でエラーとなる日付を確認する * * @param controller $controller * @param string $dbname * @param int $kanzashisalonposid * @param storeHolidayInformation $store_holiday 店舗休日のオブジェクト * @param _kanzashiCustomersLimit $customers_limits かんざし時間別予約可能数のオブジェクト配列 - * @return return_updateKanzashiCustomersLimit かんざし時間別予約可能数更新結果 + * @return array エラーとなる日付の配列 */ - function CanUpdateKanzashiCustomersLimit(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) + function CheckUpdateKanzashiCustomersLimitErrorDates(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) { $controller->StoreHoliday->set_company_database($dbname, $controller->StoreHoliday); - $result = array('error_dates' => array(), 'updated' => false); $daily_times = array(); foreach ($customers_limits as $customers_limit) { @@ -2096,9 +2095,10 @@ function CanUpdateKanzashiCustomersLimit(&$controller, $dbname, $kanzashisalonpo "; $records = $controller->StoreHoliday->query($query); + $result = array(); foreach ($records as $record) { - $result['error_dates'][] = $record['kr']['date']; + $result[] = $record['kr']['date']; } return $result; diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index 19955b6df..457ebc6d5 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -11339,7 +11339,7 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $kanzashisalon } if ($store_holiday['year'] && $store_holiday['month'] && $store_holiday['STORECODE']) { - $result = $this->MiscFunction->CanUpdateKanzashiCustomersLimit($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); + $result['error_dates'] = $this->MiscFunction->CheckUpdateKanzashiCustomersLimitErrorDates($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); if ($result['error_dates']) { return $result; From 19faa23ce24cfbbe06ce5bf437cdc91adb44b987 Mon Sep 17 00:00:00 2001 From: think-kijima Date: Mon, 12 Apr 2021 14:58:42 +0900 Subject: [PATCH 6/9] =?UTF-8?q?Redmine-#5226:=20[=E3=81=8B=E3=82=93?= =?UTF-8?q?=E3=81=96=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84?= =?UTF-8?q?=E3=81=8C=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - エイリアスを指定するように変更した --- app/controllers/components/misc_function.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/components/misc_function.php b/app/controllers/components/misc_function.php index 4b2502c1f..bf413c956 100644 --- a/app/controllers/components/misc_function.php +++ b/app/controllers/components/misc_function.php @@ -2075,7 +2075,7 @@ function CheckUpdateKanzashiCustomersLimitErrorDates(&$controller, $dbname, $kan $is_holiday = var_export($store_holiday["day{$day}"] !== "", true); $start_time = min($daily_time['start_time']); $end_time = max($daily_time['end_time']); - $date_queries[] = "date = '{$date}' AND ({$is_holiday} OR start_time < '{$start_time}' OR end_time > '{$end_time}')"; + $date_queries[] = "kr.date = '{$date}' AND ({$is_holiday} OR kr.start_time < '{$start_time}' OR kr.end_time > '{$end_time}')"; } $date_query = implode(' OR ', $date_queries); @@ -2088,7 +2088,7 @@ function CheckUpdateKanzashiCustomersLimitErrorDates(&$controller, $dbname, $kan s.pos_id = {$kanzashisalonposid} AND s.kanzashi_id = kr.salon_id WHERE - deletedate IS NULL AND + kr.deletedate IS NULL AND ({$date_query}) ORDER BY kr.date From e80bd660a78b40fd41880dd2e5aff9bbea7c21c4 Mon Sep 17 00:00:00 2001 From: think-kijima Date: Tue, 13 Apr 2021 02:03:56 +0900 Subject: [PATCH 7/9] =?UTF-8?q?#5226:=20[=E3=81=8B=E3=82=93=E3=81=96?= =?UTF-8?q?=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84=E3=81=8C?= =?UTF-8?q?=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - release-2.0.6コンフリクト箇所のマージを行った --- app/controllers/servers_controller.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index 1a85061a7..c8862d81b 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -11339,18 +11339,17 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $store_holiday return $result; } - if ($store_holiday['year'] && $store_holiday['month'] && $store_holiday['STORECODE']) { - $result['error_dates'] = $this->MiscFunction->CheckUpdateKanzashiCustomersLimitErrorDates($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); - - if ($result['error_dates']) { - return $result; - } + $storecode = $store_holiday['STORECODE']; - if ($kanzashisalonposid) { - $store_holiday['kanzashisalonposid'] = $kanzashisalonposid; - } + if ($store_holiday['KANZASHI_ENABLED']) { + $kanzashisalonposid = $store_holiday['KANZASHI_SALON_POS_ID']; + } - if (!$this->wsAddUpdateDeleteStoreHoliday($sessionid, $store_holiday, $ismainsalon)) { + if ($store_holiday['year'] && $store_holiday['month']) { + // 設定されている場合、営業日のアップデートを行う。 + $result['error_dates'] = $this->MiscFunction->CheckUpdateKanzashiCustomersLimitErrorDates($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); + + if ($result['error_dates'] || !$this->wsAddUpdateDeleteStoreHoliday($sessionid, $store_holiday, $ismainsalon)) { return $result; } } else { From 8b57a48619b875cdac411eee6c059c6ec55aece3 Mon Sep 17 00:00:00 2001 From: think-kijima Date: Tue, 13 Apr 2021 20:51:45 +0900 Subject: [PATCH 8/9] =?UTF-8?q?#5226:=20[=E3=81=8B=E3=82=93=E3=81=96?= =?UTF-8?q?=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84=E3=81=8C?= =?UTF-8?q?=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - メソッド名をGetReservationDatesInOffHoursに変更した --- app/controllers/components/misc_function.php | 6 +++--- app/controllers/servers_controller.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/components/misc_function.php b/app/controllers/components/misc_function.php index bf413c956..0756c7a75 100644 --- a/app/controllers/components/misc_function.php +++ b/app/controllers/components/misc_function.php @@ -2048,16 +2048,16 @@ function GetDailyKanzashiCustomersLimitFromOldTable(&$controller, $dbname, $stor } /** - * かんざし時間別予約可能数更新でエラーとなる日付を確認する + * 営業時間外となる予約が存在する日付の配列を取得する * * @param controller $controller * @param string $dbname * @param int $kanzashisalonposid * @param storeHolidayInformation $store_holiday 店舗休日のオブジェクト * @param _kanzashiCustomersLimit $customers_limits かんざし時間別予約可能数のオブジェクト配列 - * @return array エラーとなる日付の配列 + * @return array 営業時間外となる予約が存在する日付の配列 */ - function CheckUpdateKanzashiCustomersLimitErrorDates(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) + function GetReservationDatesInOffHours(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) { $controller->StoreHoliday->set_company_database($dbname, $controller->StoreHoliday); $daily_times = array(); diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index c8862d81b..1ad17a853 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -11347,7 +11347,7 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $store_holiday if ($store_holiday['year'] && $store_holiday['month']) { // 設定されている場合、営業日のアップデートを行う。 - $result['error_dates'] = $this->MiscFunction->CheckUpdateKanzashiCustomersLimitErrorDates($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); + $result['error_dates'] = $this->MiscFunction->GetReservationDatesInOffHours($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); if ($result['error_dates'] || !$this->wsAddUpdateDeleteStoreHoliday($sessionid, $store_holiday, $ismainsalon)) { return $result; From d8ce59b6c1020d5e61e95f7ebe251d67035087b0 Mon Sep 17 00:00:00 2001 From: think-kijima Date: Thu, 15 Apr 2021 19:32:19 +0900 Subject: [PATCH 9/9] =?UTF-8?q?#5226:=20[=E3=81=8B=E3=82=93=E3=81=96?= =?UTF-8?q?=E3=81=97=E9=80=A3=E6=90=BA]=20=E4=BA=88=E7=B4=84=E3=81=8C?= =?UTF-8?q?=E5=96=B6=E6=A5=AD=E6=99=82=E9=96=93=E5=A4=96=E3=81=A8=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E5=A0=B4=E5=90=88=E3=80=81=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - メソッド名をGetReservationDatesOutsideBusinessHoursに変更した --- app/controllers/components/misc_function.php | 2 +- app/controllers/servers_controller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/components/misc_function.php b/app/controllers/components/misc_function.php index 0756c7a75..c4af13800 100644 --- a/app/controllers/components/misc_function.php +++ b/app/controllers/components/misc_function.php @@ -2057,7 +2057,7 @@ function GetDailyKanzashiCustomersLimitFromOldTable(&$controller, $dbname, $stor * @param _kanzashiCustomersLimit $customers_limits かんざし時間別予約可能数のオブジェクト配列 * @return array 営業時間外となる予約が存在する日付の配列 */ - function GetReservationDatesInOffHours(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) + function GetReservationDatesOutsideBusinessHours(&$controller, $dbname, $kanzashisalonposid, $store_holiday, $customers_limits) { $controller->StoreHoliday->set_company_database($dbname, $controller->StoreHoliday); $daily_times = array(); diff --git a/app/controllers/servers_controller.php b/app/controllers/servers_controller.php index 1ad17a853..1819694bf 100644 --- a/app/controllers/servers_controller.php +++ b/app/controllers/servers_controller.php @@ -11347,7 +11347,7 @@ function wsUpdateKanzashiCustomersLimit($sessionid, $ismainsalon, $store_holiday if ($store_holiday['year'] && $store_holiday['month']) { // 設定されている場合、営業日のアップデートを行う。 - $result['error_dates'] = $this->MiscFunction->GetReservationDatesInOffHours($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); + $result['error_dates'] = $this->MiscFunction->GetReservationDatesOutsideBusinessHours($this, $storeinfo['dbname'], $kanzashisalonposid, $store_holiday, $customers_limits); if ($result['error_dates'] || !$this->wsAddUpdateDeleteStoreHoliday($sessionid, $store_holiday, $ismainsalon)) { return $result;