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,