diff --git a/apps/web/process/add-product/reactions.ts b/apps/web/process/add-product/reactions.ts index b33fd91..0356458 100644 --- a/apps/web/process/add-product/reactions.ts +++ b/apps/web/process/add-product/reactions.ts @@ -175,14 +175,14 @@ export default function reactions({ store, apolloClient }: ProcessContext) { const options = evo_addproduct_types?.filter( (x) => x && - Boolean(x?.evo_max_period && x.evo_max_period >= leasingPeriod) && - Boolean(x?.evo_min_period && x.evo_min_period <= leasingPeriod) && + Boolean(x?.evo_max_period !== null && x.evo_max_period >= leasingPeriod) && + Boolean(x?.evo_min_period !== null && x.evo_min_period <= leasingPeriod) && Boolean( - x?.evo_max_price && + x?.evo_max_price !== null && x.evo_max_price >= plPriceRub - discountRub - importProgramSum + addEquipmentPrice ) && Boolean( - x?.evo_min_price && + x?.evo_min_price !== null && x.evo_min_price <= plPriceRub - discountRub - importProgramSum + addEquipmentPrice ) && x.evo_leasingobject_types?.find( @@ -191,9 +191,13 @@ export default function reactions({ store, apolloClient }: ProcessContext) { ) && x.evo_visible_calc && Boolean( - x.evo_min_first_payment_perc && x.evo_min_first_payment_perc <= firstPaymentPerc + x.evo_min_first_payment_perc !== null && + x.evo_min_first_payment_perc <= firstPaymentPerc ) && - Boolean(x.evo_max_first_payment_perc && x.evo_max_first_payment_perc >= firstPaymentPerc) + Boolean( + x.evo_max_first_payment_perc !== null && + x.evo_max_first_payment_perc >= firstPaymentPerc + ) ); $calculation.element('selectInsNSIB').setOptions(normalizeOptions(options));