Compare commits
5 Commits
release/dy
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c25ba30d0 | ||
|
|
ba36eb502b | ||
|
|
2c9a2bd30c | ||
|
|
f35acee64b | ||
|
|
a4c02a747f |
@ -618,7 +618,7 @@ export async function makeEltKaskoRequest(
|
||||
}
|
||||
}
|
||||
|
||||
let classification = '11635';
|
||||
let classification = '11606';
|
||||
|
||||
switch (evo_leasingobject_type?.evo_id) {
|
||||
case '7': {
|
||||
@ -634,7 +634,7 @@ export async function makeEltKaskoRequest(
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
classification = '11635';
|
||||
classification = '11606';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,6 +259,8 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
}
|
||||
|
||||
let okved: string | null | undefined;
|
||||
let evo_inn: string | null | undefined;
|
||||
|
||||
if (leadid) {
|
||||
const {
|
||||
data: { lead },
|
||||
@ -268,6 +270,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
});
|
||||
|
||||
okved = lead?.accountidData?.evo_okved;
|
||||
evo_inn = lead?.evo_inn;
|
||||
}
|
||||
|
||||
if (!okved && opportunityid) {
|
||||
@ -302,6 +305,14 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
path: ['eltKasko', 'eltOsago'],
|
||||
});
|
||||
}
|
||||
|
||||
if (!evo_inn) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: 'ИНН в интересе не заполнен',
|
||||
path: ['eltKasko', 'eltOsago'],
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@ -171,8 +171,10 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
{
|
||||
// eslint-disable-next-line no-inner-declarations
|
||||
function unblock() {
|
||||
$calculation.element('cbxPartialVAT').unblock();
|
||||
$calculation.element('tbxVATInLeaseObjectPrice').unblock();
|
||||
const cbxPartialVAT = $calculation.element('cbxPartialVAT');
|
||||
cbxPartialVAT.unblock();
|
||||
if (cbxPartialVAT.getValue()) $calculation.element('tbxVATInLeaseObjectPrice').unblock();
|
||||
|
||||
$calculation.element('cbxInsDecentral').unblock();
|
||||
$calculation.element('selectDealerPerson').unblock();
|
||||
$calculation.element('selectDealerRewardCondition').unblock();
|
||||
@ -180,9 +182,12 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
$calculation.element('selectDealerBrokerRewardCondition').unblock();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see 'apps/web/process/used-pl/reactions.ts:common (40)'
|
||||
*/
|
||||
reaction(
|
||||
() => $calculation.element('selectDealerPerson').getValue(),
|
||||
async (dealerPersonId) => {
|
||||
() => $calculation.$values.getValues(['dealerPerson', 'partialVAT']),
|
||||
async ({ dealerPerson: dealerPersonId }) => {
|
||||
if (!dealerPersonId) {
|
||||
unblock();
|
||||
|
||||
|
||||
@ -508,11 +508,11 @@ export function createValidationSchema(context: ValidationContext) {
|
||||
}
|
||||
|
||||
if (
|
||||
(dealer_person?.evo_legal_form === 100_000_004 &&
|
||||
((await isAgentEqualsToDealerPerson(indAgent)) ||
|
||||
(await isAgentEqualsToDealerPerson(calcDoubleAgent)))) ||
|
||||
(await isAgentEqualsToDealerPerson(calcBroker)) ||
|
||||
(await isAgentEqualsToDealerPerson(calcFinDepartment))
|
||||
dealer_person?.evo_legal_form === 100_000_004 &&
|
||||
((await isAgentEqualsToDealerPerson(indAgent)) ||
|
||||
(await isAgentEqualsToDealerPerson(calcDoubleAgent)) ||
|
||||
(await isAgentEqualsToDealerPerson(calcBroker)) ||
|
||||
(await isAgentEqualsToDealerPerson(calcFinDepartment)))
|
||||
) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user