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