From f420bfbd1eddd9ced245c074a53a6f7f0cd61c91 Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Fri, 20 Jun 2025 12:16:51 +0900 Subject: [PATCH] dbms_init...1 --- app/Controllers/CLI/Payment.php | 14 +------------- app/Helpers/Customer/ServicePaymentHelper.php | 7 +++++++ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/app/Controllers/CLI/Payment.php b/app/Controllers/CLI/Payment.php index da45874..6d5ffd6 100644 --- a/app/Controllers/CLI/Payment.php +++ b/app/Controllers/CLI/Payment.php @@ -47,20 +47,8 @@ class Payment extends BaseController //Transaction Start $this->getServiceService()->getModel()->transStart(); try { - //서비스중인 서버중 결제일이 오늘인 서비스 확인 - //결제일이 오늘이 서비스를 모두 연장처리 + //서비스중인 서버중 결제일이 오늘인 서비스 확인후 연장처리 $this->getServiceService()->extendBillingAt(date('Y-m-d'), DEFAULTS['STATUS']); - //결제일이 오늘보다 큰 서비스가져오기 - foreach ($this->getServiceService()->getEntities(['billing_at >' => date("Y-m-d")]) as $serviceEntity) { - echo $serviceEntity->getPK() . ":" . $serviceEntity->getBillingAt() . "\n"; - foreach ($this->getServiceItemService()->getEntities(['serviceinfo_uid' => $serviceEntity->getPK()]) as $itemEntity) { - if ($itemEntity->getBillingCycle() == "month") { - //결제정보 ServicePaymentService에 신규등록 - $this->getServicePaymentService()->createPaymentByServiceItem($itemEntity); - } - } - } - // echo $this->getServiceService()->getModel()->getLastQuery() . "\n"; log_message("notice", "Billing 작업을 완료하였습니다."); $this->getServiceService()->getModel()->transCommit(); } catch (\Exception $e) { diff --git a/app/Helpers/Customer/ServicePaymentHelper.php b/app/Helpers/Customer/ServicePaymentHelper.php index c64e02a..4aaef98 100644 --- a/app/Helpers/Customer/ServicePaymentHelper.php +++ b/app/Helpers/Customer/ServicePaymentHelper.php @@ -56,6 +56,13 @@ class ServicePaymentHelper extends CustomerHelper // "onclick" => "return submitBatchJob()" ]); break; + case 'delete': + if ($viewDatas['entity']->getStatus() !== DEFAULTS['STATUS']) { + $action = ""; + } else { + $action = parent::getListButton($action, $viewDatas, $extras); + } + break; default: $action = parent::getListButton($action, $viewDatas, $extras); break;