103 lines
3.7 KiB
TypeScript
103 lines
3.7 KiB
TypeScript
import type { ResultValues } from '@/stores/results/types';
|
||
|
||
export const id = 'output';
|
||
export const title = 'Результаты';
|
||
|
||
export const titles: Record<keyof ResultValues, string> = {
|
||
_resultContractEconomy: 'Экономика',
|
||
_resultContractEconomyWithVAT: 'Экономика, с НДС',
|
||
_resultPi: 'PI',
|
||
_resultPiRepayment: 'PI для досрочки',
|
||
_resultSumCredit: 'Сумма кредита',
|
||
_resultSumCreditPayment: 'Сумма платежей по кредиту',
|
||
_resultVatRecoverable: 'НДС к возмещению',
|
||
resultAB_FL: 'АВ ФЛ, без НДФЛ.',
|
||
resultAB_UL: 'АВ ЮЛ, с НДС.',
|
||
resultBonusDopProd: 'Бонус МПЛ за доп.продукты, без НДФЛ',
|
||
resultBonusMPL: 'Бонус МПЛ за лизинг, без НДФЛ',
|
||
resultBonusSafeFinance: 'Бонус за Safe Finance без НДФЛ',
|
||
resultDopMPLLeasing: 'Доп.бонус МПЛ за лизинг, без НДФЛ',
|
||
resultDopProdSum: 'Общая сумма доп.продуктов',
|
||
resultFirstPayment: 'Первый платеж',
|
||
resultFirstPaymentRiskPolicy: 'Первый платеж по риск политике, %',
|
||
resultIRRGraphPerc: 'IRR по графику клиента, %',
|
||
resultIRRNominalPerc: 'IRR (номинал), %',
|
||
resultInsKasko: 'КАСКО, НС, ДГО в графике',
|
||
resultInsOsago: 'ОСАГО в графике',
|
||
resultLastPayment: 'Последний платеж',
|
||
resultParticipationAmount: 'Сумма участия (для принятия решения)',
|
||
resultPlPrice: 'Стоимость ПЛ с НДС',
|
||
resultPriceUpPr: 'Удорожание, год',
|
||
resultTerm: 'Срок, мес.',
|
||
resultTotalGraphwithNDS: 'Итого по графику, с НДС',
|
||
};
|
||
|
||
const moneyFormatter = Intl.NumberFormat('ru', {
|
||
currency: 'RUB',
|
||
style: 'currency',
|
||
}).format;
|
||
|
||
const percentFormatter = Intl.NumberFormat('ru', {
|
||
maximumFractionDigits: 2,
|
||
minimumFractionDigits: 2,
|
||
style: 'percent',
|
||
}).format;
|
||
|
||
export const formatters = {
|
||
_resultContractEconomy: moneyFormatter,
|
||
_resultContractEconomyWithVAT: moneyFormatter,
|
||
_resultPi: percentFormatter,
|
||
_resultPiRepayment: percentFormatter,
|
||
_resultSumCredit: moneyFormatter,
|
||
_resultSumCreditPayment: moneyFormatter,
|
||
_resultVatRecoverable: moneyFormatter,
|
||
resultAB_FL: moneyFormatter,
|
||
resultAB_UL: moneyFormatter,
|
||
resultBonusDopProd: moneyFormatter,
|
||
resultBonusMPL: moneyFormatter,
|
||
resultBonusSafeFinance: moneyFormatter,
|
||
resultDopMPLLeasing: moneyFormatter,
|
||
resultDopProdSum: moneyFormatter,
|
||
resultFirstPayment: moneyFormatter,
|
||
resultFirstPaymentRiskPolicy: percentFormatter,
|
||
resultIRRGraphPerc: percentFormatter,
|
||
resultIRRNominalPerc: percentFormatter,
|
||
resultInsKasko: moneyFormatter,
|
||
resultInsOsago: moneyFormatter,
|
||
resultLastPayment: moneyFormatter,
|
||
resultParticipationAmount: moneyFormatter,
|
||
resultPlPrice: moneyFormatter,
|
||
resultPriceUpPr: percentFormatter,
|
||
resultTerm: Intl.NumberFormat('ru').format,
|
||
resultTotalGraphwithNDS: moneyFormatter,
|
||
};
|
||
|
||
export const elements: Array<keyof ResultValues> = [
|
||
'_resultContractEconomy',
|
||
'_resultContractEconomyWithVAT',
|
||
'_resultPi',
|
||
'_resultPiRepayment',
|
||
'_resultSumCredit',
|
||
'_resultSumCreditPayment',
|
||
'_resultVatRecoverable',
|
||
'resultTotalGraphwithNDS',
|
||
'resultPlPrice',
|
||
'resultPriceUpPr',
|
||
'resultIRRGraphPerc',
|
||
'resultIRRNominalPerc',
|
||
'resultInsKasko',
|
||
'resultInsOsago',
|
||
'resultDopProdSum',
|
||
'resultFirstPayment',
|
||
'resultLastPayment',
|
||
'resultFirstPaymentRiskPolicy',
|
||
'resultTerm',
|
||
'resultAB_FL',
|
||
'resultAB_UL',
|
||
'resultBonusMPL',
|
||
'resultDopMPLLeasing',
|
||
'resultBonusDopProd',
|
||
'resultBonusSafeFinance',
|
||
'resultParticipationAmount',
|
||
];
|