From fe7803666f964bdba1629002505eb5b376756e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Tue, 9 Dec 2025 15:09:21 +0900 Subject: [PATCH] dbmsv4 init...2 --- app/Services/Equipment/ServerPartService.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index ee42d13..7bf44bb 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -152,7 +152,8 @@ class ServerPartService extends EquipmentService $formDatas['title'] = $partEntity->getTitle(); //서버파트 수정 $entity = parent::modify_process($entity, $formDatas); - if ($entity->getServiceInfoUID() !== null) { //서비스가 정의 되어 있으면 + if ($entity->getServiceInfoUID() !== null) { + //서비스가 정의 되어 있으면 서비스 비용 수정 if ($entity->getBilling() == PAYMENT['BILLING']['MONTH']) { //Billing형식이 Month이면 서비스 금액설정 호출 service('customer_serviceservice')->updateAmount($entity->getServiceInfoUID()); } @@ -165,7 +166,13 @@ class ServerPartService extends EquipmentService protected function delete_process($entity): ServerPartEntity { $this->getPartService($entity->getType())->detachFromServerPart($entity); - return parent::delete_process($entity); + $entity = parent::delete_process($entity); + if ($entity->getServiceInfoUID() !== null) { //서비스가 정의 되어 있으면 + if ($entity->getBilling() == PAYMENT['BILLING']['MONTH']) { //Billing형식이 Month이면 서비스 금액설정 호출 + service('customer_serviceservice')->updateAmount($entity->getServiceInfoUID()); + } + } + return $entity; } //List 검색용 //FormFilter 조건절 처리