From a9c8e829bdaad01f44cdc8a9ed8d8c4ca612764c Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Mon, 22 Jan 2024 15:25:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=BB=D1=8C=D0=B7=D1=8F=20=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=8F=D1=82=D1=8C=20=D1=87=D0=B0=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D1=87=D0=BD=D1=8B=D0=B9=20=D0=9D=D0=94=D0=A1=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81=D1=87=D0=B5=D1=82=D0=B5?= =?UTF-8?q?=20=D0=B1=D0=B5=D0=B7=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81=D0=BC?= =?UTF-8?q?=D0=BE=D1=82=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/process/insurance/validation.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/apps/web/process/insurance/validation.ts b/apps/web/process/insurance/validation.ts index cbfa5ec..8feff9f 100644 --- a/apps/web/process/insurance/validation.ts +++ b/apps/web/process/insurance/validation.ts @@ -36,7 +36,6 @@ export function createValidationSchema({ apolloClient }: ValidationContext) { brand: brandId, fingap: fingapRisks, partialVAT, - product: productId, }, ctx ) => { @@ -215,19 +214,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) { } } - let evo_baseproduct: CRMTypes.GetProductQuery['evo_baseproduct'] = null; - if (productId) { - const { data } = await apolloClient.query({ - query: CRMTypes.GetProductDocument, - variables: { productId }, - }); - ({ evo_baseproduct } = data); - } - - if ( - (partialVAT || evo_baseproduct?.evo_sale_without_nds) && - insurance.values.kasko.insured === 100_000_001 - ) { + if (partialVAT && insurance.values.kasko.insured === 100_000_001) { ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'При частичном НДС нельзя включать КАСКО в график',