diff --git a/apps/web/process/elt/lib/response.ts b/apps/web/process/elt/lib/response.ts index f23dd95..22b1525 100644 --- a/apps/web/process/elt/lib/response.ts +++ b/apps/web/process/elt/lib/response.ts @@ -7,6 +7,7 @@ import { MAX_FRANCHISE, MAX_INSURANCE, MIN_INSURANCE } from '@/constants/values' import * as CRMTypes from '@/graphql/crm.types'; import type { ProcessContext } from '@/process/types'; import { defaultRow } from '@/stores/tables/elt/default-values'; +import { getCurrentDateString } from '@/utils/date'; import dayjs from 'dayjs'; import { sort } from 'radash'; import { round } from 'tools'; @@ -175,10 +176,15 @@ export async function convertEltKaskoResponse(input: ConvertEltKaskoResponseInpu } const insuranceOPF = lead?.evo_inn?.length === 12 ? 100_000_001 : 100_000_000; + const currentDate = getCurrentDateString(); + const { data: { evo_insurance_ruleses }, } = await apolloClient.query({ query: CRMTypes.GetEltInsuranceRulesDocument, + variables: { + currentDate, + }, }); const filteredRules = evo_insurance_ruleses?.filter(