fix 100000004 payments validation
This commit is contained in:
parent
bdacd7f71a
commit
2c6cb3942d
@ -246,24 +246,26 @@ const validatePaymentsTable = () => {
|
||||
)(
|
||||
Array.from({ length: 3 }, () => ({
|
||||
paymentRelation: {
|
||||
validation: areEqual3MiddleRows ? false : true,
|
||||
validation: !areEqual3MiddleRows,
|
||||
},
|
||||
})),
|
||||
);
|
||||
|
||||
if (isValidRows) {
|
||||
const areCorrect3MiddleRows = isEqual(
|
||||
targetRows.map(x => x.paymentRelation?.value).sort((a, b) => a - b),
|
||||
targetRows.map(x => x.paymentRelation?.value),
|
||||
targetRows.slice(0).sort((a, b) => a - b),
|
||||
targetRows,
|
||||
);
|
||||
CalculationStore.setTableRow(
|
||||
CalculationStore.setTableRows(
|
||||
'tablePayments',
|
||||
1,
|
||||
)({
|
||||
paymentRelation: {
|
||||
validation: areCorrect3MiddleRows ? true : false,
|
||||
},
|
||||
});
|
||||
)(
|
||||
Array.from({ length: 3 }, () => ({
|
||||
paymentRelation: {
|
||||
validation: areCorrect3MiddleRows,
|
||||
},
|
||||
})),
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user