min insurance value
This commit is contained in:
parent
5ea97faf42
commit
3ac5757e76
@ -1,6 +1,7 @@
|
||||
import {
|
||||
MAX_FRANCHISE,
|
||||
MAX_INSURANCE,
|
||||
MIN_INSURANCE,
|
||||
} from 'core/constants/stores/Calculation/limits';
|
||||
import { ICalculationStore } from 'core/types/Calculation/Store';
|
||||
|
||||
@ -24,6 +25,12 @@ export default function (
|
||||
};
|
||||
}
|
||||
|
||||
if (kaskoSum < MIN_INSURANCE) {
|
||||
return {
|
||||
message: `Сумма по страховке не должна быть меньше ${MIN_INSURANCE}`,
|
||||
};
|
||||
}
|
||||
|
||||
this.setValue('insFranchise', totalFranchise);
|
||||
|
||||
this.setTableRows(
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { MAX_INSURANCE } from 'core/constants/stores/Calculation/limits';
|
||||
import {
|
||||
MAX_INSURANCE,
|
||||
MIN_INSURANCE,
|
||||
} from 'core/constants/stores/Calculation/limits';
|
||||
import { ICalculationStore } from 'core/types/Calculation/Store';
|
||||
|
||||
export default function (
|
||||
@ -16,6 +19,12 @@ export default function (
|
||||
};
|
||||
}
|
||||
|
||||
if (premiumSum < MIN_INSURANCE) {
|
||||
return {
|
||||
message: `Сумма по страховке не должна быть меньше ${MIN_INSURANCE}`,
|
||||
};
|
||||
}
|
||||
|
||||
this.setTableRow(
|
||||
'tableInsurance',
|
||||
0,
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
export const MAX_FRANCHISE = 75000;
|
||||
export const MAX_INSURANCE = 2500000;
|
||||
export const MIN_INSURANCE = 3000;
|
||||
|
||||
Reference in New Issue
Block a user