From 7fe856f3b7910e4f7071f7524dbe6aa7f53f657f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=B3=91=EC=B2=A0?= Date: Thu, 5 Mar 2026 21:42:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[loan]=20=EC=83=81=ED=92=88=EA=B6=8C=20?= =?UTF-8?q?=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=EB=8A=94=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=20=EB=AC=B4=EA=B4=80=ED=95=98=EA=B2=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95/=EC=82=AD=EC=A0=9C=20=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - isEditable(): 상품권이면 상태와 무관하게 수정 허용 - isDeletable(): 상품권이면 상태와 무관하게 삭제 허용 Co-Authored-By: Claude Opus 4.6 --- app/Models/Tenants/Loan.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Models/Tenants/Loan.php b/app/Models/Tenants/Loan.php index c769300..cd10527 100644 --- a/app/Models/Tenants/Loan.php +++ b/app/Models/Tenants/Loan.php @@ -219,10 +219,14 @@ public function getElapsedDaysAttribute(): int // ========================================================================= /** - * 수정 가능 여부 (미정산 상태만) + * 수정 가능 여부 (미정산 상태 또는 상품권) */ public function isEditable(): bool { + if ($this->category === self::CATEGORY_GIFT_CERTIFICATE) { + return true; + } + return in_array($this->status, [ self::STATUS_OUTSTANDING, self::STATUS_HOLDING, @@ -230,10 +234,14 @@ public function isEditable(): bool } /** - * 삭제 가능 여부 (미정산/보유 상태만) + * 삭제 가능 여부 (미정산/보유 상태 또는 상품권) */ public function isDeletable(): bool { + if ($this->category === self::CATEGORY_GIFT_CERTIFICATE) { + return true; + } + return in_array($this->status, [ self::STATUS_OUTSTANDING, self::STATUS_HOLDING,