Compare commits

...

18 Commits

Author SHA1 Message Date
vchikalkin
8bdbbaab51 Если Плавающая ставка = Да и Лизинг без КАСКО содержит данные,
то выводить сообщение "При плавающей ставке нельзя оформлять Лизинг без КАСКО"
2024-01-31 10:27:24 +03:00
vchikalkin
65db1c0536 process/elt: reset elt on partialVAT 2024-01-29 15:08:32 +03:00
vchikalkin
9589d23b4b process/recalc: block cbxPartialVAT when cbxRecalcWithRevision is true 2024-01-29 13:25:56 +03:00
vchikalkin
d433aebabb process/configurator: load partialVAT & floatingRate from quote 2024-01-29 13:21:52 +03:00
vchikalkin
a9c8e829bd Нельзя менять частичный НДС при пересчете без пересмотра 2024-01-22 15:25:58 +03:00
vchikalkin
91f4ed412e если ("Частичный НДС" cbxPartialVAT = Да или в Продукте Частичный НДС evo_sale_without_nds = Да) и "Плательщик КАСКО" insuredKASKO = ЛД 100 000 001, то ошибка "При частичном НДС нельзя включать КАСКО в график" 2024-01-22 15:23:49 +03:00
vchikalkin
41e46e6351 Если в Продукт selectProduct Частичный НДС evo_sale_without_nds = Нет,
то на форме поле "Частичный НДС" cbxPartialVAT  = Нет и закрыто для редактирования,

иначе открыто для редактирования
2024-01-22 12:38:29 +03:00
vchikalkin
71d095c5e3 fix prev commit 2024-01-22 12:35:34 +03:00
vchikalkin
db8f65627d Если Продукт selectProduct в поле "Особенности продукта" evo_product_properties НЕ содержит "Плавающая ставка" 100 000 001,
то поле "Плавающая ставка" cbxFloatingRate = Нет и закрыто для редактирования

иначе открыто для редактирования
2024-01-22 12:33:24 +03:00
vchikalkin
703e848722 process/configurator: fix get-kp-data/getTarifs 2024-01-22 12:03:08 +03:00
vchikalkin
054af77054 При Пересчете без пересмотра добавить поверки
recalcWthtRevision = True И значение поля "Частичный НДС" cbxPartialVAT  на форме калькулятора не равно значению поля "Частичный НДС" quote.evo_sale_without_nds в Предложении, на основании которого происходит расчет,

то ошибка "Нельзя менять частичный НДС при пересчете без пересмотра"
2024-01-22 11:54:27 +03:00
vchikalkin
330d68f2a9 На изменение значения поля "Частичный НДС" cbxPartialVAT необходимо перенести все реакции и зависимости от поля "Продажа без НДС" в Продукте selectProduct (ищем по evo_sale_without_nds):
см. в ЗНР ___Реакции по процессам _ в таблице по "DYN-3854"
2024-01-22 10:58:34 +03:00
vchikalkin
d0b4641300 product-addon: remove useState using 2024-01-19 14:46:05 +03:00
vchikalkin
502dd919f5 add addon to selectProduct 2024-01-19 14:42:43 +03:00
vchikalkin
ddfc4053eb На изменение значения поля "Частичный НДС" cbxPartialVAT или "Плавающая ставка" cbxFloatingRate должна отрабатывать логика подбора Тарифа selectTarif, а именно (добавляется в текущую):
если в поле "Частичный НДС" cbxPartialVAT указано Да,
то фильтруются Тарифы, у который НДС evo_nds_rules = любой 100000000 или только частичный 100000002,

иначе у которых НДС evo_nds_rules = любой 100000000 или только полный 100000001

2. если в поле "Плавающая ставка" cbxFloatingRate указано Да,

то фильтруются Тарифы, у которых "Плавающая ставка" evo_floating_rate = Да

иначе у которых "Плавающая ставка" evo_floating_rate = Нет
2024-01-19 14:02:18 +03:00
vchikalkin
5e09885178 Добавить поле Плавающая ставка cbxFloatingRate - типа Да/Нет.
При загрузки КП загружается из аналогичного поля в Предложении

вывести на форму в разделе Лизинг рядом с полем Продукт
2024-01-18 16:09:34 +03:00
vchikalkin
9c569a949c add default values 2024-01-18 16:06:09 +03:00
vchikalkin
d1eb91dd34 Добавить новое поле "Частичный НДС" cbxPartialVAT - типа Да/Нет.
В этом DYN на форму не выводим.
2024-01-18 16:05:57 +03:00
26 changed files with 301 additions and 134 deletions

View File

@ -348,21 +348,15 @@ export async function makeEltKaskoRequest(
const leaseObjectUsed = $calculation.element('cbxLeaseObjectUsed').getValue();
const productId = $calculation.element('selectProduct').getValue();
let evo_baseproduct: CRMTypes.GetProductQuery['evo_baseproduct'] = null;
if (productId) {
const { data } = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: { productId },
});
({ evo_baseproduct } = data);
}
const partialVAT = $calculation.element('cbxPartialVAT').getValue();
const leaseObjectYear = $calculation.element('tbxLeaseObjectYear').getValue();
let isNew = true;
if (
leaseObjectUsed === true ||
(leaseObjectUsed === false &&
evo_baseproduct?.evo_sale_without_nds === true &&
productId &&
partialVAT &&
leaseObjectYear < currentDate.getFullYear() - 1)
) {
isNew = false;
@ -373,7 +367,8 @@ export async function makeEltKaskoRequest(
if (
leaseObjectUsed === true ||
(leaseObjectUsed === false &&
evo_baseproduct?.evo_sale_without_nds === true &&
productId &&
partialVAT &&
leaseObjectYear < currentDate.getFullYear() - 1)
) {
vehicleDate = new Date(`${vehicleYear}-01-01`);
@ -496,7 +491,8 @@ export async function makeEltKaskoRequest(
if (
leaseObjectUsed === false &&
evo_baseproduct?.evo_sale_without_nds === true &&
productId &&
partialVAT &&
leaseObjectYear < currentDate.getFullYear() - 1
) {
mileage = 0;

View File

@ -0,0 +1,53 @@
/* eslint-disable react/forbid-component-props */
import titles from '../config/elements-titles';
import { useStore } from '@/stores/hooks';
import { observer } from 'mobx-react-lite';
import { pick } from 'radash';
import styled from 'styled-components';
import { Tag } from 'ui/elements';
const Container = styled.div`
display: flex;
flex-direction: row;
gap: 5px;
`;
const TagWrapper = styled.div<{ disabled: boolean }>`
> span {
pointer-events: ${(props) => (props.disabled ? 'none' : 'auto')};
opacity: ${(props) => (props.disabled ? '50%' : '')};
}
`;
const tagsData = pick(titles, ['cbxPartialVAT', 'cbxFloatingRate']);
const { CheckableTag } = Tag;
export const ProductAddon = observer(() => {
const { $calculation } = useStore();
function handleChange(elementName: keyof typeof tagsData, checked: boolean) {
$calculation.element(elementName).setValue(checked);
}
return (
<Container>
{(Object.keys(tagsData) as Array<keyof typeof tagsData>).map((elementName) => {
const visible = $calculation.$status.getStatus(elementName);
return (
<TagWrapper key={elementName} disabled={visible === 'Disabled'}>
<CheckableTag
checked={$calculation.element(elementName).getValue()}
onChange={(checked) => handleChange(elementName, checked)}
key={elementName}
style={{ marginInlineEnd: 0 }}
>
{tagsData[elementName]}
</CheckableTag>
</TagWrapper>
);
})}
</Container>
);
});

View File

@ -133,6 +133,8 @@ const components = wrapComponentsMap({
selectUser: e.Select,
cbxSupplierFinancing: e.Switch,
tbxPi: e.InputNumber,
cbxPartialVAT: e.Switch,
cbxFloatingRate: e.Switch,
/** Readonly Elements */
labelLeaseObjectRisk: e.Text,

View File

@ -1,3 +1,4 @@
import { ProductAddon } from '../../addons/product-addon';
import { buildLink } from '../../builders';
import components from '../elements-components';
import elementsProps from '../elements-props';
@ -221,6 +222,29 @@ const overrideRender: Partial<Record<keyof typeof map, RenderProps>> = {
},
},
selectProduct: {
render: () => {
const elementName = 'selectProduct';
const title = titles.selectProduct;
const valueName = map.selectProduct;
const Component = components.selectProduct;
const props = elementsProps.selectProduct;
const { builder } = types.selectProduct();
const Element = builder(Component, {
elementName,
valueName,
});
return (
<Container key={elementName}>
<Head addon={<ProductAddon />} htmlFor={elementName} title={title} />
<Element {...props} id={elementName} />
</Container>
);
},
},
selectQuote: {
render: () => {
const elementName = 'selectQuote';

View File

@ -127,6 +127,8 @@ const titles: Record<ActionElements | ValuesElements, string> = {
selectUser: 'Пользователь',
cbxSupplierFinancing: 'Финансирование поставщика',
tbxPi: 'PI',
cbxPartialVAT: 'Частичный НДС',
cbxFloatingRate: 'Плавающая ставка',
/** Link Elements */
linkDownloadKp: '',

View File

@ -192,6 +192,8 @@ const types = wrapElementsTypes({
selectUser: t.Options,
cbxSupplierFinancing: t.Switch,
tbxPi: t.Number,
cbxPartialVAT: t.Switch,
cbxFloatingRate: t.Switch,
labelLeaseObjectRisk: t.Readonly,
tbxInsKaskoPriceLeasePeriod: t.Readonly,

View File

@ -130,6 +130,8 @@ const elementsToValues = wrapElementsMap({
selectUser: 'user',
cbxSupplierFinancing: 'supplierFinancing',
tbxPi: 'pi',
cbxPartialVAT: 'partialVAT',
cbxFloatingRate: 'floatingRate',
/** Readonly Elements */
labelLeaseObjectRisk: 'leaseObjectRiskName',

View File

@ -504,6 +504,8 @@ const defaultOptions: CalculationOptions = {
selectUser: [],
cbxSupplierFinancing: [],
tbxPi: [],
cbxPartialVAT: [],
cbxFloatingRate: [],
};
export default defaultOptions;

View File

@ -6,6 +6,7 @@ const defaultStatuses: CalculationStatuses = {
btnCreateKPMini: 'Default',
cbxCostIncrease: 'Default',
cbxDisableChecks: 'Default',
cbxFloatingRate: 'Default',
cbxFullPriceWithDiscount: 'Default',
cbxInsDecentral: 'Default',
cbxInsUnlimitDrivers: 'Default',
@ -13,6 +14,7 @@ const defaultStatuses: CalculationStatuses = {
cbxLastPaymentRedemption: 'Default',
cbxLeaseObjectUsed: 'Default',
cbxNSIB: 'Default',
cbxPartialVAT: 'Default',
cbxPriceWithDiscount: 'Default',
cbxQuoteRedemptionGraph: 'Default',
cbxRecalcWithRevision: 'Default',

View File

@ -141,6 +141,8 @@ const defaultValues: CalculationValues = {
vehicleTaxInYear: 0,
vin: null,
withTrailer: false,
partialVAT: false,
floatingRate: false,
};
export default defaultValues;

View File

@ -126,6 +126,8 @@ const ValuesSchema = z.object({
vehicleTaxInYear: z.number(),
vin: z.string().nullable(),
withTrailer: z.boolean(),
partialVAT: z.boolean(),
floatingRate: z.boolean(),
/**
* Link Values

View File

@ -106,6 +106,7 @@ query GetQuote($quoteId: Uuid!) {
evo_programsolution
evo_kasko_payer
evo_promotion
evo_sale_without_nds
}
}
@ -131,6 +132,8 @@ query GetTarifs($currentDate: DateTime) {
evo_leasingobject_typeid
}
evo_pl_use_type
evo_nds_rules
evo_floating_rate
}
}
@ -208,12 +211,12 @@ query GetProduct($productId: Uuid!) {
evo_sale_without_nds
evo_cut_proportion_bonus_director
evo_cut_irr_with_bonus
evo_sale_without_nds
evo_id
evo_supplier_financing_accept
accounts {
accountid
}
evo_product_properties
}
}

View File

@ -170,6 +170,7 @@ type account {
evo_address_postalidData: evo_address
evo_agency_agreementid: Uuid
evo_bank_detailses(statecode: Int): [evo_bank_details]
evo_block_pay_supplier: Boolean
evo_branch_count: String
evo_branch_type: Int
evo_broker_accountid: Uuid
@ -462,6 +463,7 @@ type evo_baseproduct {
evo_leasingobject_types(statecode: Int): [evo_leasingobject_type]
evo_name: String
evo_object_count_max: Int
evo_product_properties: [Int!]
evo_relation: [Int!]
evo_sale_without_nds: Boolean
evo_scoring_available: Boolean
@ -964,6 +966,7 @@ type quote {
evo_add_director_bonus: Decimal
evo_add_equipment: Boolean
evo_add_region_director_bonus: Decimal
evo_advance_regulations: Decimal
evo_agent_accountid: Uuid
evo_agent_reward_conditionid: Uuid
evo_agent_reward_summ: Decimal
@ -1070,6 +1073,7 @@ type quote {
evo_first_payment_perc_without_subsidy: Decimal
evo_first_payment_rub: Decimal
evo_first_payment_rub_without_subsidy: Decimal
evo_floating_rate: Boolean
evo_franchise: Decimal
evo_fssp_legal_entity: Decimal
evo_fuel: Boolean
@ -1197,6 +1201,7 @@ type quote {
evo_program_import_subsidyid: Uuid
evo_program_import_subsidy_sum: Decimal
evo_promotion: [Int!]
evo_promotion_credit: Boolean
evo_pts_type: Int
evo_purchases_participation: Boolean
evo_question_credit_committees: [evo_question_credit_committee]
@ -1638,11 +1643,16 @@ type evo_contract {
evo_agent_reward_summ: Decimal
evo_agent_reward_tech: Decimal
evo_agent_service_list: [Int!]
evo_all_payment_summ: Decimal
evo_all_payment_summ_leasing: Decimal
evo_all_payment_summ_penalty_fee: Decimal
evo_approvallogs: [evo_approvallog]
evo_balance_holder: Int
evo_bank_detailsid: Uuid
evo_bank_detailsidData: evo_bank_details
evo_base_calc_pay: Decimal
evo_bch_account_state: Int
evo_bch_account_state_date: DateTime
evo_bonus_pay_systemuserid: Uuid
evo_broker_accountid: Uuid
evo_broker_request_paymentid: Uuid
@ -1749,6 +1759,11 @@ type evo_contract {
evo_fin_department_reward_summ: Decimal
evo_fin_department_reward_tech: Decimal
evo_fin_department_service_list: [Int!]
evo_first_cre_export_date: DateTime
evo_first_cre_export_date_guarantor1: DateTime
evo_first_cre_export_date_guarantor2: DateTime
evo_first_cre_export_date_guarantor3: DateTime
evo_first_cre_export_date_guarantor4: DateTime
evo_first_payment_fact: Decimal
evo_first_payment_fact_date: DateTime
evo_first_payment_perc: Decimal
@ -1792,6 +1807,11 @@ type evo_contract {
evo_last_data_transfer_to_bch_date: DateTime
evo_last_formation_cre_date: DateTime
evo_last_formation_cre_status: Int
evo_last_missed_payment_leasing_date: DateTime
evo_last_payment_amount: Decimal
evo_last_payment_date: DateTime
evo_last_payment_debt_leasing: Decimal
evo_last_payment_debt_penalty_fee: Decimal
evo_last_payment_redemption: Boolean
evo_leasingobjectid: Uuid
evo_leasingobjectidData: evo_leasingobject
@ -1825,6 +1845,8 @@ type evo_contract {
evo_number_dkp: String
evo_ownership_date: DateTime
evo_paymentorders(evo_name: String, statecode: Int): [evo_paymentorder]
evo_payment_compliance_code: Int
evo_payment_due_date_code: Int
evo_payment_redemption: Int
evo_payment_redemption_sum: Decimal
evo_payment_redemption_sum_without_nds: Decimal
@ -2076,6 +2098,7 @@ type evo_tarif {
evo_datefrom: DateTime
evo_dateto: DateTime
evo_delivery_time: [Int!]
evo_floating_rate: Boolean
evo_graphtype_exception: [Int!]
evo_id: String
evo_ins_type: [Int!]
@ -2099,9 +2122,11 @@ type evo_tarif {
evo_models(statecode: Int): [evo_model]
evo_model_exceptions(statecode: Int): [evo_model]
evo_name: String
evo_nds_rules: Int
evo_pay_supplier_without_addcontract: Boolean
evo_pl_use_type: [Int!]
evo_rates(statecode: Int): [evo_rate]
evo_scoring_accept: Boolean
evo_seasons_type_exception: [Int!]
evo_tarifid: Uuid
evo_transactioncurrencyid: Uuid
@ -2235,6 +2260,7 @@ type systemuser {
evo_can_import_sheduled_calls: Boolean
evo_datebirth: DateTime
evo_editing_question_cc: Boolean
evo_edit_parking: Boolean
evo_edo: Boolean
evo_edo_department: [Int!]
evo_edo_departmentData: [picklist_value]
@ -2645,6 +2671,7 @@ type evo_addcontract {
evo_pts_change: Boolean
evo_pts_type: Int
evo_pts_type_new: Int
evo_publish_site: Boolean
evo_quoteid: Uuid
evo_reasons_calc: [Int!]
evo_reason_validation_doc: [Int!]
@ -3112,6 +3139,7 @@ type evo_systemparameters {
evo_card_number_count_request: Int
evo_clientfinance_queueid: Uuid
evo_client_queueid: Uuid
evo_cre_xml_folder: String
evo_custom_reports_directory: String
evo_dadata_account_update_maxday: Int
evo_dadata_key: String
@ -3600,6 +3628,7 @@ input quoteInput {
evo_add_director_bonus: Decimal
evo_add_equipment: Boolean
evo_add_region_director_bonus: Decimal
evo_advance_regulations: Decimal
evo_agent_accountid: Uuid
evo_agent_reward_conditionid: Uuid
evo_agent_reward_summ: Decimal
@ -3704,6 +3733,7 @@ input quoteInput {
evo_first_payment_perc_without_subsidy: Decimal
evo_first_payment_rub: Decimal
evo_first_payment_rub_without_subsidy: Decimal
evo_floating_rate: Boolean
evo_franchise: Decimal
evo_fssp_legal_entity: Decimal
evo_fuel: Boolean
@ -3824,6 +3854,7 @@ input quoteInput {
evo_program_import_subsidyid: Uuid
evo_program_import_subsidy_sum: Decimal
evo_promotion: [Int!]
evo_promotion_credit: Boolean
evo_pts_type: Int
evo_purchases_participation: Boolean
evo_quotename: String

View File

@ -402,6 +402,7 @@ export type QuoteInput = {
evo_add_director_bonus?: InputMaybe<Scalars['Decimal']['input']>;
evo_add_equipment?: InputMaybe<Scalars['Boolean']['input']>;
evo_add_region_director_bonus?: InputMaybe<Scalars['Decimal']['input']>;
evo_advance_regulations?: InputMaybe<Scalars['Decimal']['input']>;
evo_age_drivers?: InputMaybe<Scalars['Int']['input']>;
evo_agent_accountid?: InputMaybe<Scalars['Uuid']['input']>;
evo_agent_reward_conditionid?: InputMaybe<Scalars['Uuid']['input']>;
@ -506,6 +507,7 @@ export type QuoteInput = {
evo_first_payment_perc_without_subsidy?: InputMaybe<Scalars['Decimal']['input']>;
evo_first_payment_rub?: InputMaybe<Scalars['Decimal']['input']>;
evo_first_payment_rub_without_subsidy?: InputMaybe<Scalars['Decimal']['input']>;
evo_floating_rate?: InputMaybe<Scalars['Boolean']['input']>;
evo_franchise?: InputMaybe<Scalars['Decimal']['input']>;
evo_fssp_legal_entity?: InputMaybe<Scalars['Decimal']['input']>;
evo_fuel?: InputMaybe<Scalars['Boolean']['input']>;
@ -626,6 +628,7 @@ export type QuoteInput = {
evo_program_import_subsidyid?: InputMaybe<Scalars['Uuid']['input']>;
evo_programsolution?: InputMaybe<Scalars['Int']['input']>;
evo_promotion?: InputMaybe<Array<Scalars['Int']['input']>>;
evo_promotion_credit?: InputMaybe<Scalars['Boolean']['input']>;
evo_pts_type?: InputMaybe<Scalars['Int']['input']>;
evo_purchases_participation?: InputMaybe<Scalars['Boolean']['input']>;
evo_quotename?: InputMaybe<Scalars['String']['input']>;
@ -760,14 +763,14 @@ export type GetQuoteQueryVariables = Exact<{
}>;
export type GetQuoteQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_baseproductid: string | null, evo_one_year_insurance: boolean | null, evo_min_change_price: number | null, evo_max_price_change: number | null, evo_discount_supplier_currency: number | null, evo_equip_price: number | null, evo_program_import_subsidy_sum: number | null, evo_nds_in_price_supplier_currency: number | null, evo_supplier_currency_price: number | null, evo_approved_first_payment: number | null, evo_recalc_limit: number | null, evo_max_mass: number | null, evo_seats: number | null, evo_year: number | null, evo_last_payment_perc: number | null, evo_maximum_percentage_av: number | null, evo_untype_insurance: boolean | null, evo_percent_subsidy: number | null, evo_programsolution: number | null, evo_kasko_payer: number | null, evo_promotion: Array<number> | null } | null };
export type GetQuoteQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_baseproductid: string | null, evo_one_year_insurance: boolean | null, evo_min_change_price: number | null, evo_max_price_change: number | null, evo_discount_supplier_currency: number | null, evo_equip_price: number | null, evo_program_import_subsidy_sum: number | null, evo_nds_in_price_supplier_currency: number | null, evo_supplier_currency_price: number | null, evo_approved_first_payment: number | null, evo_recalc_limit: number | null, evo_max_mass: number | null, evo_seats: number | null, evo_year: number | null, evo_last_payment_perc: number | null, evo_maximum_percentage_av: number | null, evo_untype_insurance: boolean | null, evo_percent_subsidy: number | null, evo_programsolution: number | null, evo_kasko_payer: number | null, evo_promotion: Array<number> | null, evo_sale_without_nds: boolean | null } | null };
export type GetTarifsQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']['input']>;
}>;
export type GetTarifsQuery = { __typename?: 'Query', evo_tarifs: Array<{ __typename?: 'evo_tarif', evo_tarifid: string | null, evo_baseproductid: string | null, evo_min_period: number | null, evo_max_period: number | null, evo_delivery_time: Array<number> | null, evo_min_first_payment: number | null, evo_max_first_payment: number | null, evo_min_last_payment: number | null, evo_max_last_payment: number | null, evo_used: boolean | null, evo_pl_use_type: Array<number> | null, label: string | null, value: string | null, evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null } | null> | null } | null> | null };
export type GetTarifsQuery = { __typename?: 'Query', evo_tarifs: Array<{ __typename?: 'evo_tarif', evo_tarifid: string | null, evo_baseproductid: string | null, evo_min_period: number | null, evo_max_period: number | null, evo_delivery_time: Array<number> | null, evo_min_first_payment: number | null, evo_max_first_payment: number | null, evo_min_last_payment: number | null, evo_max_last_payment: number | null, evo_used: boolean | null, evo_pl_use_type: Array<number> | null, evo_nds_rules: number | null, evo_floating_rate: boolean | null, label: string | null, value: string | null, evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null } | null> | null } | null> | null };
export type GetTarifQueryVariables = Exact<{
tarifId: Scalars['Uuid']['input'];
@ -802,7 +805,7 @@ export type GetProductQueryVariables = Exact<{
}>;
export type GetProductQuery = { __typename?: 'Query', evo_baseproduct: { __typename?: 'evo_baseproduct', evo_calculation_method: Array<number> | null, evo_sale_without_nds: boolean | null, evo_cut_proportion_bonus_director: boolean | null, evo_cut_irr_with_bonus: boolean | null, evo_id: string | null, evo_supplier_financing_accept: boolean | null, evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null } | null> | null, evo_baseproducts: Array<{ __typename?: 'evo_baseproduct', evo_baseproductid: string | null } | null> | null, evo_brands: Array<{ __typename?: 'evo_brand', evo_brandid: string | null } | null> | null, accounts: Array<{ __typename?: 'account', accountid: string | null } | null> | null } | null };
export type GetProductQuery = { __typename?: 'Query', evo_baseproduct: { __typename?: 'evo_baseproduct', evo_calculation_method: Array<number> | null, evo_sale_without_nds: boolean | null, evo_cut_proportion_bonus_director: boolean | null, evo_cut_irr_with_bonus: boolean | null, evo_id: string | null, evo_supplier_financing_accept: boolean | null, evo_product_properties: Array<number> | null, evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null } | null> | null, evo_baseproducts: Array<{ __typename?: 'evo_baseproduct', evo_baseproductid: string | null } | null> | null, evo_brands: Array<{ __typename?: 'evo_brand', evo_brandid: string | null } | null> | null, accounts: Array<{ __typename?: 'account', accountid: string | null } | null> | null } | null };
export type GetSubsidiesQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']['input']>;
@ -1087,7 +1090,7 @@ export type GetQuoteConfiguratorDataQueryVariables = Exact<{
}>;
export type GetQuoteConfiguratorDataQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_baseproductid: string | null, evo_client_typeid: string | null, evo_msfo_irr: number | null, evo_delivery_time: number | null, evo_first_payment_perc: number | null, evo_last_payment_perc: number | null, evo_leasingobject_typeid: string | null, evo_leasingobject_used: boolean | null, evo_period: number | null, evo_accept_period: number | null, evo_rateid: string | null, evo_min_change_price: number | null, evo_max_price_change: number | null } | null };
export type GetQuoteConfiguratorDataQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_baseproductid: string | null, evo_client_typeid: string | null, evo_msfo_irr: number | null, evo_delivery_time: number | null, evo_first_payment_perc: number | null, evo_last_payment_perc: number | null, evo_leasingobject_typeid: string | null, evo_leasingobject_used: boolean | null, evo_period: number | null, evo_accept_period: number | null, evo_rateid: string | null, evo_min_change_price: number | null, evo_max_price_change: number | null, evo_floating_rate: boolean | null, evo_sale_without_nds: boolean | null } | null };
export type GetQuoteCreateKpDataQueryVariables = Exact<{
quoteId: Scalars['Uuid']['input'];
@ -1203,13 +1206,13 @@ export const GetLeadDocument = {"kind":"Document","definitions":[{"kind":"Operat
export const GetOpportunityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOpportunity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"opportunityid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"opportunity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"opportunityid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"opportunityid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leadid"}},{"kind":"Field","name":{"kind":"Name","value":"accountidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_address_legalidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_region_fias_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_city_fias_id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_okved"}}]}}]}}]}}]} as unknown as DocumentNode<GetOpportunityQuery, GetOpportunityQueryVariables>;
export const GetOpportunitiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOpportunities"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"opportunities"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"owner_domainname"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"opportunityid"}}]}}]}}]} as unknown as DocumentNode<GetOpportunitiesQuery, GetOpportunitiesQueryVariables>;
export const GetQuotesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuotes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quotes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_quotename"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"quoteid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_recalc_limit"}},{"kind":"Field","name":{"kind":"Name","value":"evo_statuscodeidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_purchases_participation"}}]}}]}}]} as unknown as DocumentNode<GetQuotesQuery, GetQuotesQueryVariables>;
export const GetQuoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_one_year_insurance"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_change_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_price_change"}},{"kind":"Field","name":{"kind":"Name","value":"evo_discount_supplier_currency"}},{"kind":"Field","name":{"kind":"Name","value":"evo_equip_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_program_import_subsidy_sum"}},{"kind":"Field","name":{"kind":"Name","value":"evo_nds_in_price_supplier_currency"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_currency_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_approved_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_recalc_limit"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_mass"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seats"}},{"kind":"Field","name":{"kind":"Name","value":"evo_year"}},{"kind":"Field","name":{"kind":"Name","value":"evo_last_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_maximum_percentage_av"}},{"kind":"Field","name":{"kind":"Name","value":"evo_untype_insurance"}},{"kind":"Field","name":{"kind":"Name","value":"evo_percent_subsidy"}},{"kind":"Field","name":{"kind":"Name","value":"evo_programsolution"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_promotion"}}]}}]}}]} as unknown as DocumentNode<GetQuoteQuery, GetQuoteQueryVariables>;
export const GetTarifsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarifs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarifs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_tarifid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_tarifid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_last_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_last_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_used"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_pl_use_type"}}]}}]}}]} as unknown as DocumentNode<GetTarifsQuery, GetTarifsQueryVariables>;
export const GetQuoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_one_year_insurance"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_change_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_price_change"}},{"kind":"Field","name":{"kind":"Name","value":"evo_discount_supplier_currency"}},{"kind":"Field","name":{"kind":"Name","value":"evo_equip_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_program_import_subsidy_sum"}},{"kind":"Field","name":{"kind":"Name","value":"evo_nds_in_price_supplier_currency"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_currency_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_approved_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_recalc_limit"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_mass"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seats"}},{"kind":"Field","name":{"kind":"Name","value":"evo_year"}},{"kind":"Field","name":{"kind":"Name","value":"evo_last_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_maximum_percentage_av"}},{"kind":"Field","name":{"kind":"Name","value":"evo_untype_insurance"}},{"kind":"Field","name":{"kind":"Name","value":"evo_percent_subsidy"}},{"kind":"Field","name":{"kind":"Name","value":"evo_programsolution"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_promotion"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}}]}}]}}]} as unknown as DocumentNode<GetQuoteQuery, GetQuoteQueryVariables>;
export const GetTarifsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarifs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarifs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_tarifid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_tarifid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_last_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_last_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_used"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_pl_use_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_nds_rules"}},{"kind":"Field","name":{"kind":"Name","value":"evo_floating_rate"}}]}}]}}]} as unknown as DocumentNode<GetTarifsQuery, GetTarifsQueryVariables>;
export const GetTarifDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarif"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarif"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_tarifid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graphtype_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seasons_type_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_decreasing_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus_coefficient"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_datefrom"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rateid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_irr_plan"}},{"kind":"Field","name":{"kind":"Name","value":"evo_margin_min"}}]}}]}}]} as unknown as DocumentNode<GetTarifQuery, GetTarifQueryVariables>;
export const GetRatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRates"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_rates"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_rateid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_tarifs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarifid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_rateid"}}]}}]}}]} as unknown as DocumentNode<GetRatesQuery, GetRatesQueryVariables>;
export const GetRateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRate"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"rateId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_rate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_rateid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"rateId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_base_rate"}},{"kind":"Field","name":{"kind":"Name","value":"evo_credit_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_finance_rate"}}]}}]}}]} as unknown as DocumentNode<GetRateQuery, GetRateQueryVariables>;
export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_relation"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000000"}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"systemusers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"systemuserid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProductsQuery, GetProductsQueryVariables>;
export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproduct"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_baseproductid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calculation_method"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_proportion_bonus_director"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProductQuery, GetProductQueryVariables>;
export const GetProductDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproduct"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_baseproductid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calculation_method"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_proportion_bonus_director"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cut_irr_with_bonus"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id"}},{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_financing_accept"}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_product_properties"}}]}}]}}]} as unknown as DocumentNode<GetProductQuery, GetProductQueryVariables>;
export const GetSubsidiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidies"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidies"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_subsidyid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_type"}}]}}]}}]} as unknown as DocumentNode<GetSubsidiesQuery, GetSubsidiesQueryVariables>;
export const GetSubsidyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidy"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_percent_subsidy"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_get_subsidy_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}}]}}]}}]} as unknown as DocumentNode<GetSubsidyQuery, GetSubsidyQueryVariables>;
export const GetImportProgramDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetImportProgram"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"importProgram"},"name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}}]}}]}}]} as unknown as DocumentNode<GetImportProgramQuery, GetImportProgramQueryVariables>;
@ -1251,7 +1254,7 @@ export const GetInsuranceCompaniesDocument = {"kind":"Document","definitions":[{
export const GetRolesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRoles"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"roleName"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"roles"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"roleName"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"systemusers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"fullname"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"domainname"}}]}}]}}]}}]} as unknown as DocumentNode<GetRolesQuery, GetRolesQueryVariables>;
export const GetQuoteAddProductDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteAddProductData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_product_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_accept_control_addproduct_typeid"}}]}}]}}]} as unknown as DocumentNode<GetQuoteAddProductDataQuery, GetQuoteAddProductDataQueryVariables>;
export const GetQuoteBonusDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteBonusData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_sale_bonus"}}]}}]}}]} as unknown as DocumentNode<GetQuoteBonusDataQuery, GetQuoteBonusDataQueryVariables>;
export const GetQuoteConfiguratorDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteConfiguratorData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_client_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_msfo_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}},{"kind":"Field","name":{"kind":"Name","value":"evo_first_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_last_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_used"}},{"kind":"Field","name":{"kind":"Name","value":"evo_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_accept_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rateid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_change_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_price_change"}}]}}]}}]} as unknown as DocumentNode<GetQuoteConfiguratorDataQuery, GetQuoteConfiguratorDataQueryVariables>;
export const GetQuoteConfiguratorDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteConfiguratorData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_client_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_msfo_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}},{"kind":"Field","name":{"kind":"Name","value":"evo_first_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_last_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_used"}},{"kind":"Field","name":{"kind":"Name","value":"evo_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_accept_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_rateid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_change_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_price_change"}},{"kind":"Field","name":{"kind":"Name","value":"evo_floating_rate"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sale_without_nds"}}]}}]}}]} as unknown as DocumentNode<GetQuoteConfiguratorDataQuery, GetQuoteConfiguratorDataQueryVariables>;
export const GetQuoteCreateKpDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteCreateKPData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_price_with_discount"}},{"kind":"Field","name":{"kind":"Name","value":"evo_price_without_discount_quote"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_increace"}},{"kind":"Field","name":{"kind":"Name","value":"evo_insurance"}},{"kind":"Field","name":{"kind":"Name","value":"evo_registration_quote"}},{"kind":"Field","name":{"kind":"Name","value":"evo_card_quote"}},{"kind":"Field","name":{"kind":"Name","value":"evo_nsib_quote"}},{"kind":"Field","name":{"kind":"Name","value":"evo_redemption_graph"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_quote"}},{"kind":"Field","name":{"kind":"Name","value":"evo_contact_name"}},{"kind":"Field","name":{"kind":"Name","value":"evo_gender"}},{"kind":"Field","name":{"kind":"Name","value":"evo_last_payment_redemption"}}]}}]}}]} as unknown as DocumentNode<GetQuoteCreateKpDataQuery, GetQuoteCreateKpDataQueryVariables>;
export const GetQuoteEltDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteEltData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kasko_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id_elt_kasko"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id_kasko_calc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_franchise"}},{"kind":"Field","name":{"kind":"Name","value":"evo_osago_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_id_elt_osago"}},{"kind":"Field","name":{"kind":"Name","value":"evo_osago_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}}]}}]} as unknown as DocumentNode<GetQuoteEltDataQuery, GetQuoteEltDataQueryVariables>;
export const GetQuoteFingapDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteFingapData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_product_risks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetQuoteFingapDataQuery, GetQuoteFingapDataQueryVariables>;

View File

@ -27,6 +27,8 @@ const QUERY_GET_QUOTE_CONFIGURATOR_DATA = gql`
evo_rateid
evo_min_change_price
evo_max_price_change
evo_floating_rate
evo_sale_without_nds
}
}
`;
@ -66,10 +68,12 @@ export async function getKPData({ values }: GetQuoteInputData): Promise<GetQuote
const { evo_tarif } = await getTarifs({
deliveryTime: quote?.evo_delivery_time,
firstPaymentPerc: quote?.evo_first_payment_perc,
floatingRate: quote?.evo_floating_rate ?? false,
lastPaymentPerc: quote?.evo_last_payment_perc,
leaseObjectType: quote?.evo_leasingobject_typeid,
leaseObjectUsed: quote?.evo_leasingobject_used,
leasingPeriod,
partialVAT: quote?.evo_sale_without_nds ?? false,
product: quote?.evo_baseproductid,
});
@ -124,8 +128,10 @@ export async function getKPData({ values }: GetQuoteInputData): Promise<GetQuote
values: {
IRR_Perc: quote?.evo_msfo_irr ?? defaultValues.IRR_Perc,
clientType: quote?.evo_client_typeid,
floatingRate: quote?.evo_floating_rate ?? false,
maxPriceChange,
minPriceChange,
partialVAT: quote?.evo_sale_without_nds ?? false,
product: quote?.evo_baseproductid,
rate: evo_rate?.evo_rateid ?? defaultValues.rate,
tarif,

View File

@ -1,3 +1,4 @@
/* eslint-disable sonarjs/cognitive-complexity */
import defaultValues from '@/config/default-values';
import * as CRMTypes from '@/graphql/crm.types';
import type { ProcessContext } from '@/process/types';
@ -9,10 +10,12 @@ type GetTarifInputValues = Pick<
CalculationValues,
| 'deliveryTime'
| 'firstPaymentPerc'
| 'floatingRate'
| 'lastPaymentPerc'
| 'leaseObjectType'
| 'leaseObjectUsed'
| 'leasingPeriod'
| 'partialVAT'
| 'product'
>;
@ -128,6 +131,8 @@ export default function helper({ apolloClient }: Pick<ProcessContext, 'apolloCli
leaseObjectUsed,
leasingPeriod,
product,
floatingRate,
partialVAT,
}: GetTarifInputValues) {
const currentDate = dayjs().utc(false).toISOString();
@ -183,6 +188,24 @@ export default function helper({ apolloClient }: Pick<ProcessContext, 'apolloCli
return false;
})
.filter((tarif) => {
if (partialVAT) {
return (
tarif?.evo_nds_rules && [100_000_000, 100_000_002].includes(tarif?.evo_nds_rules)
);
} else {
return (
tarif?.evo_nds_rules && [100_000_000, 100_000_001].includes(tarif?.evo_nds_rules)
);
}
})
.filter((tarif) => {
if (floatingRate) {
return tarif?.evo_floating_rate;
} else {
return !tarif?.evo_floating_rate;
}
})
.at(0);
return { evo_tarif, evo_tarifs };

View File

@ -26,6 +26,8 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
'firstPaymentPerc',
'lastPaymentPerc',
'leaseObjectType',
'floatingRate',
'partialVAT',
]),
async (values) => {
const { evo_tarif, evo_tarifs } = await getTarifs(values);
@ -154,6 +156,39 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext)
}
);
reaction(
() => $calculation.element('selectProduct').getValue(),
async (productId) => {
if (!productId) {
$calculation.element('cbxPartialVAT').unblock();
$calculation.element('cbxPartialVAT').unblock();
return;
}
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: { productId },
});
// eslint-disable-next-line no-negated-condition
if (!evo_baseproduct?.evo_product_properties?.includes(100_000_001)) {
$calculation.element('cbxFloatingRate').setValue(false).block();
} else {
$calculation.element('cbxFloatingRate').unblock();
}
// eslint-disable-next-line no-negated-condition
if (!evo_baseproduct?.evo_sale_without_nds) {
$calculation.element('cbxPartialVAT').setValue(false).block();
} else {
$calculation.element('cbxPartialVAT').unblock();
}
}
);
(
[
'selectProduct',

View File

@ -1,3 +1,4 @@
/* eslint-disable sonarjs/cognitive-complexity */
import type { ValidationContext } from '../types';
import elementsProps from '@/Components/Calculation/config/elements-props';
import { getElementName } from '@/Components/Calculation/config/map/values';
@ -24,6 +25,7 @@ const Schema = ValuesSchema.pick({
finDepartmentRewardSumm: true,
firstPaymentPerc: true,
firstPaymentRub: true,
floatingRate: true,
importProgramSum: true,
importerRewardPerc: true,
importerRewardRub: true,
@ -38,6 +40,7 @@ const Schema = ValuesSchema.pick({
leaseObjectPriceWthtVAT: true,
leaseObjectYear: true,
leasingPeriod: true,
leasingWithoutKasko: true,
maxMass: true,
maxPriceChange: true,
maxSpeed: true,
@ -93,6 +96,19 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
}
}
/**
* Если Плавающая ставка = Да и Лизинг без КАСКО содержит данные,
* то выводить сообщение "При плавающей ставке нельзя оформлять Лизинг без КАСКО"
*/
const { floatingRate, leasingWithoutKasko } = values;
if (floatingRate && leasingWithoutKasko) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: 'При плавающей ставке нельзя оформлять Лизинг без КАСКО',
path: ['selectLeasingWithoutKasko'],
});
}
(Object.keys(values) as Values[]).forEach((valueName) => {
const elementName = getElementName(valueName);
if (elementName) {

View File

@ -39,6 +39,7 @@ export default function reactions(context: ProcessContext) {
'leasingPeriod',
'leaseObjectPrice',
'quote',
'partialVAT',
]),
}),
async () => {
@ -94,6 +95,7 @@ export default function reactions(context: ProcessContext) {
'insDecentral',
'leasingWithoutKasko',
'quote',
'partialVAT',
]),
}),
async () => {

View File

@ -14,6 +14,8 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
insDecentral: true,
leasingPeriod: true,
leasingWithoutKasko: true,
partialVAT: true,
product: true,
quote: true,
recalcWithRevision: true,
})
@ -33,6 +35,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
insurance,
brand: brandId,
fingap: fingapRisks,
partialVAT,
},
ctx
) => {
@ -210,6 +213,14 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
}
}
}
if (partialVAT && insurance.values.kasko.insured === 100_000_001) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: 'При частичном НДС нельзя включать КАСКО в график',
path: ['cbxPartialVAT'],
});
}
}
);
}

View File

@ -1,11 +1,10 @@
import { VAT } from '@/constants/values';
import * as CRMTypes from '@/graphql/crm.types';
import type { ProcessContext } from '@/process/types';
import { disposableReaction } from '@/utils/mobx';
import { reaction } from 'mobx';
import { round } from 'tools';
export default function reactions({ store, apolloClient }: ProcessContext) {
export default function reactions({ store }: ProcessContext) {
const { $calculation, $process } = store;
reaction(
@ -71,25 +70,15 @@ export default function reactions({ store, apolloClient }: ProcessContext) {
);
reaction(
() => $calculation.$values.getValues(['product', 'leaseObjectPrice', 'VATInLeaseObjectPrice']),
async ({ product: productId, leaseObjectPrice, VATInLeaseObjectPrice }) => {
let evo_sale_without_nds = false;
if (productId) {
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: {
productId,
},
});
if (evo_baseproduct?.evo_sale_without_nds) {
evo_sale_without_nds = evo_baseproduct.evo_sale_without_nds;
}
}
if (evo_sale_without_nds) {
() =>
$calculation.$values.getValues([
'product',
'leaseObjectPrice',
'VATInLeaseObjectPrice',
'partialVAT',
]),
async ({ product: productId, leaseObjectPrice, VATInLeaseObjectPrice, partialVAT }) => {
if (productId && partialVAT) {
$calculation
.element('tbxLeaseObjectPriceWthtVAT')
.setValue(leaseObjectPrice - VATInLeaseObjectPrice);

View File

@ -1,17 +1,16 @@
import type { ValidationContext } from '../types';
import ValuesSchema from '@/config/schema/values';
import { VAT } from '@/constants/values';
import * as CRMTypes from '@/graphql/crm.types';
import { round } from 'tools';
import { z } from 'zod';
export function createValidationSchema({ apolloClient }: ValidationContext) {
export function createValidationSchema() {
return ValuesSchema.pick({
VATInLeaseObjectPrice: true,
balanceHolder: true,
firstPaymentRub: true,
lastPaymentPerc: true,
leaseObjectPriceWthtVAT: true,
partialVAT: true,
plPriceRub: true,
product: true,
subsidySum: true,
@ -28,30 +27,21 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
subsidySum,
balanceHolder,
lastPaymentPerc,
partialVAT,
},
ctx
) => {
if (productId) {
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: {
productId,
},
if (
productId &&
partialVAT &&
round(VATInLeaseObjectPrice / leaseObjectPriceWthtVAT, 2) >= VAT
) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message:
'При продаже ПЛ после ФЛ размер НДС в стоимости ПЛ не может составлять 20% и более от стоимости с НДС. Проверьте корректность НДС, либо измените Продукт',
path: ['tbxVATInLeaseObjectPrice'],
});
if (
evo_baseproduct?.evo_sale_without_nds &&
round(VATInLeaseObjectPrice / leaseObjectPriceWthtVAT, 2) >= VAT
) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message:
'При продаже ПЛ после ФЛ размер НДС в стоимости ПЛ не может составлять 20% и более от стоимости с НДС. Проверьте корректность НДС, либо измените Продукт',
path: ['tbxVATInLeaseObjectPrice'],
});
}
}
if (supplierDiscountRub >= plPriceRub) {

View File

@ -63,6 +63,7 @@ export function common({ store }: ProcessContext) {
// 'radioLastPaymentRule',
// 'tbxLastPaymentPerc',
// 'tbxLastPaymentRub',
'cbxPartialVAT',
];
reaction(
() => $calculation.element('cbxRecalcWithRevision').getValue(),

View File

@ -21,6 +21,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
leaseObjectUsed: true,
leaseObjectYear: true,
maxMass: true,
partialVAT: true,
plPriceRub: true,
product: true,
quote: true,
@ -45,6 +46,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
leaseObjectYear,
lastPaymentPerc,
leaseObjectCategory,
partialVAT,
},
ctx
) => {
@ -75,18 +77,11 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
variables: { quoteId },
});
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: { productId },
});
const maxCondition1 =
leaseObjectUsed === false &&
dealerPerson?.evo_supplier_type !== 100_000_001 &&
quote?.evo_max_price_change &&
!evo_baseproduct?.evo_sale_without_nds &&
!partialVAT &&
plPriceRub - discountRub + addEquipmentPrice - importProgramSum >
quote.evo_max_price_change;
@ -94,7 +89,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
leaseObjectUsed === false &&
dealerPerson?.evo_supplier_type !== 100_000_001 &&
quote?.evo_max_price_change &&
evo_baseproduct?.evo_sale_without_nds &&
partialVAT &&
leaseObjectPriceWthtVAT >
quote.evo_max_price_change - (quote.evo_nds_in_price_supplier_currency || 0);
@ -108,13 +103,13 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
(quote.evo_program_import_subsidy_sum || 0);
const minCondition1 =
!evo_baseproduct?.evo_sale_without_nds &&
!partialVAT &&
quote?.evo_min_change_price &&
plPriceRub - discountRub + addEquipmentPrice - importProgramSum <
quote.evo_min_change_price;
const minCondition2 =
evo_baseproduct?.evo_sale_without_nds &&
partialVAT &&
quote?.evo_min_change_price &&
leaseObjectPriceWthtVAT <
quote.evo_min_change_price - (quote.evo_nds_in_price_supplier_currency || 0);
@ -220,6 +215,14 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
path: ['tbxLastPaymentPerc'],
});
}
if (partialVAT !== quote?.evo_sale_without_nds) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: 'Нельзя менять частичный НДС при пересчете без пересмотра',
path: ['selectProduct'],
});
}
}
}
);

View File

@ -16,12 +16,20 @@ export function common({ store, apolloClient }: ProcessContext) {
* иначе selectSupplierCurrency открыто для редактирования
*/
reaction(
() => $calculation.$values.getValues(['product', 'subsidy', 'importProgram', 'dealer']),
() =>
$calculation.$values.getValues([
'product',
'subsidy',
'importProgram',
'dealer',
'partialVAT',
]),
async ({
product: productId,
subsidy: subsidyId,
importProgram: importProgramId,
dealer: dealerId,
partialVAT,
}) => {
const {
data: { transactioncurrencies },
@ -41,16 +49,7 @@ export function common({ store, apolloClient }: ProcessContext) {
return;
}
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: {
productId,
},
});
if (subsidyId || importProgramId || evo_baseproduct?.evo_sale_without_nds) {
if (subsidyId || importProgramId || (productId && partialVAT)) {
$calculation.element('selectSupplierCurrency').setValue(transactioncurrency_rub_id).block();
} else if (dealerId) {
const {

View File

@ -38,8 +38,8 @@ export function common({ store, apolloClient }: ProcessContext) {
* поле НДС в стоимости предмета лизинга xxx закрыть для редактирования
*/
reaction(
() => $calculation.$values.getValues(['product', 'recalcWithRevision']),
async ({ product: productId }) => {
() => $calculation.$values.getValues(['product', 'recalcWithRevision', 'partialVAT']),
async ({ product: productId, partialVAT }) => {
if (!productId) {
$calculation.element('tbxSupplierDiscountRub').block();
$calculation.element('tbxSupplierDiscountPerc').block();
@ -50,16 +50,7 @@ export function common({ store, apolloClient }: ProcessContext) {
return;
}
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: {
productId,
},
});
if (evo_baseproduct?.evo_sale_without_nds) {
if (productId && partialVAT) {
$calculation.element('tbxSupplierDiscountRub').block();
$calculation.element('tbxSupplierDiscountPerc').block();
$calculation.element('tbxLeaseObjectPrice').unblock();
@ -80,8 +71,8 @@ export function common({ store, apolloClient }: ProcessContext) {
disposableReaction(
() => $process.has('LoadKP'),
() => $calculation.$values.getValues(['product']),
async ({ product: productId }) => {
() => $calculation.$values.getValues(['product', 'partialVAT']),
async ({ product: productId, partialVAT }) => {
if (!productId) {
$calculation.element('tbxSupplierDiscountRub').resetValue();
$calculation.element('tbxSupplierDiscountPerc').resetValue();
@ -93,23 +84,15 @@ export function common({ store, apolloClient }: ProcessContext) {
return;
}
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: {
productId,
},
});
if (evo_baseproduct?.evo_sale_without_nds) {
if (productId && partialVAT) {
$calculation.element('tbxSupplierDiscountRub').resetValue();
$calculation.element('tbxSupplierDiscountPerc').resetValue();
$calculation.element('selectImportProgram').resetValue();
}
if (
evo_baseproduct?.evo_sale_without_nds &&
productId &&
partialVAT &&
$calculation.element('cbxRecalcWithRevision').getValue() === false
) {
$calculation.element('cbxLeaseObjectUsed').setValue(true);
@ -127,8 +110,8 @@ export function common({ store, apolloClient }: ProcessContext) {
* иначе открыты для редактирования
*/
reaction(
() => $calculation.$values.getValues(['recalcWithRevision', 'product']),
async ({ recalcWithRevision, product: productId }) => {
() => $calculation.$values.getValues(['recalcWithRevision', 'product', 'partialVAT']),
async ({ recalcWithRevision, product: productId, partialVAT }) => {
if (!productId) {
$calculation.element('tbxFirstPaymentPerc').unblock();
$calculation.element('tbxFirstPaymentRub').unblock();
@ -136,16 +119,7 @@ export function common({ store, apolloClient }: ProcessContext) {
return;
}
const {
data: { evo_baseproduct },
} = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: {
productId,
},
});
if (evo_baseproduct?.evo_sale_without_nds && recalcWithRevision) {
if (productId && partialVAT && recalcWithRevision) {
$calculation.element('tbxFirstPaymentPerc').block();
$calculation.element('tbxFirstPaymentRub').block();
} else {
@ -227,6 +201,7 @@ export function common({ store, apolloClient }: ProcessContext) {
'product',
'dealer',
'supplierFinancing',
'partialVAT',
]),
async ({
leaseObjectUsed,
@ -234,20 +209,11 @@ export function common({ store, apolloClient }: ProcessContext) {
product: productId,
dealer: dealerId,
supplierFinancing,
partialVAT,
}) => {
let evo_baseproduct: CRMTypes.GetProductQuery['evo_baseproduct'] = null;
let dealer: CRMTypes.GetDealerQuery['dealer'] = null;
let evo_subsidy: CRMTypes.GetSubsidyQuery['evo_subsidy'] = null;
if (productId) {
const { data } = await apolloClient.query({
query: CRMTypes.GetProductDocument,
variables: { productId },
});
({ evo_baseproduct } = data);
}
if (dealerId) {
const { data } = await apolloClient.query({
query: CRMTypes.GetDealerDocument,
@ -270,7 +236,7 @@ export function common({ store, apolloClient }: ProcessContext) {
leaseObjectUsed ||
(evo_subsidy_evo_delivery_time?.length === 1 &&
evo_subsidy_evo_delivery_time.includes(100_000_000)) ||
evo_baseproduct?.evo_sale_without_nds ||
(productId && partialVAT) ||
dealer?.evo_return_leasing_dealer
) {
$calculation.element('radioDeliveryTime').setValue(100_000_000).block();