26 lines
1.4 KiB
TypeScript

import type { GetQuoteInputData, GetQuoteProcessData } from '../load-kp/types';
import defaultValues from '@/config/default-values';
export async function getKPData({ quote }: GetQuoteInputData): Promise<GetQuoteProcessData> {
return {
values: {
NSIB: quote?.evo_nsib_quote ?? defaultValues.NSIB,
costIncrease: quote?.evo_cost_increace ?? defaultValues.costIncrease,
fullPriceWithDiscount:
quote?.evo_price_without_discount_quote ?? defaultValues.fullPriceWithDiscount,
insurance: quote?.evo_insurance ?? defaultValues.insurance,
lastPaymentRedemption:
quote?.evo_last_payment_redemption ?? defaultValues.lastPaymentRedemption,
priceWithDiscount: quote?.evo_price_with_discount ?? defaultValues.priceWithDiscount,
quoteContactGender: quote?.evo_gender ?? defaultValues.quoteContactGender,
quoteName: quote?.evo_contact_name ?? defaultValues.quoteName,
quotePriceWithFullVAT: quote?.evo_full_nds_price ?? defaultValues.quotePriceWithFullVAT,
quoteRedemptionGraph: quote?.evo_redemption_graph ?? defaultValues.quoteRedemptionGraph,
quoteShowAcceptLimit: quote?.evo_accept_limit_quote ?? defaultValues.quoteShowAcceptLimit,
registrationQuote: quote?.evo_registration_quote ?? defaultValues.registrationQuote,
showFinGAP: quote?.evo_fingap_quote ?? defaultValues.showFinGAP,
technicalCardQuote: quote?.evo_card_quote ?? defaultValues.technicalCardQuote,
},
};
}