diff --git a/src/client/stores/CalculationStore/Effects/action.ts b/src/client/stores/CalculationStore/Effects/action.ts index d3b4056..867afa3 100644 --- a/src/client/stores/CalculationStore/Effects/action.ts +++ b/src/client/stores/CalculationStore/Effects/action.ts @@ -215,6 +215,7 @@ const actions: TAction = { quoteid, }, }).then(({ entities: { quote } }) => { + console.log('quote', quote); message.success({ content: `КП ${quote.evo_quotename} создано!`, duration: 5, @@ -223,7 +224,12 @@ const actions: TAction = { }, }); - if (quote.offerprintform) window.open(quote.offerprintform, '_blank'); + if (quote.offerprintform) { + Object.assign(document.createElement('a'), { + target: '_blank', + href: quote.offerprintform, + }).click(); + } }); }) .catch(err => { @@ -406,6 +412,11 @@ const actions: TAction = { (preparedData?.preparedValues?.brokerOfDeliverySum || 0) + (preparedData?.preparedValues?.financialDeptOfDeliverySum || 0), ); + CalculationStore.setValue( + 'resultBonusMPL', + (res.columns.npvBonusExpensesColumn?.values[2] || 0) / + (1 + preparedData.preparedValues.salaryRate), + ); //set values