apps/web: fix irrInfo empty after loadKP
This commit is contained in:
parent
acdacbf18e
commit
471bbd9459
@ -259,6 +259,7 @@ query GetQuoteData($quoteId: Uuid!) {
|
||||
evo_supplier_currency_price
|
||||
evo_transactioncurrencyid
|
||||
evo_equip_price
|
||||
evo_coefficien_bonus_reducttion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -4,6 +4,7 @@ import type { GetQuoteInputData, GetQuoteProcessData } from '../load-kp/types';
|
||||
import helper from './lib/helper';
|
||||
import initializeApollo from '@/apollo/client';
|
||||
import defaultValues from '@/config/default-values';
|
||||
import calculateHelper from '@/process/calculate/lib/helper';
|
||||
import { getKPData as getKPDataPrice } from '@/process/price/get-kp-data';
|
||||
import { getKPData as getKPDataSubsidy } from '@/process/subsidy/get-kp-data';
|
||||
import { createCurrencyUtility } from '@/utils/currency';
|
||||
@ -98,6 +99,13 @@ export async function getKPData({
|
||||
|
||||
const { evo_rate } = await getRates({ tarif });
|
||||
|
||||
const { getIrr } = calculateHelper({ apolloClient });
|
||||
const irrInfo = await getIrr({
|
||||
bonusCoefficient: quote?.evo_coefficien_bonus_reducttion || 0,
|
||||
product: quote?.evo_baseproductid || null,
|
||||
tarif,
|
||||
});
|
||||
|
||||
return {
|
||||
options: {
|
||||
selectTarif: evo_tarif ? normalizeOptions([evo_tarif]) : [],
|
||||
@ -106,6 +114,7 @@ export async function getKPData({
|
||||
IRR_Perc: quote?.evo_msfo_irr ?? defaultValues.IRR_Perc,
|
||||
clientType: quote?.evo_client_typeid,
|
||||
floatingRate: quote?.evo_floating_rate ?? false,
|
||||
irrInfo,
|
||||
maxPriceChange,
|
||||
minPriceChange,
|
||||
partialVAT: quote?.evo_sale_without_nds ?? false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user