diff options
Diffstat (limited to 'lib/rfq-last/service.ts')
| -rw-r--r-- | lib/rfq-last/service.ts | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/rfq-last/service.ts b/lib/rfq-last/service.ts index f536a142..f600d04b 100644 --- a/lib/rfq-last/service.ts +++ b/lib/rfq-last/service.ts @@ -2574,6 +2574,35 @@ export async function getRfqAttachments(rfqId: number) { return fullInfo.attachments; } +/** + * 특정 벤더의 현재 조건 조회 + */ +export async function getVendorConditions(rfqId: number, vendorId: number) { + const fullInfo = await getRfqFullInfo(rfqId); + const vendor = fullInfo.vendors?.find(v => v.vendorId === vendorId); + + if (!vendor) { + throw new Error('벤더 정보를 찾을 수 없습니다.'); + } + + return { + currency: vendor.currency, + paymentTermsCode: vendor.paymentTermsCode, + incotermsCode: vendor.incotermsCode, + incotermsDetail: vendor.incotermsDetail, + deliveryDate: vendor.deliveryDate, + contractDuration: vendor.contractDuration, + taxCode: vendor.taxCode, + placeOfShipping: vendor.placeOfShipping, + placeOfDestination: vendor.placeOfDestination, + materialPriceRelatedYn: vendor.materialPriceRelatedYn, + sparepartYn: vendor.sparepartYn, + firstYn: vendor.firstYn, + firstDescription: vendor.firstDescription, + sparepartDescription: vendor.sparepartDescription, + }; +} + // RFQ 발송용 데이터 타입 export interface RfqSendData { |
