From fd542b5ad4bf94b82d872f87b96aa2e7514ffbc3 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Fri, 19 Sep 2025 09:40:38 +0000
Subject: (최겸) 구매 일반계약 수정, 견적 입찰 계약 세금코드 select 적용
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../detail/general-contract-basic-info.tsx         | 29 ++++++++++++++--------
 1 file changed, 19 insertions(+), 10 deletions(-)

(limited to 'lib/general-contracts/detail/general-contract-basic-info.tsx')

diff --git a/lib/general-contracts/detail/general-contract-basic-info.tsx b/lib/general-contracts/detail/general-contract-basic-info.tsx
index 882ed8b2..d891fe63 100644
--- a/lib/general-contracts/detail/general-contract-basic-info.tsx
+++ b/lib/general-contracts/detail/general-contract-basic-info.tsx
@@ -15,6 +15,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
 import { GeneralContract } from '@/db/schema'
 import { ContractDocuments } from './general-contract-documents'
 import { getPaymentTermsForSelection, getIncotermsForSelection, getPlaceOfShippingForSelection, getPlaceOfDestinationForSelection } from '@/lib/procurement-select/service'
+import { TAX_CONDITIONS, getTaxConditionName } from '@/lib/tax-conditions/types'
 
 interface ContractBasicInfoProps {
   contractId: number
@@ -46,7 +47,7 @@ export function ContractBasicInfo({ contractId }: ContractBasicInfoProps) {
       작업후: { enabled: false, period: 0, maxPeriod: 0 },
       기타: { enabled: false, period: 0, maxPeriod: 0 },
     },
-    contractAmount: null,
+    contractAmount: null as number | null,
     currency: 'KRW',
     linkedPoNumber: '',
     linkedBidNumber: '',
@@ -57,7 +58,7 @@ export function ContractBasicInfo({ contractId }: ContractBasicInfoProps) {
     paymentAfterDelivery: {} as any,
     paymentTerm: '',
     taxType: '',
-    liquidatedDamages: false,
+    liquidatedDamages: false as boolean,
     liquidatedDamagesPercent: '',
     deliveryType: '',
     deliveryTerm: '',
@@ -130,7 +131,7 @@ export function ContractBasicInfo({ contractId }: ContractBasicInfoProps) {
             작업후: { enabled: false, period: 0, maxPeriod: 0 },
             기타: { enabled: false, period: 0, maxPeriod: 0 },
           },
-          contractAmount: contractData?.contractAmount || null as number | null,
+          contractAmount: contractData?.contractAmount || null,
           currency: contractData?.currency || 'KRW',
           linkedPoNumber: contractData?.linkedPoNumber || '',
           linkedBidNumber: contractData?.linkedBidNumber || '',
@@ -141,7 +142,7 @@ export function ContractBasicInfo({ contractId }: ContractBasicInfoProps) {
           paymentAfterDelivery: paymentAfterDelivery || {} as any,
           paymentTerm: contractData?.paymentTerm || '',
           taxType: contractData?.taxType || '',
-          liquidatedDamages: contractData?.liquidatedDamages || false,
+          liquidatedDamages: Boolean(contractData?.liquidatedDamages),
           liquidatedDamagesPercent: contractData?.liquidatedDamagesPercent || '',
           deliveryType: contractData?.deliveryType || '',
           deliveryTerm: contractData?.deliveryTerm || '',
@@ -838,13 +839,21 @@ export function ContractBasicInfo({ contractId }: ContractBasicInfoProps) {
                   </div>
                   <div className="space-y-2">
                     <Label htmlFor="taxType">세금조건 <span className="text-red-600">*</span></Label>
-                    <Input
-                      type="text"
+                    <Select
                       value={formData.taxType}
-                      onChange={(e) => setFormData(prev => ({ ...prev, taxType: e.target.value }))}
-                      placeholder="세금조건을 입력하세요"
-                      className={errors.taxType ? 'border-red-500' : ''}
-                    />
+                      onValueChange={(value) => setFormData(prev => ({ ...prev, taxType: value }))}
+                    >
+                      <SelectTrigger className={errors.taxType ? 'border-red-500' : ''}>
+                        <SelectValue placeholder="세금조건을 선택하세요" />
+                      </SelectTrigger>
+                      <SelectContent>
+                        {TAX_CONDITIONS.map((condition) => (
+                          <SelectItem key={condition.code} value={condition.code}>
+                            {condition.name}
+                          </SelectItem>
+                        ))}
+                      </SelectContent>
+                    </Select>
                     {errors.taxType && (
                       <p className="text-sm text-red-600">세금조건은 필수값입니다.</p>
                     )}
-- 
cgit v1.2.3

