fix: recalc disabled agents fields

This commit is contained in:
vchikalkin 2023-06-05 10:28:48 +03:00
parent 8e65d864ef
commit 554a702e6c

View File

@ -153,7 +153,7 @@ export function common({ store, apolloClient }: ProcessContext) {
reaction(
() => $calculation.$values.getValues(['firstPaymentPerc', 'recalcWithRevision']),
({ firstPaymentPerc, recalcWithRevision }) => {
if (firstPaymentPerc === 0 && recalcWithRevision === true) {
if (firstPaymentPerc === 0 || recalcWithRevision === true) {
agents.forEach((elementName) =>
$calculation.$status.overrideStatus(elementName, 'Disabled')
);