diff --git a/apps/web/process/price/reactions/common.ts b/apps/web/process/price/reactions/common.ts index dc9eecc..293eac9 100644 --- a/apps/web/process/price/reactions/common.ts +++ b/apps/web/process/price/reactions/common.ts @@ -123,7 +123,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) { (firstPaymentRub) => { const { plPriceRub, addEquipmentPrice, importProgramSum } = $calculation.$values.getValues(); const perc = (firstPaymentRub / (plPriceRub + addEquipmentPrice - importProgramSum)) * 100; - $calculation.element('tbxFirstPaymentPerc').setValue(perc); + $calculation.element('tbxFirstPaymentPerc').setValue(perc || 0); } ); @@ -147,7 +147,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) { (comissionRub) => { const { plPriceRub, addEquipmentPrice, importProgramSum } = $calculation.$values.getValues(); const perc = (comissionRub / (plPriceRub + addEquipmentPrice - importProgramSum)) * 100; - $calculation.element('tbxComissionPerc').setValue(perc); + $calculation.element('tbxComissionPerc').setValue(perc || 0); } ); @@ -187,7 +187,7 @@ export default function reactions({ store, apolloClient }: ProcessContext) { } const perc = (lastPaymentRub / (plPriceRub + addEquipmentPrice - importProgramSum)) * 100; - $calculation.element('tbxLastPaymentPerc').setValue(perc); + $calculation.element('tbxLastPaymentPerc').setValue(perc || 0); } ); }