Нельзя менять частичный НДС при пересчете без пересмотра

This commit is contained in:
vchikalkin 2024-01-22 15:25:58 +03:00
parent 91f4ed412e
commit a9c8e829bd

View File

@ -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: 'При частичном НДС нельзя включать КАСКО в график',