process/price: fix NaN
This commit is contained in:
parent
ab5700dd92
commit
6a95fbb3f2
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user