Compare commits
3 Commits
dev
...
release/dy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13f511a0a0 | ||
|
|
e9b07ed67c | ||
|
|
599baf703b |
@ -330,7 +330,11 @@ export function common({ store, apolloClient }: ProcessContext) {
|
|||||||
query: CRMTypes.GetInsuranceCompaniesDocument,
|
query: CRMTypes.GetInsuranceCompaniesDocument,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (evo_leasingobject_type?.evo_id === '9' && maxSpeed < 20) {
|
if (
|
||||||
|
evo_leasingobject_type?.evo_id &&
|
||||||
|
['9', '6', '10'].includes(evo_leasingobject_type.evo_id) &&
|
||||||
|
maxSpeed < 20
|
||||||
|
) {
|
||||||
const otherInsuranceCompany = accounts?.find(
|
const otherInsuranceCompany = accounts?.find(
|
||||||
(x) => x?.evo_type_ins_policy === null && x.label?.includes('ПРОЧИЕ')
|
(x) => x?.evo_type_ins_policy === null && x.label?.includes('ПРОЧИЕ')
|
||||||
);
|
);
|
||||||
|
|||||||
@ -256,7 +256,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
evo_leasingobject_type?.evo_id &&
|
evo_leasingobject_type?.evo_id &&
|
||||||
['9'].includes(evo_leasingobject_type?.evo_id) &&
|
['9', '6', '10'].includes(evo_leasingobject_type?.evo_id) &&
|
||||||
maxSpeed < 20 &&
|
maxSpeed < 20 &&
|
||||||
insurance.values.osago.insured === 100_000_001
|
insurance.values.osago.insured === 100_000_001
|
||||||
) {
|
) {
|
||||||
|
|||||||
@ -383,8 +383,23 @@ export function createValidationSchema(context: ValidationContext) {
|
|||||||
sumFieldName: 'tbxDealerRewardSumm',
|
sumFieldName: 'tbxDealerRewardSumm',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let evo_broker_accountid: string | null = null;
|
||||||
|
|
||||||
|
if (dealerPerson) {
|
||||||
|
const {
|
||||||
|
data: { dealer_person },
|
||||||
|
} = await apolloClient.query({
|
||||||
|
query: CRMTypes.GetDealerPersonDocument,
|
||||||
|
variables: {
|
||||||
|
dealerPersonId: dealerPerson,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
evo_broker_accountid = dealer_person?.evo_broker_accountid || null;
|
||||||
|
}
|
||||||
|
|
||||||
await validateRewardSum({
|
await validateRewardSum({
|
||||||
agentid: dealerBroker,
|
agentid: dealerBroker || evo_broker_accountid,
|
||||||
conditionId: dealerBrokerRewardCondition,
|
conditionId: dealerBrokerRewardCondition,
|
||||||
sum: dealerBrokerRewardSumm,
|
sum: dealerBrokerRewardSumm,
|
||||||
sumFieldName: 'tbxDealerBrokerRewardSumm',
|
sumFieldName: 'tbxDealerBrokerRewardSumm',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user