Merge branch 'development'
This commit is contained in:
commit
af17f1215f
@ -4,7 +4,7 @@ import { resetIns } from 'client/Containers/Calculation/Components/ELT/lib/reset
|
||||
import { numberElementsProps } from 'client/Containers/Calculation/Elements/props/common';
|
||||
import {
|
||||
getTitle,
|
||||
getValueName,
|
||||
getValueName
|
||||
} from 'client/Containers/Calculation/Elements/tools';
|
||||
import { ElementsNames } from 'client/Containers/Calculation/types/elements';
|
||||
import { openNotification } from 'client/Elements/Notification';
|
||||
@ -14,7 +14,7 @@ import {
|
||||
mainOptionsForQuoteQuery,
|
||||
quoteQuery,
|
||||
secondaryOptionsForQuoteQuery,
|
||||
singleOptionsForQuoteQuery,
|
||||
singleOptionsForQuoteQuery
|
||||
} from 'core/services/CrmService/graphql/query/quote';
|
||||
import { TOptionizedEntity } from 'core/services/CrmService/types/common';
|
||||
import {
|
||||
@ -23,7 +23,7 @@ import {
|
||||
IEvoGraph,
|
||||
IEvoRewardCondition,
|
||||
IEvoTown,
|
||||
IQuote,
|
||||
IQuote
|
||||
} from 'core/services/CrmService/types/entities';
|
||||
import { currentISODate } from 'core/tools/date';
|
||||
import { NIL } from 'core/tools/uuid';
|
||||
@ -317,6 +317,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
evo_broker_accountid
|
||||
evo_kpp
|
||||
evo_inn
|
||||
evo_supplier_type
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
||||
@ -108,6 +108,8 @@ const reactionEffects: IReactionEffect[] = [
|
||||
//@ts-ignore
|
||||
const importProgramSum = calculationStore.importProgramSum();
|
||||
|
||||
const dealerPerson = calculationStore.getOption('selectDealerPerson');
|
||||
|
||||
return [
|
||||
supplierDiscountRub,
|
||||
price,
|
||||
@ -115,6 +117,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
recalcWithRevision,
|
||||
addEquipmentPrice,
|
||||
importProgramSum,
|
||||
dealerPerson,
|
||||
];
|
||||
},
|
||||
effect: ([
|
||||
@ -124,6 +127,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
recalcWithRevision,
|
||||
addEquipmentPrice,
|
||||
importProgramSum,
|
||||
dealerPerson,
|
||||
]) => {
|
||||
if (!recalcWithRevision) {
|
||||
calculationStore.setValidation('tbxLeaseObjectPrice', undefined);
|
||||
@ -138,6 +142,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
|
||||
const maxCondition1 =
|
||||
leaseObjectUsed === false &&
|
||||
dealerPerson?.evo_supplier_type !== 100_000_001 &&
|
||||
quote?.evo_max_price_change &&
|
||||
!product?.evo_sale_without_nds &&
|
||||
price - supplierDiscountRub + addEquipmentPrice - importProgramSum >
|
||||
@ -145,6 +150,7 @@ const reactionEffects: IReactionEffect[] = [
|
||||
|
||||
const maxCondition2 =
|
||||
leaseObjectUsed === false &&
|
||||
dealerPerson?.evo_supplier_type !== 100_000_001 &&
|
||||
quote?.evo_max_price_change &&
|
||||
product?.evo_sale_without_nds &&
|
||||
leaseObjectPriceWthtVAT >
|
||||
@ -152,7 +158,8 @@ const reactionEffects: IReactionEffect[] = [
|
||||
(quote.evo_nds_in_price_supplier_currency || 0);
|
||||
|
||||
const maxCondition3 =
|
||||
leaseObjectUsed === true &&
|
||||
(leaseObjectUsed === true ||
|
||||
dealerPerson?.evo_supplier_type === 100_000_001) &&
|
||||
quote?.evo_supplier_currency_price &&
|
||||
price - supplierDiscountRub + addEquipmentPrice - importProgramSum >
|
||||
quote.evo_supplier_currency_price -
|
||||
|
||||
@ -47,6 +47,7 @@ query GetMainOptionsForKP(
|
||||
evo_broker_accountid
|
||||
evo_kpp
|
||||
evo_inn
|
||||
evo_supplier_type
|
||||
}
|
||||
selectDealerRewardCondition: evo_reward_conditions(
|
||||
evo_agent_accountid: $dealer_person_accountid
|
||||
|
||||
Reference in New Issue
Block a user