From b8bde2903660c740c9b2000558bea4e2b080b450 Mon Sep 17 00:00:00 2001 From: Chika Date: Fri, 3 Jun 2022 10:03:48 +0300 Subject: [PATCH] merge release/calc-91_elt_osago_lessee --- .../Components/ELT/Osago/lib/composeRequest.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/client/Containers/Calculation/Components/ELT/Osago/lib/composeRequest.ts b/src/client/Containers/Calculation/Components/ELT/Osago/lib/composeRequest.ts index 852c5fa..d680a3f 100644 --- a/src/client/Containers/Calculation/Components/ELT/Osago/lib/composeRequest.ts +++ b/src/client/Containers/Calculation/Components/ELT/Osago/lib/composeRequest.ts @@ -124,6 +124,14 @@ export default function (this: ICalculationStore, company: IAccount) { opfSpecified: true, }; + const inn = this.getValue('INNForCalc').toString(); + + const osagoRow = this.getTableRowValues( + 'tableInsurance', + rows => rows.findIndex(x => x?.key === 'osago'), + 'value', + ); + return { preparams: { kladr, @@ -160,6 +168,16 @@ export default function (this: ICalculationStore, company: IAccount) { kbm: '3', }, ], + lessee: { + inn, + SubjectType: 1, + SubjectTypeSpecified: true, + }, + insurer: { + SubjectType: 1, + SubjectTypeSpecified: true, + INN: osagoRow?.insured === 100_000_000 ? inn : '9724016636', + }, }, }; }